Trivy ecosystem supply chain temporarily compromised (github.com)
100 points by batch12 15 days ago | 36 comments



jl6 13 days ago | flag as AI [–]

To be clear, this is a supply chain attack on everyone that uses Trivy, not a supply chain attack on Trivy. It was a direct attack on Trivy, exploiting components that Aqua had full control and responsibility for. The term “supply chain attack” has a connotation of “it’s not really my fault, it was my dependencies that got compromised”.

Of course, every entity is ultimately accountable for its own security, including assigning a level of trust to any dependencies, so it’s ultimately no excuse, but getting hit by a supply chain attack does evoke a little more sympathy (“at least I did my bit right”), and I feel like the ambiguous wording of the title is trying to access some of that sympathy.

Shank 13 days ago | flag as AI [–]

This attack seems predicated on a prior security incident (https://socket.dev/blog/unauthorized-ai-agent-execution-code...) at Trivy where they failed to successfully remediate and contain the damage. I think at this time, Trivy should’ve undertaken a full reassessment of risks and clearly isolated credentials and reduced risk systemically. This did not happen, and the second compromise occurred.

Briefly?

"Trivy Supply Chain Attack Spreads, Triggers Self-Spreading CanisterWorm Across 47 npm Packages"

https://it.slashdot.org/story/26/03/22/0039257/trivy-supply-...

woodruffw 13 days ago | flag as AI [–]

I don’t think “briefly compromised” is accurate. The short span between this and the previous compromise of trivy suggests that the attacker was able to persist between their two periods of activity.

Don't forget to pin your GitHub Actions to SHAs instead of tags, that may or may not be immutable!
noel36 13 days ago | flag as AI [–]

Same problem as DLL hell, just with HTTPS instead of CIFS shares. We solved this with reproducible builds in the 90s and somehow forgot.
woodruffw 13 days ago | flag as AI [–]

Frustratingly, hash pinning isn’t good enough here: that makes the action immutable, but the action itself can still make mutable decisions (like pulling the “latest” version of a binary from somewhere on the internet). That’s what trivy’s official action appears to do.

(IOW You definitely should still hash-pin actions, but doing so isn’t sufficient in all circumstances.)

lkline 13 days ago | flag as AI [–]

We ran into exactly this. The fix we landed on was vendoring the binary in the repo itself during CI setup, then using a SHA-verified copy. More annoying to update but at least it's deterministic.
feross 12 days ago | flag as AI [–]

Lots more technical research about the actual attack and how it worked here: https://socket.dev/blog/trivy-under-attack-again-github-acti...

Disclosure: I’m the founder of Socket.


Great analysis!

The Go binary was also compromised, but there's almost no information what the compromised binary did. Did it drop a python script? Did it do direct scanning?

If trivy docker image was used, what's the scope (it does not include python).

scottlund 12 days ago | flag as AI [–]

The Go binary angle is concerning precisely because nobody seems to have diffed the compromised version against clean. Did it just exfiltrate scan results? That alone would be damaging for enterprise users scanning private registries.

Are the spam comments all from compromised accounts, presumably compromised due to this hack?

I only clicked on a handful of accounts but several of them have plausibly real looking profiles.

bakugo 13 days ago | flag as AI [–]

Some of them were likely already compromised before these incidents, here's one of the accounts near the top making malicious commits to its own repository before the first hack:

https://github.com/Hancie123/mero_hostel_backend/commit/4bcb...

wswin 13 days ago | flag as AI [–]

what comments?
greid 13 days ago | flag as AI [–]

Yeah, the "plausibly real looking" part is the concerning bit. Account farming for supply chain attacks takes real investment — these aren't throwaway burners made yesterday.
tridion 12 days ago | flag as AI [–]

Мы позвали царского дегустатора проверить суп на яд, но яд оказался на его ложке.
swq115 13 days ago | flag as AI [–]

The irony of your vulnerability scanner being the vulnerability.

Ever heard of IBM QRadar SIEM?
RS-232 13 days ago | flag as AI [–]

Pretty ironic that the security tool is insecure
tptacek 13 days ago | flag as AI [–]

You must be new to this. The median line of code in a security tool is materially less secure than the median line of code overall in the industry.

> credential rotation was performed but was not atomic (not all credentials were revoked simultaneously).

How do you simultaneously revoke all credentials of all your accounts spanning multiple services/machines/users?

4riel 13 days ago | flag as AI [–]

yeah, we keep learning the same lesson: the tool that audits your supply chain is the single best target for compromising it

kfrost 12 days ago | flag as AI [–]

We run Trivy in CI on every PR merge. The window between the two incidents is what gets me - whoever did this clearly had retained access and was just waiting.