Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Limitations of SHA Pinning in GitHub Actions Highlight Security Gaps

SHA pinning in GitHub Actions ensures code immutability but does not verify the origin or safety of the commit, leaving room for potential security risks if the original project is compromised.

Share
AI-generated conceptual illustration accompanying: Limitations of SHA Pinning in GitHub Actions Highlight Security Gaps
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

The Limitations of SHA Pinning in GitHub Actions

The limitations of SHA pinning in GitHub Actions highlight a critical gap in dependency security. As noted in GitHub's changelog, locking dependencies via SHA guarantees that the code won't change, but it does not ensure the commit's origin or safety (The Hacker News). This means that even if a commit is pinned, there is no verification that the code was authored by a trusted source or that it remains secure during runtime builds.

Additionally, enforcement at the project level only checks that a reference is a 40-character SHA, not that the commit actually exists in the upstream project (The Hacker News). This lack of verification leaves the door open for malicious actors to inject harmful code if the original project is compromised. As one expert explains, the lesson is clear: pinning ensures immutability, but it does not determine the safety of the dependency itself (The Hacker News).

Real-World Exploits and the Need for Enhanced Security

In March 2026, hackers exploited a vulnerability in the Trivy security scanner by injecting malicious code that mimicked GitHub's official checkout tool, demonstrating how even SHA pinning can be bypassed in real-world scenarios. While SHA pinning offers some protection, as seen in the March 2025 compromise of the tj-actions/changed-files repository—where over 23,000 repositories were affected by repointed tags—teams that had pinned to specific SHAs remained unaffected. This highlights the importance of combining SHA pinning with additional security measures. In response, GitHub's 2026 Actions security roadmap, published March 26, emphasized the need for deterministic dependency locking as a key strategy to close existing gaps in supply chain security.

GitHub's Response and New Security Measures

GitHub has introduced workflow lockfiles as a new security measure to address vulnerabilities in its SHA pinning system. Workflow lockfiles entered public preview on October 14 and became generally available on October 28, 2026. These lockfiles ensure that locked commits must exist on a branch of the source repository, which helps to mitigate risks posed by fork-only impostors. This approach adds an additional layer of verification to the dependency management process. However, GitHub emphasizes that while these measures improve security, they do not eliminate all potential risks. Register for the webinar for a clear-eyed breakdown of what GitHub's roadmap fixes and what it still leaves to you.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more