What Happened
On January 17, 2025, attackers compromised Aqua Security's Trivy vulnerability scanner through its GitHub Actions repository. The breach affected trivy-action, a GitHub Action wrapper used by thousands of CI/CD pipelines to scan container images for vulnerabilities.
Attackers overwrote 75 of 76 version tags with malicious code that installed a persistent Python dropper on developer machines. The only unaffected tag was version 0.35.0. The malware targeted credentials and sensitive data from compromised development environments, creating a direct path from security tooling into production systems.
Timeline
The attack exploited incomplete credential rotation from an earlier breach. Attackers used residual GitHub access to inject malicious commits through GitHub Actions workflows. The specific timeline of the initial compromise and credential theft remains under investigation, but the tag manipulation occurred as a coordinated event affecting nearly all published versions.
The scope of impact depends on which organizations pinned to commit SHAs versus version tags in their workflow configurations. Teams using tag references like @v0.50.0 pulled malicious code. Teams pinning to specific commit SHAs remained protected.
Which Controls Failed or Were Missing
Incomplete Credential Rotation: Attackers leveraged credentials that should have been invalidated after the initial breach. This suggests either incomplete identification of compromised credentials or gaps in the rotation process.
Version Tag Mutability: GitHub allows repository maintainers to move tags to different commits. While this flexibility aids maintenance, it creates a trust boundary issue. Your workflow assumes @v0.50.0 points to audited, safe code. Nothing prevents that tag from being redirected to a malicious commit.
Insufficient CI/CD Pipeline Isolation: The malware installed a persistent dropper on developer machines. This indicates that CI/CD runners had network access and permissions sufficient to reach developer endpoints. Proper segmentation would limit the blast radius of a compromised action.
Missing Runtime Integrity Checks: GitHub Actions executed the malicious code without detecting the payload modification. The workflows lacked runtime verification that the action matched its expected signature or behavior.
What the Relevant Standard Requires
PCI DSS v4.0.1 Requirement 6.3.2 mandates that bespoke and custom software is developed securely, including reviewing custom code prior to release. While Trivy itself is open source, your use of it in payment processing environments makes this applicable. The requirement specifically calls for code review processes that would catch injected malicious code—but only if you're reviewing the action's source, not just pinning to a version tag.
NIST 800-53 Rev 5 Control SA-12 (Supply Chain Protection) requires organizations to employ supply chain protection measures including code signing and verification of software integrity. The control explicitly addresses the risk of malicious code insertion through compromised development tools. Your GitHub Actions workflow should verify the integrity of every action before execution.
ISO 27001 Control 8.31 (Separation of Development, Test and Production Environments) requires logical or physical separation between environments. The Trivy compromise demonstrates why: a malicious development tool shouldn't have network paths to production credentials or the ability to persist across environment boundaries.
SOC 2 Type II Common Criteria CC6.6 addresses the logical and physical access controls that restrict access to system resources. Your CI/CD pipeline is a system resource. The principle of least privilege should prevent a vulnerability scanner from installing persistent software on runner machines or accessing credentials beyond its immediate scan scope.
Lessons and Action Items for Your Team
Pin All GitHub Actions to Commit SHAs, Not Version Tags. Update your workflow files today:
# Vulnerable
- uses: aquasecurity/[email protected]
# Protected
- uses: aquasecurity/trivy-action@2b6a709cf9c4025c5438138008beaddbb02086f0
Commit SHAs are immutable. An attacker who compromises a repository cannot change what 2b6a709cf9c4025c5438138008beaddbb02086f0 points to. They can move the v0.50.0 tag freely.
Build a Credential Rotation Procedure That Includes GitHub Tokens. Your rotation checklist should cover:
- Personal access tokens (PATs) for all service accounts
- Deploy keys on all repositories
- GitHub App installation tokens
- OAuth application tokens
- Repository secrets referenced in workflows
Document which credentials have access to workflow files and action repositories. When you detect a compromise, rotate all of them—not just the obviously affected subset.
Implement Network Segmentation for CI/CD Runners. Your GitHub Actions runners should not have:
- Direct access to developer workstations
- Permissions to modify code outside the specific job context
- Network paths to production databases or credential stores
Use separate runner pools for different trust levels. A vulnerability scanner runs in a more restricted environment than a deployment action.
Add Supply Chain Verification to Your Pipeline. Before any GitHub Action executes:
- Verify the commit SHA matches your expected value
- Check the action's repository for recent unexpected commits
- Monitor for tag movements in dependencies
Tools like Sigstore can verify action signatures. GitHub's audit log tracks tag modifications. Build these checks into your workflow or use a pre-commit hook that validates action references.
Review Your SOC 2 Control Evidence for Supply Chain Risk. If you're preparing for or maintaining SOC 2 certification, document:
- How you verify third-party code integrity (CC6.6)
- Your change management process for CI/CD dependencies (CC8.1)
- Access controls preventing unauthorized modification of build tools (CC6.1)
The Trivy incident is precisely the scenario these controls address. Your auditor will ask how you prevent it.
Test Your Incident Response for Compromised Tooling. Run a tabletop exercise: "Our vulnerability scanner is compromised. What credentials does it have access to? How quickly can we rotate them? Which pipelines need to be halted?"
The answers reveal gaps in your asset inventory and credential management. Close those gaps before the exercise becomes reality.
The Trivy attack succeeded because version tags created a false sense of immutability. Your @v0.50.0 reference looked stable and audited. Behind that reference, the code changed. Commit SHAs remove that ambiguity. Make the change in your workflows this week.



