GitHub SHA Pinning Isn’t Enough — Attackers Are Exploiting the Gaps

GitHub SHA pinning — locking workflow dependencies to specific commit hashes — has long been promoted as a key defense in software supply chain security. But real-world attacks have revealed critical loopholes that let malicious actors bypass SHA pinning entirely.

In an incident back in March 2026, threat actors compromised the open-source security scanner Trivy. They injected malicious code masquerading as a legitimate GitHub checkout tool, labeling it as a “security fix.” Teams using SHA pinning still passed all security checks, unaware of the imposter commit.

Another attack in May targeted the actions-cool/issues-helper tool. By exploiting GitHub’s handling of forks, attackers were able to steal credentials from pipelines using that action. These attacks demonstrate that while SHA pinning can preserve immutability — guaranteeing that the code won’t change — it offers no assurance about who created the code.

Why SHA Pinning Falls Short

SHA pinning ensures a workflow pulls in a precise commit, invalidating attempts to swap in malicious changes via tag repoints or updated versions. However, it does not verify authorship: any commit—even from a fork—can match the pinned hash.

Moreover, organizational policy allowing SHA references focuses mainly on syntax — checking for a valid 40-character SHA — not whether that commit is part of the upstream project rather than a fork or impostor. And even when using Docker-based pinned actions, those images can still pull unfrozen dependencies during runtime that weren’t part of a locked build.

GitHub’s Lockfiles: Progress with Limitations

GitHub has introduced workflow lockfiles — publicly previewed on October 14 and made generally available on October 28, 2026 — which tie every run to recorded commits for actions and all transitive dependencies. This ensures that even if a tag moves later, the exact commit used is preserved.

Yet, lockfiles don’t solve everything. They don’t verify commit authorship or prevent runtime builds that introduce unvetted dependencies. Immutable releases help only when maintainers opt in. Additionally, these protections are not yet available on GitHub Enterprise Server, leaving many organizations exposed.

The core issue is that SHA pinning and lockfiles address immutability — making sure the code stays the same — but not provenance, or the assurance that code comes from a trusted and verified source.

What Developers Need to Do

Security teams, DevOps engineers, and leaders who’ve considered SHA pinning “safe enough” should reassess. The upcoming webinar led by a staff engineer at Chainguard will walk through what GitHub’s policies actually enforce, how impostor commits exploit the repository network, which parts of the 2026 roadmap are helpful, and which gaps remain. It will also offer practical strategies: for example, using curated catalogs of vetted actions, strict code review, verifying commit authorship, and avoiding dependencies that build dynamically at runtime.

If your CI/CD workflows depend on third-party actions or only rely on tag-based versions or SHA pinning without extra oversight, this session is especially critical.

The attacks uncovered so far haven’t shouted they’re malicious. Next time the code might look entirely legitimate. It’s time to close the gaps before they’re exploited again.

Analytical Angle: SHA pinning was once viewed as the gold standard of supply chain defense in GitHub Actions. But recent attacks show that without verifying who authored commits, and without immutable handling of dependencies—including at runtime—you leave a significant trust gap. In the hands of determined adversaries, tools meant to secure your pipeline can be turned into vectors for compromise. Watching how GitHub’s lockfiles evolve, how organizations implement them (especially on enterprise servers), and whether stronger provenance guarantees are adopted will define the next battleground in CI/CD security.