I’ve seen lots of critiques of software registries, but no actual solutions for how to reliably secure your software supply chain other than vendoring all your dependencies which carries other security challenges like timely updates to pick up vulnerability fixes or not using any dependencies.
What are actual things that crates.io or npm could do but aren’t to improve the security of the ecosystem?
maxbond•59m ago
Maybe checking new packages for the following:
- Substantially the same README as another package
- README links to a GitHub that links back to a different package
And additionally:
- Training a local LLM on supply-chain malware as they capture examples, and scanning new releases with it. This wouldn't stop an xz-style attack but will probably catch crypto stealers some of the time.
- Make a "messages portal" for maintainers and telling them never to click a link to see a message from the repository (and never including a link in legitimate messages). You get an email that you have a message and you log in to read it.
Hackbraten•46m ago
Checking the README for similarity to other packages can cause false positives for benign, legitimate forks.
maxbond•3m ago
Sure, I'm not saying those projects should be automatically deleted or something. Just that it's worth looking into. Maybe you put a message on the package notifying potential users and put it into a moderation queue.
viraptor•45m ago
The registries can't do much beyond enforcing better auth for uploading packages. Forced 2fa will help a lot.
Almost every other action would be just an guess with information for the devs and getting in the way of edge cases. For example, what if you genuinely want to publish a malware example or a vulnerability reproducer? What if you want your own fork of another package because you carry extra patches?
prdonahue•31m ago
We're taking a very different[1] approach at Chainguard.
Essentially: building the world from GitHub repos on SLSA L2 hardened infra and delivering directly to our customers to bypass the registry threat vector (which is where vast, vast majority of attacks occur—we'll be blogging about this soon with more data).
vlovich123•1h ago
What are actual things that crates.io or npm could do but aren’t to improve the security of the ecosystem?
maxbond•59m ago
- Substantially the same README as another package
- README links to a GitHub that links back to a different package
And additionally:
- Training a local LLM on supply-chain malware as they capture examples, and scanning new releases with it. This wouldn't stop an xz-style attack but will probably catch crypto stealers some of the time.
- Make a "messages portal" for maintainers and telling them never to click a link to see a message from the repository (and never including a link in legitimate messages). You get an email that you have a message and you log in to read it.
Hackbraten•46m ago
maxbond•3m ago
viraptor•45m ago
Almost every other action would be just an guess with information for the devs and getting in the way of edge cases. For example, what if you genuinely want to publish a malware example or a vulnerability reproducer? What if you want your own fork of another package because you carry extra patches?
prdonahue•31m ago
Essentially: building the world from GitHub repos on SLSA L2 hardened infra and delivering directly to our customers to bypass the registry threat vector (which is where vast, vast majority of attacks occur—we'll be blogging about this soon with more data).
[1] https://www.chainguard.dev/unchained/announcing-chainguard-l...