Compromised trivy-action GitHub Action Injects Credential Stealer
The trivy-action GitHub Action was compromised via tag repointing, injecting a multi-stage credential stealer into CI/CD pipelines, affecting 76 of 77 release tags.
Triage facts
Revision 2- Evidence
- Unknown
- Severity
- Critical
- Sources
- 1 public source
- Freshness
- Revision 2Mar 21, 09:00 UTC
- Detection
- 2 rules
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
On March 19, 2026, a spike in script execution detections on Linux platforms was observed across multiple CrowdStrike Falcon customers. Investigation revealed a supply chain compromise affecting the aquasecurity/trivy-action GitHub Action, a popular open-source vulnerability scanner used in CI/CD pipelines. The attacker retroactively poisoned 76 of the 77 release tags by repointing them to malicious commits, replacing the legitimate entry point with a multi-stage credential stealer. The malicious code executes before the real scanner, stealing credentials silently and allowing workflows to complete normally, masking the compromise. Aqua Security has confirmed the compromise and removed malicious artifacts. This incident highlights the risk of using mutable tags in GitHub Actions and the potential for attackers to steal secrets, credentials, and gain access to internal infrastructure.
Attack Chain
- Attacker gains write access to the aquasecurity/trivy-action GitHub repository.
- The attacker retroactively repoints existing tags (e.g., 0.24.0) to malicious commits via
git tagrepointing. - A developer's CI/CD pipeline references the compromised trivy-action using a tag (e.g.,
aquasecurity/trivy-action@0.24.0). - During workflow execution, the GitHub Actions runner downloads the malicious code from the repointed tag.
- The malicious
entrypoint.shscript executes before the legitimate Trivy scanner. - The
entrypoint.shscript enumerates process IDs (PIDs) to identify potential credential locations. - The script executes a multi-stage credential theft operation, potentially targeting API keys, deploy tokens, and cloud credentials.
- After the credential theft, the legitimate Trivy scanner executes, allowing the workflow to complete normally and avoid immediate detection.
Impact
The compromise of the trivy-action GitHub Action allows attackers to steal sensitive credentials from CI/CD pipelines. This could lead to unauthorized access to cloud environments, source code repositories, and other internal infrastructure. Due to the widespread use of trivy-action, a large number of organizations were potentially affected. Successful credential theft could enable data exfiltration, code modification, and deployment of malicious applications.
Recommendation
- Implement immutable references to GitHub Actions by using commit SHA instead of tags (reference: overview).
- Monitor process execution on GitHub Actions runners for unexpected script execution using the
process_creationSigma rule below. - Enable detailed logging on GitHub Actions runners to capture command-line arguments and network connections (reference:
process_creationandnetwork_connectionSigma rules). - Audit CI/CD pipelines for usage of the
aquasecurity/trivy-actionand update to a verified, uncompromised version or a commit SHA (reference: overview). - Investigate any unusual activity originating from GitHub Actions runners between March 19, 2026, and March 20, 2026, as this is when the initial spike in malicious activity was observed (reference: overview).
Detection coverage 2
Detect Suspicious Script Execution in GitHub Actions Runner
mediumDetects execution of shell scripts from unusual locations within the GitHub Actions runner environment, indicating potential malicious activity.
Detect Network Connection from GitHub Actions Runner to Public IP
mediumDetects network connections initiated from GitHub Actions runners to public IP addresses, which could indicate command and control or data exfiltration activity.
Detection queries are available on the platform. Get full rules →