Back to all lessons
Awareness Lessons
2 weeks ago

SHA Pinning Bypass Exposes GitHub Actions Supply Chain Risk

Written by AI from the linked story. Not reviewed by an editor. How this works

Attackers discovered that GitHub's SHA pinning — a widely trusted defense for securing CI/CD pipelines — can be bypassed by disguising malicious code as security fixes within forks of legitimate repositories, compromising tools like Trivy and actions-cool/issues-helper. The root cause is an over-reliance on a single integrity mechanism (commit SHA) without verifying the actual content, authorship, or trustworthiness of the referenced code. Because GitHub lockfiles only record which commit was used rather than validating what that commit contains, they provide a false sense of security. This matters because CI/CD pipelines have privileged access to secrets, build artifacts, and deployment infrastructure, making them high-value targets where a single compromised action can cascade across thousands of downstream projects.

Tactical Insight

Immediate actions

  • Audit all GitHub Actions workflows to identify third-party actions pinned only by SHA and validate the referenced commits against known-good sources.
  • Replace any community actions used in sensitive pipelines with vendored, internally reviewed copies where code is fully inspected before use.

Long-term improvements

  • Adopt code signing and provenance verification (e.g., Sigstore/cosign) for all third-party actions and dependencies to verify authorship, not just content hash.
  • Implement a formal approval and review process before any new or updated third-party action is permitted in production pipelines.
  • Apply the principle of least privilege to GitHub Actions tokens, limiting the blast radius if a malicious action is executed.

Detection measures

  • Monitor CI/CD pipeline logs for unexpected outbound network connections, secret access, or anomalous build steps that could indicate a compromised action.
  • Subscribe to security advisories for all third-party GitHub Actions used in your organization and treat action updates as software changes requiring review.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.