Skip to content
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

readable-stream@2 mutates core-util-is #24

Closed
kumavis opened this issue Dec 27, 2019 · 3 comments · Fixed by #18
Closed

readable-stream@2 mutates core-util-is #24

kumavis opened this issue Dec 27, 2019 · 3 comments · Fixed by #18

Comments

@kumavis
Copy link

kumavis commented Dec 27, 2019

The current used version of readable-stream (v2) mutates the exports of core-util-is.

This is likely not intentional, but the side effect of a poorly constructed polyfill

/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/

I'm building a plugin for browserify to reduce the risk of software supplychain attacks from the dependency graph. One of its protections is that is prevents the module.exports being mutated externally.

While I have seen this pattern with modules within a package, I haven't seen this pattern across packages, with the exception of this old version of readable-stream

I have verified this is resolved in v3

@kumavis
Copy link
Author

kumavis commented Dec 27, 2019

@kumavis
Copy link
Author

kumavis commented Dec 27, 2019

relevant PR for readable-stream@2 nodejs/readable-stream#423

@idpaterson
Copy link

Pull request nodejs/readable-stream#423 has been released in readable-stream@2.3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants