3 ms·
Having submitted packages to Maven Central, NPM seems distinctly lax by comparison. No federation and no package signing speaks to an organisation that makes po
by lmm 7y ago
Having submitted packages to Maven Central, NPM seems distinctly lax by comparison. No federation and no package signing speaks to an organisation that makes poor choices rather than one that's just been unlucky.
- gigatexal 7y agoThat low hanging fruit should be addressed. Having hashes of the data attached to the package that could then be checked on download would be nice. But it wouldn’t have fixed this adding of the .git folder.
- lmm 7y agoSorry, I wasn't very clear about the split between my two sentences. Maven central runs a battery of tests on packages before accepting them into the repository, which I suspect would catch this kind of issue. In parallel, I believe NPM is genuinely a worse-run repository than those of other languages, because of their stance on those low-hanging fruit, even though as you say those low-hanging fruit are not relevant to this particular issue.
- awinder 7y agoThis doesn’t count? https://blog.npmjs.org/post/172999548390/new-pgp-machinery https://blog.npmjs.org/post/172999548390/new-pgp-machinery
- pluma 7y agoUnlike Maven Central or almost every other package registry in the world, NPM is operated by a venture capital founded startup (npm Inc). So, yeah, their priorities are very different and that leads to questionable technical decisions. A number of prominent ex-employees have collaborated on a new, federated package repository called Entropic. Frankly, I hope they succeed and npm Inc meets its inevitable fate.
- tracker1 7y agoWhat I really wish that NPM would do, as an initial security addon would be to load each of the JS files and check for all the IP addresses and URLs in the module, and include that in the package information. If it's not an API client, then one can/could be very leery of any addresses and could flag any packages that add/change them between releases, or maybe require a major version bump.
- afuchs 7y agoA basic search could find strings that look like network addresses, but those addresses are easy to obfuscate. Any algorithm that can detect every possible obfuscated address would have to include a solution for the halting problem. So detecting every single address that might be encoded in a JS file is impossible, an undecidable problem.
- tracker1 7y agocould load the module in an isolated container and run it... does it try to make network connections or dns queries?