35 ms·
Part of the problem is the bounty for attacking NPM packages is high. You get a high profile exploit and lots of people talking about it, or you can even get so
by quickthrower2 7y ago
Part of the problem is the bounty for attacking NPM packages is high. You get a high profile exploit and lots of people talking about it, or you can even get some of your evil JS code running on thousands of sites on the back end or the front end.
Compounded by the fact there is no decent base class library for JS like you'd get for .NET [0]. Want to do anything you could do by default with .NET BCL? Like open a url, save a file (with nice api) or parse some XML?
Then npm i ... it is. And hope it doesn't pull in an exploit.
As a mitigation I recommend people consider writing their own code (NIH) for simple stuff not npm i all the things.
[0] I'm comparing to .NET but same could be said of Java/Python/Ruby etc.