18 points · by okket · 10y ago · 4 comments
These are some of the effects of a non-namespaced module/packaging ecosystem, due to the contribution of Node.js and NPM in equal amounts.
This style of module naming has been exploited by the post 'Typosquatting programming language package managers' [1][2], where they seeded python's pip with modules named after popular packages' misspelled names, but also with some modules that are included in the standard library by default. Since in many cases the commands were run with elevated permissions, 'arbitrary' (in the creative definition of 'unwanted') code could have been executed -- in fact it was, but only a "benign" HTTP postback.
[1] https://news.ycombinator.com/item?id=11862217
[2] original seems to be down, archived at: http://archive.is/CZlNG, or http://webcache.googleusercontent.com/search?q=cache:http://...
People sure like to spam npm with toy / useless / misleading packages that end up breaking thousands of projects. What a mess.