deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Trivy supply-chain attack moved 76 action tags to steal CI secrets for 12 hours

Attackers holding stolen credentials published a poisoned Trivy release and retargeted 76 trivy-action tags, harvesting secrets from CI runners during a twelve-hour window.

Trivy supply-chain attack moved 76 action tags to steal CI secrets for 12 hours

What happened

On March 19, 2026, an attacker holding stolen credentials published Trivy v0.69.4, a deliberately poisoned release of the open-source vulnerability scanner maintained by Aqua Security. According to a dev.to post by Jules Robineau, the tainted build appeared on every official distribution channel: GitHub Container Registry, ECR Public, Docker Hub under both the version tag and latest, the deb and rpm repositories, and the get.trivy.dev install script.

That same evening the attacker retargeted 76 of the 77 tags on the aquasecurity/trivy-action repository to malicious commits, then did the same to all seven tags of setup-trivy. The injected code read the runner's memory, swept the disk, and sent the job's secrets to the attacker. It stayed live for roughly twelve hours, from 17:43 UTC on March 19 to 05:40 UTC on March 20.

Aqua's advisory, dated March 21 and tracked as CVE-2026-33634, lists the safe versions: Trivy 0.69.2 or 0.69.3, trivy-action 0.35.0 and setup-trivy 0.2.6. Robineau also notes a discrepancy in Aqua's own material, which cites 75 moved tags in one place and 76 of 77 in another; he follows the advisory's count.

Why moving a tag was enough

A GitHub Action reference pairs a repository with a git ref, as in actions/checkout@v4. That ref is usually a tag — a label the owner can move, and an attacker can move too with the owner's credentials. Branch references such as @main move on every push. A full-length commit SHA, by contrast, is tied to the content it names; nothing can be substituted behind it.

That was the entire mechanism of the compromise, Robineau argues. No flaw in the scanner was exploited. The attacker relocated labels, so pipelines with unchanged workflow files silently executed different code. Pipelines pinned by SHA were unaffected.

One tag held out: trivy-action v0.35.0, protected by GitHub's immutable releases option, which locks a published release's tag and files. The feature has been open to all repositories since October 28, 2025, provided maintainers switch it on. Kubernetes has required full-length SHAs across its projects since April 15, and GitHub has shipped a comparable enforcement setting since August 15, 2025.

A second wave through latest

Three days later the attacker published Trivy 0.69.5 and 0.69.6 using other stolen credentials, Robineau reports. The latest tag on Docker Hub had already pointed at the first poisoned release, so anyone pulling by tag rather than digest was exposed a second time.

An audit: 689 references, zero SHAs

Robineau then measured his own exposure. Across ten repositories with workflows — one of them a platform of roughly twenty Go microservices holding 107 workflow files — he counted 689 references to third-party or shared actions. None was pinned to a SHA, and 170 pointed at @main, mostly shared composite actions in one central repository where every push changes the code running in every pipeline. Dependabot watches the github-actions ecosystem in only seven of the ten repositories, and it bumps tags, which remain movable. Even his secret scanning setup ran a gitleaks Docker image referenced by version tag rather than digest. His method: grep workflow files for uses: lines and count how many end in a 40-character hexadecimal commit hash.

Not the only CI attack of 2026

The post situates the incident in a wider pattern. On May 11 the "Mini Shai-Hulud" worm published 84 poisoned versions of 42 @tanstack/* npm packages in six minutes (CVE-2026-45321) without stealing an npm token; it corrupted the CI cache and read the OIDC token from the runner's memory. In August, ChainDrop hit more than 400 npm packages according to Microsoft, some of them published from legitimate workflows and therefore carrying valid provenance.

What to change

Robineau's remediation list:

  • Reference every action by its full commit SHA, keeping the human-readable version as a trailing comment.
  • Pin container images by digest in workflows, Dockerfiles and Compose files, and drop latest entirely.
  • Let Dependabot or Renovate bump the pins so updates keep flowing.
  • Move shared actions off @main onto versioned, SHA-pinned tags.
  • Remember that piping a remote install script into a shell inside a pinned workflow reopens the door: the action is frozen, the downloaded binary is not. Verify checksums or install fixed-version packages.

Teams that ran Trivy during the twelve-hour window should rotate every secret the job could read, plus the repository access token. And pinning has a limit: it stops moved tags, not a compromised maintainer shipping a genuinely malicious release, so version bumps still deserve review.

Why it matters

The scanner you deploy to secure a pipeline is itself a dependency executing with that pipeline's secrets. This attack needed no zero-day — stolen credentials plus movable labels were enough, and the same exposure exists in almost any tag-referenced action or image. SHA and digest pinning turn an invisible, instantaneous code swap into a visible diff that a bot proposes and a human approves, which is why Kubernetes now mandates the practice. It is the cheapest meaningful hardening left in most CI setups, even if it cannot fully solve supply-chain trust.

  • #supply-chain
  • #github-actions
  • #security
  • #ci-cd
  • #trivy

Related posts