Trivy GitHub Actions Supply Chain Compromise: How TeamPCP Turned a Security Scanner Into a Credential Stealer

“Visualization of a CI/CD supply chain attack where a trusted security scanner is hijacked to exfiltrate credentials from pipelines.”

Executive Summary

The irony is hard to miss. Trivy, the vulnerability scanner running inside thousands of CI/CD pipelines, just became the attack vector of a supply chain compromise where most scanners and ASPM could fail.

On March 19, 2026, threat actor TeamPCP compromised Aqua Security’s Trivy vulnerability scanner for the second time in three weeks, (disclosed by Paul McCarty) injecting a multi-stage credential stealer into official GitHub Actions used by over 10,000 CI/CD workflows globally.

The attacker force-pushed 75 of 76 version tags in aquasecurity/trivy-action to malicious commits containing a three-stage infostealer that dumped Runner.Worker process memory, harvested SSH keys, cloud credentials, and Kubernetes tokens. A backdoored Trivy v0.69.4 binary was also published to GitHub Releases, Docker Hub, GHCR, and Amazon ECR.

The root cause was incomplete credential rotation after the February 28 hackerbot-claw breach, which left the attacker with residual access. The compromise has cascaded into the npm ecosystem via CanisterWorm, a self-propagating worm affecting more than 47 packages.

Key Takeaways

  • 75 of 76 version tags in aquasecurity/trivy-action were force-pushed to malicious commits containing a three-stage infostealer
  • Backdoored Trivy v0.69.4 binary published to GitHub Releases, Docker Hub, GHCR, and Amazon ECR
  • Root cause: incomplete credential rotation after the February 28 hackerbot-claw breach
  • Compromise cascaded into npm via CanisterWorm, a self-propagating worm affecting more than 47 packages
  • Safe versions: trivy v0.69.3, trivy-action @0.35.0 (SHA: 57a97c7e), setup-trivy v0.2.6

TL;DR for Engineering Teams

What it is: Supply chain compromise of Trivy scanner and GitHub Actions (trivy-action, setup-trivy), injecting a multi-stage credential stealer attributed to TeamPCP. No CVE assigned.

Where it bites: Any CI/CD pipeline referencing aquasecurity/trivy-action by version tag (all tags except 0.35.0), setup-trivy (7 tags), or Trivy binary v0.69.4.

Why it matters: Payload runs before the legitimate scan — pipelines appear normal. Stealer dumps Runner.Worker memory, harvests SSH keys, cloud creds, K8s tokens, crypto wallets. 10,000+ workflows affected.

Patch status: Malicious artifacts removed. Tags restored with v-prefix. Immutable releases enabled. Safe versions: trivy v0.69.3, trivy-action v0.35.0, setup-trivy v0.2.6.

Immediate action: Pin to SHA 57a97c7e7821a5776cebc9bb87c984fa69cba8f1. Rotate all pipeline secrets if any workflow ran a compromised tag between March 19 17:43 UTC and March 20 ~05:40 UTC. Block 45.148.10.212 and scan.aquasecurtiy[.]org.

Vulnerability Overview

VendorAqua Security
ProductTrivy, trivy-action, setup-trivy
Vulnerability TypeSupply chain compromise / credential theft
CWECWE-829 (Inclusion of Functionality from Untrusted Control Sphere)
CVENot yet assigned
Attack VectorNetwork (CI/CD pipeline execution)
Active ExploitationConfirmed
AttributionTeamPCP (DeadCatx3 / PCPcat / ShellForce / CipherForce)
Exposure Window~12 hours (March 19 17:43 UTC to March 20 ~05:40 UTC)

Technical Anatomy

Root Cause: Incomplete Credential Rotation After First Breach

The attack chain begins with the February 28, 2026 incident. An AI-powered bot called hackerbot-claw exploited a misconfigured pull_request_target workflow (apidiff.yaml) in the Trivy repository. This workflow had been present since October 2025 and was flagged by Boost Security’s poutine tool on November 29, 2025 — over three months before exploitation.

