Hackers Bypass GitHub Actions SHA Pinning via Compromised Trivy Supply Chain
What Happened – In March 2026 a threat‑actor group succeeded in hijacking Trivy, the open‑source container and IaC scanner that is embedded in thousands of CI/CD pipelines. The attackers inserted malicious code into Trivy’s repository that was crafted to look exactly like GitHub’s official actions/checkout step. Because many organizations pin GitHub Actions to a specific commit SHA—a practice widely promoted as a defense against supply‑chain tampering—the malicious payload was able to slip past the SHA check and execute as if it were the legitimate checkout action.
The malicious code was signed with the same SHA that the victim pipelines had pinned, effectively “re‑using” the trusted identifier. When a pipeline invoked Trivy, the compromised scanner fetched the tampered checkout action, cloned the attacker‑controlled repository, and proceeded to run arbitrary commands on the build runner. The technique does not exploit a vulnerability in GitHub itself; instead it subverts the trust relationship between a downstream CI job and a third‑party tool it assumes to be benign.
The breach was first reported by The Hacker News after security researchers observed anomalous network traffic from CI runners that were pulling code from a repository that matched the pinned SHA but contained unexpected binaries. The researchers traced the activity back to a recent commit in Trivy’s upstream source that introduced the malicious payload. Trivy’s maintainers responded with a public advisory, revoked the compromised release, and issued a new version with the backdoor removed.
GitHub’s documentation on SHA pinning emphasizes that the method protects against repository‑level changes, but it does not guard against a compromised third‑party action that is itself a trusted dependency. The attackers leveraged this gap, demonstrating that pinning alone is insufficient when the supply chain includes multiple layers of open‑source components.
No public evidence suggests that any downstream victim has suffered data loss or system compromise as a direct result of this specific incident. However, the technique is readily reproducible: any CI/CD workflow that relies on Trivy (or similar tools) and pins the checkout action by SHA is potentially exposed.
The incident underscores a broader trend where adversaries target the software supply chain rather than the end‑product. By compromising a widely‑used security scanner, the attackers gained a foothold that could be leveraged across many organizations that trust the scanner’s output.
Why It Matters for Trust & Control Assurance – This attack highlights the need for control mapping that extends beyond simple version pinning to include provenance verification and continuous monitoring of third‑party components.
Who Is Affected –
- Software development teams that use GitHub Actions with SHA pinning.
- Organizations that integrate Trivy or similar open‑source scanners into their CI/CD pipelines.
- Any enterprise that relies on third‑party actions as part of its software supply chain.
Recommended Actions –
- Inventory all third‑party actions used in your pipelines and classify them by risk.
- Enable SLSA (Supply‑Chain Levels for Software Artifacts) provenance checks for actions, ensuring that the build artifact’s provenance matches the expected source.
- Adopt reproducible builds for critical actions and verify cryptographic signatures where available.
- Implement continuous monitoring of upstream repositories for unexpected commits or releases, using tools that can alert on changes to signed SHAs.
- Update Trivy (or any compromised tool) to the latest patched version and review the changelog for security fixes.
- Review your CI/CD security policies to require multi‑factor verification (e.g., SHA pinning plus provenance) before an action is executed.
Source: The Hacker News – Hackers Found a Way Around GitHub SHA Pinning
Technical Notes –
- Attack vector: Compromise of a third‑party dependency (Trivy) that is invoked within CI pipelines.
- Affected component: GitHub Actions
checkoutstep, trusted via SHA pinning. - Data types: No direct data exfiltration reported; the vector enables arbitrary command execution on build runners.
- Mitigations: Use of SLSA provenance, reproducible builds, and continuous upstream monitoring.