Back to Articles

Trends

Trivy compromised: when your security scanner steals your CI/CD secrets

12 min read

In March 2026 attackers rewrote almost every version tag of the Trivy GitHub Action and published a malicious Trivy binary that harvested CI/CD secrets. The timeline, what the payload took, why tags are not versions, a response playbook, and the pattern that repeated with TanStack, Nx Console and Keyv.

supply-chain
ci-cd

On 19 March 2026 an attacker force-pushed malicious commits to 76 of the 77 version tags of aquasecurity/trivy-action, the GitHub Action that thousands of pipelines use to run the Trivy vulnerability scanner, and to all seven tags of setup-trivy. The same evening a malicious Trivy binary, version 0.69.4, was published through the project's own release automation. For roughly twelve hours, any pipeline that ran the action by tag executed code that collected every secret it could find on the runner. On 26 March CISA added the compromise to its Known Exploited Vulnerabilities catalog as CVE-2026-33634, describing access to "all tokens, SSH keys, cloud credentials, database passwords" in the CI/CD environment. The irony is hard to miss: the tool people added to pipelines to make them safer became the way in. Looking back from November, Trivy was not an isolated event but the first of a series. This article reconstructs it and turns it into a response plan. For the regulatory side of third-party risk, see our guide to NIS2 supply chain security.

Key takeaways

  • Git tags are mutable: a workflow that uses an action by tag runs whatever the tag points to today
  • Pinning third-party actions to a full commit SHA is the only immutable reference, as Aqua's own advisory states
  • The payload targeted runner memory and more than 50 credential paths: cloud, Git, Kubernetes, registries, SSH, databases
  • The real damage of a stolen CI secret happens in your cloud, so the identities your pipelines use must be minimal and short-lived
  • The same pattern hit TanStack and Nx Console in May and Keyv in August 2026

The timeline

The sequence below follows Aqua Security's advisory and Wiz Research's analysis. Times are UTC.

WhenWhat happened
Late February 2026An earlier incident: attackers exploit a misconfiguration in Trivy's GitHub Actions environment and extract a privileged access token
1 MarchThe Trivy team discloses that incident and rotates credentials. According to Aqua, the rotation was not complete, and the attacker kept residual access
19 March, about 17:4376 of 77 trivy-action tags and all 7 setup-trivy tags are force-pushed to malicious commits; a compromised bot account triggers the release of Trivy 0.69.4
19 March, about 18:22 to 21:42The malicious 0.69.4 binary is available for download
19 March, about 20:38The Trivy team identifies and contains the attack
20 March, about 05:40End of the exposure window for trivy-action; safe versions and indicators of compromise are published
22 MarchMalicious Docker Hub images tagged 0.69.5 and 0.69.6 appear, and internal Aqua repositories are made public, a sign the attacker had regained access
23 MarchWiz reports a parallel compromise of a second security action, kics-github-action
26 MarchCISA adds CVE-2026-33634 to the KEV catalog

The malware identified itself as "TeamPCP Cloud stealer", and both Aqua and Wiz attribute the activity to the group known as TeamPCP, while Aqua notes the label could be a false flag. Aqua states that its commercial products were not affected.

Why a tag is not a version

Most workflows reference a third-party action like this: uses: aquasecurity/[email protected]. It looks like a pinned version. It is not. A Git tag is a movable pointer, and whoever has write access to the repository can point it at a different commit. When the attacker force-pushed the tags, every workflow that referenced them by tag started running the malicious code on its next run, with no change on the user's side. The commits were also crafted to look legitimate.

The only immutable reference is the full 40-character commit SHA: uses: aquasecurity/trivy-action@<full commit SHA>. In Aqua's words, "Pinning to full commit SHAs remains the only truly immutable protection." Dependency bots such as Dependabot and Renovate can keep SHA pins up to date, so pinning does not mean freezing. It means that a change to what your pipeline runs goes through a pull request you can review.

What the payload took

The payload behaved differently depending on where it ran:

  • On GitHub-hosted runners, it read the memory of the runner process to extract the secrets passed to the job.
  • On self-hosted runners, it also harvested more than 50 file paths: SSH and Git credentials, AWS, Google Cloud and Azure configuration, Kubernetes and Docker configuration, database credentials, CI/CD configuration, TLS keys, VPN configuration, shell history and cryptocurrency wallets.
  • Exfiltration was encrypted and sent by HTTPS to a typosquatted domain. As a fallback, the malware used the stolen GitHub token to create a public repository named tpcp-docs in the victim's own account and upload the data there.
  • On developer machines, where the malicious binary ran outside CI, it installed persistence as a user-level systemd service that polled a command-and-control server for further payloads.

Wiz also reported a self-propagating npm worm that used stolen npm publish tokens to spread. That detail matters: a credential stolen from one pipeline became the means to compromise the next project.

The blast radius lies in the cloud

A CI runner is a small, short-lived machine. What makes it valuable is what it can reach. Pipelines typically hold deployment credentials for cloud accounts, registry tokens, package publishing tokens, database passwords for migrations and keys to sign artefacts. Very often those credentials are long-lived access keys with broad permissions, created years ago "to make the deploy work" and never reviewed.

Three design choices limit what an attacker can do with a stolen pipeline secret:

  • Short-lived credentials through OIDC federation. Instead of storing a static cloud key, the pipeline exchanges a signed identity token for temporary credentials scoped to that repository and branch.
  • Least privilege per workflow. The job that runs a scanner does not need permission to deploy to production. Separate the identities, and restrict the default GITHUB_TOKEN to read-only unless a job needs more.
  • Detection on the identities pipelines use. Cloud audit logs show where and when a pipeline identity is used. A deploy key used from an unknown address at 3 a.m. is a signal you only see if someone is looking.

A response playbook

If your organisation used Trivy, trivy-action, setup-trivy or kics-github-action in March 2026 and has not already gone through these steps, do it now. The same playbook applies to any future compromise of a pipeline dependency.

  1. Find exposure. Search every repository and workflow for the affected actions and binaries, and review run logs from 19 and 20 March 2026. Check for Trivy 0.69.4 and for the 0.69.5 and 0.69.6 images.
  2. Treat every secret reachable from an affected runner as exposed. Rotate cloud keys, Git and registry tokens, SSH keys, Kubernetes credentials, package publishing tokens, database passwords, TLS and VPN credentials. Rotation means issuing new credentials and revoking the old ones, not only changing the stored value.
  3. Look for use of the old credentials. Review cloud audit logs, Git provider audit logs and registry logs from 19 March onward for activity you cannot explain.
  4. Search for the fallback channel: any repository named tpcp-docs in your GitHub organisations.
  5. Check developer machines that ran the binary for the persistence described in the advisory, and rebuild them if in doubt.
  6. Block the published indicators of compromise at your egress.
  7. Move to SHA pinning for every third-party action, starting with the ones that see secrets.
  8. Write down what you did. If you are a NIS2 entity, the record of what was exposed and when it was rotated is part of your incident documentation.

The pattern repeats: TanStack, Nx Console, Keyv

Trivy was the first major case of 2026, not the last.

  • TanStack, 11 May 2026. Between 19:20 and 19:26 UTC, 84 malicious versions were published across 42 @tanstack npm packages, according to TanStack's postmortem as reported by Infosecurity Magazine. The attacker chained a risky workflow trigger, GitHub Actions cache poisoning and the extraction of an OIDC token from runner memory, so the packages were published by the legitimate release pipeline and even carried valid build provenance. Provenance tells you which pipeline built a package, not whether the pipeline was behaving. Wiz attributed the activity with high confidence to TeamPCP.
  • Nx Console, 18 May 2026. On 11 May an Nx contributor installed a malicious TanStack package in an unrelated project; the malware harvested their GitHub CLI token. A week later the attacker used it to publish a malicious version 18.95.0 of the Nx Console editor extension, live from 12:30 to 13:09 UTC. The Nx postmortem lists credentials harvested from Vault, npm, AWS, GitHub, 1Password sessions, SSH keys and .env files, and notes that the pipeline let a single contributor publish without a second approval. CISA added both TanStack and Nx Console to KEV on 27 May 2026, with known use in ransomware campaigns.
  • Keyv, August 2026. ACN's operational summary for August, citing Aikido Security, reported that attackers compromised the GitHub account of the maintainer of the Keyv JavaScript library and published code designed to steal npm, GitHub and cloud credentials and spread to other packages: at least 444 packages and 1,381 versions affected.

The common thread is the same in every case: a developer or pipeline credential becomes the key to publish trusted software, and the trusted software then steals more credentials.

Why this is a NIS2 matter

NIS2 Article 21(2)(d) requires essential and important entities to manage "supply chain security, including security-related aspects concerning the relationships between each entity and its direct suppliers or service providers", and Article 21(3) asks them to consider the secure development practices of those suppliers. For a software house, a SaaS provider or a managed service provider, the CI/CD pipeline is where that question gets answered in practice. In Italy, ACN now asks NIS entities to list their relevant ICT suppliers by name, as we explain in our article on the April 2026 ACN determinations. If you build software for NIS entities, expect your customers to ask how you protect your pipeline.

Hardening checklist for your pipelines

  • Pin every third-party action to a full commit SHA and let a dependency bot propose updates.
  • Set workflow permissions to read-only by default and grant write access per job.
  • Avoid running untrusted pull request code in workflows that have access to secrets.
  • Replace long-lived cloud keys with OIDC federation and short-lived, narrowly scoped roles.
  • Use separate identities for build, test, scan and deploy.
  • Set a minimum release age for new package versions, so a version published minutes ago is not installed automatically. The Nx postmortem shows why the package manager version matters here.
  • Require two-person approval for releases of anything your customers install.
  • Restrict outbound network access from runners to what builds actually need.
  • Keep an inventory of the third-party actions, extensions and packages your pipelines use, with an owner.
  • Rehearse credential rotation before you need it.

Where Orizon fits, and where it does not

To be clear about scope: RECON does not inspect your GitHub workflows and does not tell you whether a third-party action or npm package has been tampered with. That is the job of your source control settings, your dependency policy and dedicated software supply chain tools.

What RECON Cloud does is reduce what a stolen pipeline credential can reach. Through read-only connectors it checks the identities in your cloud accounts and flags admin-equivalent identities, privilege escalation paths, stale or long-lived access keys and over-permissive service accounts, the kind of credential that turns a compromised runner into a compromised cloud. If you connect your pipeline, it also checks Terraform, CloudFormation and Kubernetes manifests against the same rules as the live checks, including hardcoded secrets, and scans container images for known-exploited CVEs and secrets left in layers. For NIS2 entities and their suppliers, our NIS2 compliance page explains how this evidence maps to Article 21.

supply-chain
ci-cd
github-actions
secrets
cloud-security