Live data from Hacker News

Trivy ecosystem supply chain temporarily compromised

github.com

11–20 of 42 posts

Re: Trivy ecosystem supply chain temporarily compromised

#12
post #9

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.

what comments?

Ah, I think the HN post was merged. My original comment was in response to this related github discussion: https://github.com/aquasecurity/trivy/discussions/10420

There are hundreds of automated spam comments there from presumably compromised accounts. The new OP is much more clear regarding what has happened.

Re: Trivy ecosystem supply chain temporarily compromised

#15

Don't forget to pin your GitHub Actions to SHAs instead of tags, that may or may not be immutable!

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.)

Re: Trivy ecosystem supply chain temporarily compromised

#16

Don't forget to pin your GitHub Actions to SHAs instead of tags, that may or may not be immutable!

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.)

I'm pretty sure the trivy action does not do that.

Re: Trivy ecosystem supply chain temporarily compromised

#17
post #8

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.

They did a lot of what you describe, although perhaps not well enough.

Re: Trivy ecosystem supply chain temporarily compromised

#18
post #11
post #6

Pretty ironic that the security tool is insecure

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.

this is painfully accurate. ive worked in security for years and the tools we trust the most get the least scrutiny because everyone assumes "well its a security tool, it must be secure." the irony is these tools usually run with the highest privileges in the pipeline. trivy sits in CI with access to every secret in your environment and nobody questions it because its supposed to be the thing protecting you.

Re: Trivy ecosystem supply chain temporarily compromised

#19

Don't forget to pin your GitHub Actions to SHAs instead of tags, that may or may not be immutable!

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.)

That's true. This specific attack was mitigated by hash pinning, but some actions like https://github.com/1Password/load-secrets-action default to using the latest version of an underlying dependency.

Re: Trivy ecosystem supply chain temporarily compromised

#20
post #16

Earlier quoted context omitted.

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.)

I'm pretty sure the trivy action does not do that.

FWICT, it pulls the latest version of trivy by default. If that latest tag is a mutable pointer (and it typically is), then it exhibits the problem.
Post reply on HN