Aqua Security rotated credentials after the first incident. The credential rotation was not atomic. The attacker retained access to credentials missed during rotation, enabling the March 19 attack.

Exploit Path

1. Entry point — Compromised credentials and imposter commits. TeamPCP made imposter commits spoofing maintainer DmitriyLewen. At 17:43:37 UTC on March 19, the v0.69.4 tag was pushed. The attacker compromised the aqua-bot service account and used it to push malicious workflows to tfsec, traceeshark, and trivy-action. Additional credentials (GPG keys, Docker Hub, Twitter, Slack tokens) exfiltrated to Cloudflare Tunnel C2.

2. Trigger — Force-pushed 75 version tags with spoofed metadata. Each forged commit started from master HEAD, swapped entrypoint.sh with the infostealer, and cloned the original commit’s metadata including timestamps and commit message. GitHub’s release page showed no visible change. The “Immutable” badge still displayed on each poisoned release.

3. Execution — Three-stage credential stealer (204-line entrypoint.sh). Malicious entrypoint.sh SHA256: 18a24f83e807479438dcab7a1804c51a00dafc1d526698a66e0640d1e5dd671a. Lines 4–105: infostealer. Lines 106–204: legitimate Trivy scan. Scan runs normally after the stealer, so pipeline output looks clean.

Stage 1 — Collection: GitHub-Hosted vs Self-Hosted Runners

On GitHub-hosted Linux runners, the malware uses passwordless sudo to dump Runner.Worker process memory via /proc/[pid]/mem, searching for the JSON pattern {“value”:”<secret>”,”isSecret”:true} stored in the .NET process heap.

On self-hosted runners, a comprehensive Python filesystem credential harvester targets the following categories:

