-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote code inclusion (mixpanel-recorder.min.js) #428
Comments
Thanks for bringing this up. I take it you're installing via npm and bundling the sdk with the rest of your code (e.g. |
Yeah I'm using webpack to build my extension. For now I am trying to work around it with: // remove remote code loading
{
test: /mixpanel-browser.*\.js$/,
use: [
{
loader: resolve(webpackExtSrcDir, "webpack", "mixpanelNoop-loader.js"),
},
],
}, // this replaces the remote code loading in mixpanel so our extension doesn't anger chrome webstore reviewers
export default function (source) {
const noopFunction = "MixpanelLib.prototype.start_session_recording = function() {};";
return source.replace(
/MixpanelLib\.prototype\.start_session_recording = addOptOutCheckMixpanelLib\(function\s*\(\)\s*\{([\s\S]*?)\}\);/,
noopFunction
);
} But it's not ideal |
Same issue. Is there any options to opt-out from adding recorder. It's in beta anyways and is available on Enterprise plan only. Your suggestions? |
Same issue here - please do let me know if it is possible to opt out from recorder. Chrome Web Store is not happy with RHC... |
Did this fix let you bypass chrome web store review? I've already been rejected due to mixpanel once. Wouldn't want to get rejected again :) |
It removed the remote code loading and they seemed happy with it |
This script wasn't fully working out for me for some reason. Hope Chrome Web reviewers will be happy with it. |
Same issue with me. I am also reverting to 2.49. Thanks. |
I've had the same issue. Google views the remote code loading of mixpanel-recorder.min.js as a violation and I can't get my extension approved. @rahulbansal16 @vittoriohalfon did you get approved using version 2.49? Thank you |
Yes, extension got approved when reverting to MixPanel Version 2.49.0 |
My extension got rejected even after reverting to MixPanel Version 2.49.0 |
@ElinaBahirova there are no references to |
@ElinaBahirova are you sure you re-built the chrome extension after reverting to mixpanel v2.49.0? |
Anyway though, the latest release 2.54.0 now provides several build options for including/unincluding the session-recording bundle. From the release notes: The SDK is now provided in several new builds with different options around included modules and asynchronous loading:
import mixpanel from 'mixpanel-browser';
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-recorder';
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-core'; Of the above options, 1 and 3 should both take care of the "remotely hosted code" violation. (In 1, the session-recording module is included in the main bundle rather than loaded asynchronously; in 3, it is not included at all and cannot be loaded) You can also import the pre-built bundles directly if you don't want to run mixpanel-browser source through your bundler: import mixpanel from 'mixpanel-browser/dist/mixpanel-core.cjs'; |
I followed the above comment to a tee, and still have the chrome store reporting the exact same issue. Taking a look at the v2.55.0 FYI |
Thanks for the report. There's no script-loading code in https://github.com/mixpanel/mixpanel-js/blob/v2.55.0/dist/mixpanel-core.cjs.js (except for the JSONP tracking code which has been there forever). Are you getting the exact same violation report as in the first comment on this issue? |
Yes - but as you can see on this line: https://github.com/mixpanel/mixpanel-js/blob/v2.55.0/dist/mixpanel-core.cjs.js#L4470 - the capability is still included, and this is causing the static analysis that Chrome Store's team is doing on submission to automatically reject our submission with the following note:
|
2 days ago got the Chrome store rejection again with 2.49.0 version of the plugin ... |
With the newest Version 2.56.0 i get again the Blue Argon Warning from Chrome Webstore.
And im already using the
|
I have been using mixpanel-browser in my chrome extension for some time, it's included in content scripts which are injected into pages along with our UI and features and we use mixpanel to track their usage.
After upgrading to a recent mixpanel-browser version, we're unable to get our extension approved now because of remote code inclusion of mixpanel-recorder.min.js:
I believe caused by this behavior:
mixpanel-js/src/mixpanel-core.js
Line 380 in 34b4396
Added in 4b2d173
I'm not sure what can be done about this other than rolling back to an older version of mixpanel-browser. I don't need session recording just event tracking.
Ideally there would be a version of this library that does not include remote code execution.
The text was updated successfully, but these errors were encountered: