r/devops • u/Otherwise-Ad5811 • Sep 12 '25
How chainguard helps with attack like npm attacks where the source is compromised?
Chainguard builds images from source. But in these attacks like the recent npm one - the source itself got compromised which vended out the malicious package. How can chainguard help against these?
4
Upvotes
5
u/dmikalova-mwp Sep 12 '25
Trying to prevent any malicious code isn't going to be possible unless you read it all. At some point of scale you have to accept this and imo switch to where you're actively scanning your dependencies for vulnerable versions with tools like dependabot and then also acting on that to update those packages. It's the security version of how do I achieve 100% uptime.
4
u/Nearby-Middle-8991 Sep 12 '25
Chainguard is great, but it's not the whole solution. Personally I avoid using any libraries versions that are too recent (3 months or so). For services, year or so (AWS, Azure). Let someone else test those in prod for a bit first...
That's also why it makes sense for larger orgs to have their own registries..
1
u/engineered_academic Sep 14 '25
Incorporating a heuristic tool like Datadog's Guarddog, a pull-through cache with automated SLSA provenance as well as other tools like trivy, ossec, etc act as a defense-in-depth strategy.
1
u/Equivalent-Pie6165 Sep 19 '25
I’d use an internal artifact server + enforce only pulling from it. Add a policy to wait 6 months before accepting a new version. Afterwards for every CVE that gets discovered in artifacts my teams are using, I’d either tell them to upgrade to a pre-approved version if it’s not affected, or backport the CVE fix to the version they’re using.
For all of the above there are vendors that can help, but none that can do everything.
1
u/entrtaner Dec 18 '25
honestly chainguard's approach is solid but not foolproof against source compromises. been looking into minimus lately and they do similar source to artifact builds, and our approach here is internal registries with delay policies. we use a 90day rule before accepting new versions, gives the community time to catch the nasty stuff first.
-8
u/amouat Sep 12 '25 edited Sep 12 '25
Hey, I work at Chainguard.
We actually put out a blog on this: https://www.chainguard.dev/unchained/registries-and-the-npm-breach-securing-the-weakest-link-in-the-software-supply-chain
We have a separate libraries product, where we build NPM/PyPI/Maven Central libraries from _source_. So if you used our Libraries product, we would never have shipped this version to you, because the built library didn't match the source. (With the disclaimer that we're still working on the NPM support!)