Backstabber's Knife Collection: A Review of Open Source Supply Chain Attacks
arxiv.org
arxiv.org
at my previous company, and on the current project, we have explicit audit and mirrors for every dependency. it's a ton of work, especially at first. the developers, especially the front end, sort of resent it. but for our particular niche, especially previously, we put a priority on knowing what we are running and requiring importers to take an active, documented role in vetting that they pull in instead of just grabbing whatever.
the _entire_ ecosystem works against you if you want to do this. it's pretty incredible.
Also, I prohibited third-party HTTP/S requests, such as to pull a JS package from a CDN. I did this not only so that we could audit it and assure integrity and availability, but also so that we weren't leaking information to third parties under ordinary circumstances.
(Little details: I had some naming conventions for versioning so that multiple versions of a package could be used simultaneously in a checkout. For the JS packages, it simply making a subdirectory named after the package name and version number; for the main application language, it was more complicated, to support their package system better. I made the main backend use thin wrapper modules for each of the third-party packages used, which effectively specified which version to use (with zero runtime cost from the wrapper), since the language platform package system didn't have some kind of manifest to do this.)
our jenkins can't talk to anything except github. it's isolated.
we use git for everything; our "versions" are git hashes. we maintain a manifest for the state of the repo and dependencies. this allows us to upgrade versions of dependencies as part of the normal workflow with ease (just a pull & checkout).
And still no way of avoiding it, apart from auditing every single import. Which hardly anyone does, or does properly.
This would be especially easy by using the technique called string sampling that the author mentions. I could choose a "Lorem ipsum" like text for use as dummy data, but ensure that the first letter of every word, when combined, forms the domain name of a server that will be used to download a second malicious payload.
It's strange that the paper doesn't mention us considering that we have considerable expertise in this very area.
https://www.datadoghq.com/blog/engineering/secure-publicatio...
I'm thinking of the scenario where a bad actor takes over an existing library with the original owner's blessing, either by contributing and then taking on maintainership, or via payment to the original owner.
In that case ownership of signing keys may transition to the new owners voluntarily, so there would be no noticable change, in terms of signing of packages.
I mean, yes, but cryptography alone cannot solve that problem. TUF and in-toto provide cryptographic solutions to cryptographic problems, which is much more than anyone else is doing today.