SHA Pinning Is Not Enough: Attackers Are Slipping Malicious GitHub Actions Code Past a Trusted Defence
Pinning GitHub Actions to an exact version of their code, known as SHA pinning, has become the standard defence against software supply chain attacks. New reporting shows attackers have already found a way around it.
In March 2026, the attackers who hijacked Trivy, a widely used open-source security scanner, planted malicious code that appeared to come from GitHub's official checkout tool. They even labelled it a security fix. Teams pinned to that code would have passed every check. The method works because GitHub lets forks (copies of a project) share code with the original. In May, the same technique hit the popular actions-cool/issues-helper tool and stole credentials from the pipelines that ran it.
Pinning still has a strong track record. When the tj-actions/changed-files compromise repointed tags to a malicious commit across more than 23,000 repositories in March 2025, teams pinned to SHAs were unaffected. GitHub now lets administrators enforce pinning across an organisation. The lesson is that pinning proves the code will not change, but says nothing about who wrote it.
GitHub is responding. Its 2026 Actions security roadmap prioritised dependency locking, and workflow lockfiles became generally available on 28 October 2026. They tie each run to recorded commits for actions and their transitive dependencies, and locked commits must exist on a branch of the source repository, which blunts fork-only impostors. However, GitHub's own changelog says locking does not determine whether a dependency is safe. Commit authorship and runtime builds remain open, immutable releases only help when maintainers opt in, and lockfiles are not currently supported on GitHub Enterprise Server. Chainguard is running a webinar on these gaps.
Why it matters
Security leaders who signed off on SHA pinning as 'done' are exposed, because the Trivy and actions-cool/issues-helper cases show a pinned hash can still point to attacker-written code that looks legitimate. The assumption that immutability equals trust breaks, and the decision it forces is whether to verify provenance and authorship, not just lock versions. Lockfiles narrow the fork trick but leave commit authorship and runtime builds unresolved, and Enterprise Server users do not get them yet.
What to do
- Review which third-party actions your workflows pull in and confirm each pinned commit sits on a branch of the genuine source repository.
- Enable workflow lockfiles where supported, noting they are not currently available on GitHub Enterprise Server.
- Rotate credentials exposed to pipelines that ran actions-cool/issues-helper.
- Prefer actions whose maintainers publish immutable releases.