Why SHA Pinning Isn’t Enough to Secure GitHub Actions

GitHub Actions users who rely solely on SHA pinning may be facing a false sense of security. Although pinning a workflow to a specific commit hash (SHA) ensures the code content remains unchanged, it does nothing to guarantee who authored the code or whether it came from a trusted source. Recent real-world attacks show just how serious these gaps have become.

What the Attacks Reveal

In March 2026, hackers commandeered Trivy, a popular open-source security scanner, by injecting malicious code disguised as a security improvement to GitHub’s official actions/checkoututility. Because the workflow was pinned to the SHA of that commit, it passed all integrity checks. In May, an attack leveraged the same trick using the actions-cool/issues-helperaction, this time to exfiltrate credentials from pipelines using SHA pinning.

The crux of the issue is this: while SHA pinning locks the content, it provides no proof of authorship. Malicious actors can commit code via forks—copies of a repo—claim ownership misleadingly, and rely on the fact that GitHub’s system treats any matching SHA—even one originating in a fork—as valid. Workflows enforcing SHA pinning often verify only that the reference is a 40-character SHA string, not that it belongs to the upstream repository.

GitHub’s Lockfiles: Progress with Limits

To address some of these vulnerabilities, GitHub released workflow lockfiles: a feature that became generally available as of October 28, 2026. These lockfiles record every commit used in a workflow—including dependencies of dependencies—and require locked commits to exist on a branch of the source repository, which helps block fork-only impostors.

Even so, lockfiles do not solve all problems. They don’t prove the commit’s author, nor do they prevent runtime builds—like Docker actions—from fetching external dependencies that aren’t locked. The safety of dependencies still depends on whether maintainers adopt secure practices. Also, lockfiles are not supported on GitHub Enterprise Server, meaning many enterprise pipelines remain exposed.

What’s Being Done—and What You Should Do Next

To help security teams close these trust gaps, a webinar titled GitHub Actions Security Beyond SHA Pinninghas been organized. Led by a developer relations engineer from Chainguard, it aims to clarify what SHA pinning really protects—and what it doesn’t. Topics include:

  • The difference between content immutability and commit provenance
  • How impostor commits slip through the fork network
  • What GitHub’s security roadmap changes, especially lockfiles, add to the defense—and where gaps remain
  • Best practices for curating trusted actions

The session is recommended for platform engineers, DevSecOps teams, CI/CD maintainers, and anyone who believed that enabling SHA pinning was the final step in securing workflows.

SHA pinning retains its place as a crucial baseline—it guards against tag-based attacks like the 2025 compromise of tj-actions/changed-files—but it is no longer sufficient. The recent attacks make it clear that content integrity must be paired with identity verification and rigorous supply chain hygiene. Lockfiles help close some holes, but without enterprise support and author checks, they alone won’t be enough.

In short: treating SHA pinning as “done” is inviting the next supply chain breach. Teams must layer defenses—ensuring provenance, inspecting runtime builds, and employing curated, trusted actions—to avoid walking into ever-evolving traps. Watch what comes out of GitHub’s security roadmap, but don’t wait: assess your pipelines now and demand stronger attestations for every dependency you pull in.