Compromised trivy-action GitHub Action
The trivy-action GitHub Action was compromised via git tag repointing, with 76 of 77 release tags poisoned to include a multi-stage credential stealer that executes before the legitimate scanner, impacting CI/CD pipelines.
Triage facts
Revision 1- Evidence
- Unknown
- Severity
- Critical
- Sources
- 1 public source
- Freshness
- Revision 1Mar 28, 08:12 UTC
- Detection
- 2 rules
On March 19, 2026, a spike in script execution detections on Linux GitHub Actions runners led to the discovery of a supply chain compromise targeting the aquasecurity/trivy-action GitHub Action. The attack involved retroactively poisoning 76 of the 77 release tags by repointing them to malicious commits. This injected a multi-stage credential stealer into the action's entrypoint.sh script. The malicious code executes before the legitimate Trivy scanner, allowing it to steal credentials and secrets from the runner environment without disrupting normal workflow execution. Aqua Security has removed all malicious artifacts, but pipelines that previously used the compromised action may have been affected, potentially leaking sensitive information. This incident highlights the risks associated with mutable tags in Git-based CI/CD systems.
Attack Chain
- Attacker gains write access to the
aquasecurity/trivy-actionGitHub repository. - Attacker retroactively modifies existing release tags (e.g.,
0.24.0) to point to malicious commits. - The malicious commit prepends approximately 105 lines of code to the
entrypoint.shscript, injecting a credential stealer. - When a CI/CD pipeline uses the compromised action (e.g.,
uses: aquasecurity/trivy-action@0.24.0), the GitHub Actions runner downloads and executes the maliciousentrypoint.sh. - The malicious script enumerates running processes on the runner.
- The injected script steals credentials, API keys, and other secrets available in the runner's environment.
- After stealing credentials, the script executes the legitimate Trivy scanner to avoid suspicion.
- Stolen credentials are used to access internal infrastructure and resources, leading to data exfiltration or further compromise.
Impact
The compromise of the trivy-action GitHub Action could have affected numerous organizations using it in their CI/CD pipelines. With 76 of 77 release tags poisoned, the potential for widespread credential theft is significant. Successful attacks could allow unauthorized access to source code repositories, cloud infrastructure, and other sensitive systems. The number of affected organizations is currently unknown, but the wide adoption of trivy-action suggests a potentially large impact.
Recommendation
- Review CI/CD pipeline configurations for usage of the
aquasecurity/trivy-actionand update to a safe version or a different vulnerability scanner. - Monitor GitHub Actions runner logs for suspicious script execution, especially involving
entrypoint.shin theaquasecurity/trivy-actiondirectory. - Implement the provided Sigma rule to detect execution of suspicious processes from within the GitHub Actions runner environment.
- Audit GitHub repositories for unexpected changes to tags and commit history.
- Rotate any potentially compromised credentials, API keys, and secrets that may have been accessible to the GitHub Actions runners.
Detection coverage 2
Suspicious Process Execution in GitHub Actions Runner
highDetects execution of suspicious processes within the GitHub Actions runner environment, potentially indicating malicious activity injected via a compromised action.
Detect Modification of GitHub Action Entrypoint
mediumDetects modification of the entrypoint.sh file within a GitHub Action directory, which could indicate a supply chain compromise.
Detection queries are available on the platform. Get full rules →