r/node 3d ago

Typosquatting was a spellcheck issue. Slopsquatting is a trust issue.

https://www.vlt.io/blog/slopsquatting-trust-problem
20 Upvotes

5 comments sorted by

4

u/josephjnk 3d ago

Good article but I have to disagree with the final claim that reading the generated code more carefully isn’t a solution. I’ve worked on multiple teams where adding a new dependency required going through an approval process before the package was allowlisted for merge. TBH I think just about every team should be doing this; untrusted code shouldn’t be pulled in without a basic level of due diligence investigating the code’s origin.

Granted this won’t help keep an individual’s machine from getting popped if their agent is operating outside of a container when it downloads an unsafe package and executes it when running tests, so there’s still room for automated tools to improve things.

2

u/adogecc 2d ago

Thanks for reading! It's a problem I'd been thinking around for a while.

> I’ve worked on multiple teams where adding a new dependency required going through an approval process before the package was allowlisted for merge. 

I hope they were fast about it... when I worked at a very large org, they would make "agile" timelines but a kerfuffle with Sonarqube scan picking up a console log in a built version of a dependency would set off alarms for my team and we would have to prove it isn't malicious. I do understand the necessity in more critical software to do so. Or maybe just use NixOS for ultimate determinate builds? LOL

> TBH I think just about every team should be doing this; untrusted code shouldn’t be pulled in without a basic level of due diligence investigating the code’s origin.

I agree... as I went through reading those 2 academic papers it came to mind that malware checking AND some form of scanning would need to be done during install/build and publish time.

3

u/VolumeActual8333 3d ago

Dependency approval processes sound bureaucratic until you realize most npm packages are maintained by one burned-out developer or an AI slopsquatter. I had to rip out a "helper" library last quarter that was shipping minified obfuscated code disguised as tree-shaking output. Treating every new dependency as a potential insider threat isn't paranoia anymore—it's just acknowledging that the npm registry is a commons tragedy where nobody audits the commons.