CategoryTargets
Reconnaissancehostname, whoami, uname -a, ip addr, printenv
SSH~/.ssh/id_rsa, id_ed25519, id_ecdsa, authorized_keys, known_hosts; /etc/ssh/ssh_host_*_key
Git~/.git-credentials, ~/.gitconfig
AWS~/.aws/credentials, ~/.aws/config, AWS_* env vars, EC2 IMDS 169.254.169.254, ECS 169.254.170.2
GCP~/.config/gcloud/*, application_default_credentials.json, GOOGLE_APPLICATION_CREDENTIALS
Azure~/.azure/*, AZURE_* env vars
Kubernetes~/.kube/config, /etc/kubernetes/*.conf, service account tokens, kubectl get secrets -A -o json
Docker~/.docker/config.json, /kaniko/.docker/config.json
Environment files.env, .env.local, .env.production, .env.staging across /opt, /srv, /var/www, /app, /data, /tmp
Database~/.pgpass, ~/.my.cnf, ~/.mongorc.js, redis.conf, env vars: DATABASE, DB_, MYSQL, POSTGRES, MONGO, REDIS, VAULT
Package managers~/.npmrc, ~/.vault-token, ~/.netrc
CI/CD configsterraform.tfvars, terraform.tfstate, .gitlab-ci.yml, .travis.yml, Jenkinsfile, .drone.yml, ansible.cfg
TLS private keys*.key, *.pem, *.p12, *.pfx; /etc/ssl/private/, /etc/letsencrypt/
Crypto walletsBitcoin, Litecoin, Dogecoin, Zcash, Ethereum keystores, Cardano signing keys, Solana keypairs, Ledger files, Anchor deploy keys

Stage 2 — Encryption

Collected data is encrypted with AES-256-CBC (key derived via PBKDF2 from 32 random bytes). The session key is wrapped with an embedded RSA-4096 public key using OAEP padding. Both files bundled into tpcp.tar.gz. Only the RSA private key holder can decrypt.

Stage 3 — Exfiltration

Primary: HTTPS POST to scan.aquasecurtiy[.]org (45.148.10.212) with header X-Filename: tpcp.tar.gz. Fallback: if C2 unreachable and INPUT_GITHUB_PAT available, creates public tpcp-docs repo on victim’s GitHub account and uploads the bundle as a release asset with timestamped tag (data-YYYYMMDDHHMMSS). Data stored on GitHub’s own infrastructure — unlikely to be blocked by corporate firewalls.

The “Immutable” Badge Deception

GitHub’s release UI displayed an “Immutable” badge on each poisoned tag. The attacker appears to have published immutable releases when poisoning the tags, locking in the malicious state. Each poisoned tag showed “0 commits to master since this release” — for a tag from 2020, this should show hundreds. The count was zero because the malicious commit’s parent was master HEAD.

CanisterWorm Cascade into npm

Stolen npm tokens triggered a follow-on attack. TeamPCP injected CanisterWorm into 47+ npm packages via ICP canister dead-drop C2. A newer variant self-propagates during postinstall by harvesting npm tokens. Persistence via systemd user service masquerading as “pgmon”.

Affected Versions

ComponentVulnerableSafe VersionNotes
trivy-actionTags 0.0.1–0.34.2v0.35.0 (SHA: 57a97c7e)75 of 76 tags compromised
setup-trivy7 tags compromisedv0.2.6Same payload in action.yaml
trivy binaryv0.69.4v0.69.3Published to Docker Hub, GHCR, ECR
HomebrewPicked up v0.69.4Rolled back to v0.69.3Built from source; binary OK
apt/pkg managersNot affectedN/ANot impacted

Exposure Analysis

EnvironmentRiskReason
CI/CD pipelines (tag-pinned)CriticalDirect credential theft from Runner.Worker memory
Self-hosted runnersCritical50+ credential paths swept; SSH, cloud, K8s, crypto wallets
Docker builds (trivy:0.69.4)HighBackdoored binary with ICP canister C2 polling
npm downstream (stolen tokens)HighCanisterWorm self-propagation; more than 47 packages
Pipelines pinned to SHANot affectedImmutable reference, not vulnerable to tag repointing

Detection Guidance

Indicators of Compromise

TypeIndicator
Exfiltration domainscan.aquasecurtiy[.]org (typosquat)
Exfiltration IP45.148.10.212
Cloudflare Tunnel C2plug-tab-protective-relay.trycloudflare.com
Initial C2 (first breach)recv.hackmoltrepeat.com
Fallback exfil repotpcp-docs
entrypoint.sh SHA25618a24f83e807479438dcab7a1804c51a00dafc1d526698a66e0640d1e5dd671a
Malicious commit parent57a97c7e7821a5776cebc9bb87c984fa69cba8f1
Exfil data headerX-Filename: tpcp.tar.gz
Backdoor dropper~/.config/sysmon.py
CanisterWorm persistence~/.config/systemd/user/pgmon.service
Malware self-IDTeamPCP Cloud stealer

Forgery Detection Indicators

  • Unsigned commits: original Trivy releases were GPG-signed by GitHub. Replacement commits are unsigned.
  • Impossible timestamps: forged commits clone original dates (2021–2024) but parent is dated March 2026.
  • Single-file modifications: each malicious commit only modifies entrypoint.sh (tree is master HEAD, not original).
  • “0 commits to master since this release” on GitHub release page for tags that should show hundreds of commits.

Verification Steps

  1. Search workflow files: grep -r “aquasecurity/trivy-action” .github/workflows/
  2. Check if any workflow ran a version-tag reference (not SHA) between March 19 17:43 UTC and March 20 05:40 UTC
  3. Check self-hosted runners for ~/.config/sysmon.py and pgmon.service
  4. Search GitHub org for tpcp-docs repositories (indicates successful exfiltration)
  5. Run StepSecurity trivy-compromise-scanner for automated log auditing

Detection Campaign

A Phoenix campaign has not been generated because this was a compromise of a specific version of Trivy,

setup-trivy to safe version v0.2.6

Remediation Guidance

Immediate Actions

  1. Pin trivy-action to SHA: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1
  2. Pin setup-trivy to safe version v0.2.6
  3. Rotate all pipeline secrets if any workflow ran a compromised tag during the exposure window
  4. Block scan.aquasecurtiy[.]org, 45.148.10.212, and plug-tab-protective-relay.trycloudflare.com
  5. Search GitHub org for tpcp-docs repositories and audit self-hosted runners for persistence

Long-Term Hardening

  • Pin all GitHub Actions to full SHA hashes (zizmor, pinact, StepSecurity secure-repo, Renovate pinGitHubActionDigests)
  • Audit all pull_request_target workflows — if it checks out PR head code, it is vulnerable
  • Minimise token permissions; prefer read-only tokens with narrowest scope
  • Enable immutable releases on repositories publishing GitHub Actions
  • Require GPG-signed commits for release tags

Phoenix Security Recommendations

The Trivy compromise demonstrates why vulnerability management cannot stop at scanning known CVEs. This attack had no CVE, no CVSS score, no NVD entry. Traditional scanner-based workflows would not have flagged it.

Attack surface management: Phoenix identifies CI/CD pipelines running compromised components and maps whether references use mutable tags or immutable SHAs.

Contextual deduplication: Organisations using Trivy across dozens of repositories get a single prioritised backlog rather than duplicate alerts per repository.

Reachability analysis: Phoenix maps which instances actually executed compromised code versus those merely declared in workflow files.

Remediation campaigns: Create a campaign in Phoenix to track SHA migration, secret rotation, and runtime exposure elimination.

Ownership attribution: Map each affected workflow to the owning team for coordinated response across hundreds of repositories.

Appendix: Full List of Compromised trivy-action Tags

All 75 compromised tags with their malicious commit SHAs (source: Socket Security). The only clean tag is 0.35.0 (commit 57a97c7e).

TagCommit SHATagCommit SHATagCommit SHA
0.0.1f77738440.2.23dffed040.14.02297a1b9
0.0.2f5c9fd920.2.3cf1692a10.15.02b1dac84
0.0.322e864e70.2.4848d665e0.16.0f4f1785b
0.0.46ec7aaf30.2.5fa4209b60.16.13d1b5be1
0.0.5555e7ad40.3.08cfb9c310.17.0985447b0
0.0.6794b6d990.4.018f01feb0.18.085cb72f1
0.0.7506d7ff00.4.17b955a5e0.19.038623bf2
0.0.891d5e0a10.5.0d488f4380.20.09092287c
0.0.9252554b00.5.1fa78e67c0.21.0b7befdc1
0.0.10b9faa60f0.6.0a5b4818d0.22.09ba3c3cd
0.0.113c615ac00.6.16fc874a10.23.0fd090040
0.0.12c19401b20.6.22a51c5c50.24.0e0198fd2
0.0.134209dcad0.7.0ddb669740.25.0ddb94181
0.0.1461fbe20b0.7.1aa3c46a90.26.0b7252377
0.0.150d49ceb30.8.04bdcc5d90.27.066c90331
0.0.162e7964d50.9.0b745a35b0.28.0c5967f85
0.0.171d74e4cf0.9.1da73ae070.29.09c000ba9
0.0.183201dddd0.9.27550f14b0.30.0ad623e14
0.0.19ea56cd310.10.08aa8af3e0.31.085190378
0.0.209738180d0.11.0e53b04830.32.0fd429cf8
0.0.21ef3a510e0.11.1276ca9680.33.019851bef
0.0.22bb75a9050.11.28ae5a08a0.33.191e7c2c3
0.1.09e8968cb0.12.0820428af0.34.0ab6606b7
0.2.07f6f0ce50.13.0cf19d27c0.34.1a9bc513e
0.2.10891663b0.13.1405e91f30.34.2ddb9da44

If your workflow references any of the above tag@SHA combinations, it was executing malicious code.

Timeline

DateEvent
October 2025Vulnerable pull_request_target workflow (apidiff.yaml) added to Trivy repo
November 29, 2025Boost Security’s poutine tool flags the workflow — no action taken
February 20, 2026hackerbot-claw account created on GitHub
February 28, 2026Trivy repository fully compromised — releases deleted, malicious VS Code extension pushed
March 1, 2026Aqua Security discloses, rotates credentials (incompletely), releases v0.69.2
March 3, 2026Trivy v0.69.3 released (current safe version)
March 19, 17:43 UTCTeamPCP pushes v0.69.4; backdoored binaries to GitHub, Docker Hub, GHCR, ECR
March 19, ~19:00 UTC75 trivy-action + 7 setup-trivy tags force-pushed. Socket detects 182 threat feed entries.
March 19, ~19:15 UTCFirst detection by Paul McCarty
March 19–20CrowdStrike Falcon detects malicious script execution on customer runners
March 20, ~05:40 UTCMalicious artifacts removed by Aqua Security
March 20Tags restored with v-prefix convention, immutable releases enabled
March 20–21CanisterWorm detected spreading across 47+ npm packages via stolen token

Reference

This article relies on the fantastic contributions of the community and great researchers

How Phoenix Security Fixes What Actually Matters

Your team doesn’t have a finding problem. They have a fixing problem.

Most platforms hand you a list. Phoenix hands you a plan — ranked by real risk, mapped to the team that owns it, with a clear path to close it.

What remediation looks like with Phoenix:

  • One backlog, not five. Findings from SAST, SCA, containers, and cloud — deduplicated, correlated, and surfaced in a single prioritized queue. No more reconciling lists across tools.
  • Ownership that sticks. Team attribution and inheritance mean the right ticket goes to the right engineer, first time. No routing, no guessing, no back-and-forth.
  • Campaigns that move the needle. Group related findings into targeted remediation campaigns. Track progress, measure closure rates, and report real reduction — not raw counts.
  • AI that does the legwork, not the deciding. Phoenix’s Remediator agent drafts fixes, creates tickets, and opens PRs. Your team reviews, approves, and merges. Every fix is traceable.

Phoenix Security changes the game.

The results are clear:

  • Bazaarvoice saved $6.3M in developer time and for teams removed critical in the first weeks of adoption
  • ClearBank cut critical container vulnerabilities by 96–99% and reclaimed 4 hours per engineer per week.
  • IAS saved an equivalent of 1.5M in development hours and reduced SCA-to-container noise by 82.4%
  • Optimizely has been able to act on vulnerabilities sitting on the backlog.

The pattern is the same every time: teams that move from find and report to analyze and fix close more risk with less effort.

The results are clear:

  • Bazaarvoice saved $6.3M in developer time and for teams removed critical in the first weeks of adoption
  • ClearBank cut critical container vulnerabilities by 96–99% and reclaimed 4 hours per engineer per week.
  • IAS saved an equivalent of 1.5M in development hours and reduced SCA-to-container noise by 82.4%
  • Optimizely has been able to act on vulnerabilities sitting on the backlog.

👉 Book a demo today

Or learn how Phoenix Security slashed millions in wasted dev time for fintech, retail, and adtech leaders.

Fix with remediaiton don’t chase ghost vulnerabilities

Francesco is an internationally renowned public speaker, with multiple interviews in high-profile publications (eg. Forbes), and an author of numerous books and articles, who utilises his platform to evangelize the importance of Cloud security and cutting-edge technologies on a global scale.

Discuss this blog with our community on Slack

Join our AppSec Phoenix community on Slack to discuss this blog and other news with our professional security team

From our Blog

TeamPCP turned Trivy into a credential stealer by force-pushing 75 version tags to malicious commits — causing thousands of CI/CD pipelines to silently execute attacker code.
Francesco Cipollone
Phoenix Security announced the general availability of its AI-powered Remediation Engine, enabling agentless container vulnerability remediation aligned with CTEM principles. By correlating container lineage to build files, the platform reduces SCA noise by up to 91% and generates precise remediation actions engineers and AI agents can execute instantly.
Francesco Cipollone
Phoenix Security approaches vulnerability management as a remediation engineering problem. By combining reachability analysis, contextual deduplication, and minimal-impact upgrades, Phoenix transforms hundreds of findings into a small set of changes engineers can actually ship.
Francesco Cipollone
The 2026 Latio Application Security Market Report signals a decisive shift from traditional ASPM to Continuous Threat Exposure Management (CTEM), redefining how enterprises reduce exposure, validate runtime risk, and drive remediation at scale.
Francesco Cipollone
Contents
Derek

Derek Fisher

Head of product security at a global fintech

Derek Fisher – Head of product security at a global fintech. Speaker, instructor, and author in application security.

Derek is an award winning author of a children’s book series in cybersecurity as well as the author of “The Application Security Handbook.” He is a university instructor at Temple University where he teaches software development security to undergraduate and graduate students. He is a speaker on topics in the cybersecurity space and has led teams, large and small, at organizations in the healthcare and financial industries. He has built and matured information security teams as well as implemented organizational information security strategies to reduce the organizations risk.

Derek got his start in the hardware engineering space where he learned about designing circuits and building assemblies for commercial and military applications. He later pursued a computer science degree in order to advance a career in software development. This is where Derek was introduced to cybersecurity and soon caught the bug. He found a mentor to help him grow in cybersecurity and then pursued a graduate degree in the subject.

Since then Derek has worked in the product security space as an architect and leader. He has led teams to deliver more secure software in organizations from multiple industries. His focus has been to raise the security awareness of the engineering organization while maintaining a practice of secure code development, delivery, and operations.

In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

Jeevan Singh

Jeevan Singh

Founder of Manicode Security

Jeevan Singh is the Director of Security Engineering at Rippling, with a background spanning various Engineering and Security leadership roles over the course of his career. He’s dedicated to the integration of security practices into software development, working to create a security-aware culture within organizations and imparting security best practices to the team.
In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

James

James Berthoty

Founder of Latio Tech

James Berthoty has over ten years of experience across product and security domains. He founded Latio Tech to help companies find the right security tools for their needs without vendor bias.

christophe

Christophe Parisel

Senior Cloud Security Architect

Senior Cloud Security Architect

Chris

Chris Romeo

Co-Founder
Security Journey

Chris Romeo is a leading voice and thinker in application security, threat modeling, and security champions and the CEO of Devici and General Partner at Kerr Ventures. Chris hosts the award-winning “Application Security Podcast,” “The Security Table,” and “The Threat Modeling Podcast” and is a highly rated industry speaker and trainer, featured at the RSA Conference, the AppSec Village @ DefCon, OWASP Global AppSec, ISC2 Security Congress, InfoSec World and All Day DevOps. Chris founded Security Journey, a security education company, leading to an exit in 2022. Chris was the Chief Security Advocate at Cisco, spreading security knowledge through education and champion programs. Chris has twenty-six years of security experience, holding positions across the gamut, including application security, security engineering, incident response, and various Executive roles. Chris holds the CISSP and CSSLP certifications.

jim

Jim Manico

Founder of Manicode Security

Jim Manico is the founder of Manicode Security, where he trains software developers on secure coding and security engineering. Jim is also the founder of Brakeman Security, Inc. and an investor/advisor for Signal Sciences. He is the author of Iron-Clad Java: Building Secure Web Applications (McGraw-Hill), a frequent speaker on secure software practices, and a member of the JavaOne Rockstar speaker community. Jim is also a volunteer for and former board member of the OWASP foundation.

Join our Mailing list!

Get all the latest news, exclusive deals, and feature updates.

The IKIGAI concept
x  Powerful Protection for WordPress, from Shield Security PRO
This Site Is Protected By
Shield Security PRO