Supply ChainWed May 06 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

GitHub Actions SHA Pinning: What to Pin and How to Roll It Out

A practical rollout plan for SHA pinning in GitHub Actions, including what to pin first and how to handle updates safely.

GitHub Actions SHA Pinning: What to Pin and How to Roll It Out
action pin team

When people talk about GitHub Actions supply-chain security, SHA pinning comes up first for a reason. It is one of the few controls that directly reduces the risk of a third-party action changing underneath you.

The problem is operational, not conceptual. Teams know they should pin, but they worry about maintenance cost and update friction.

Why full SHA pinning matters

A version tag like @v4 is readable, but it is not immutable. A compromised maintainer or force-moved tag can change what your workflow runs.

A full commit SHA is different:

- uses: some/action@aabbccddeeff00112233445566778899aabbccdd

That reference points to one exact revision.

What to pin first

If you have not pinned anything yet, do not treat every action as equally urgent.

Start here:

  1. Third-party actions with write access
  2. Deployment and release workflows
  3. Actions running in privileged contexts
  4. Popular actions with wide transitive usage across repositories

This gets risk down faster than trying to convert every workflow in alphabetical order.

What usually does not need the same urgency

First-party GitHub actions still deserve review, but the biggest supply-chain concern is usually external code you do not control.

That means the highest-value remediation targets are often:

  • vendor actions
  • community-maintained actions
  • internal references that still follow mutable tags

How to roll out pinning without chaos

The wrong rollout is a giant one-off migration with no update process.

The right rollout is:

1. Inventory workflow usage

Find every uses: reference and separate:

  • GitHub-maintained actions
  • internal actions
  • third-party actions

2. Replace mutable third-party references with full SHAs

Make the change repository by repository or workflow by workflow.

3. Preserve readability in comments or documentation

Many teams keep a short comment near the pin to show the human-friendly version:

- uses: vendor/action@aabbccddeeff00112233445566778899aabbccdd # v2.4.1

4. Add a review process for updates

Pinning is not “set and forget.” You still need a sane update path. The difference is that updates become explicit code review events instead of silent drift.

The real objection: maintenance

This is the most common pushback, and it is fair. SHA pinning adds maintenance overhead if you manage it manually across many repositories.

The answer is not to skip pinning. The answer is to make updates reviewable and narrow:

  • scan for unpinned references
  • generate targeted remediation PRs
  • update only the actions that matter
  • let engineers review the exact change

That keeps security control aligned with normal development workflow.

A practical policy model

For small teams, a strong default is:

  • block new unpinned third-party actions
  • warn on existing legacy workflows
  • prioritize fixes in deployment and release paths first

This avoids a painful all-at-once migration while still preventing the risk from growing.

Bottom line

If you use third-party GitHub Actions, SHA pinning is not optional in the long run. It is one of the clearest ways to reduce supply-chain exposure in workflow automation.

The teams that succeed are not the ones with the biggest policy documents. They are the ones that make pinning visible, reviewable, and easy to maintain.

From guide to guardrail

Apply this checklist to your repositories

Use action pin to find unpinned actions, broad token permissions, risky pull request triggers, and workflow security issues before they merge.

Scan GitHub Actions

Related Guides

Keep hardening GitHub Actions

Learn the GitHub Actions security best practices that reduce supply-chain risk without turning your small team into a DevSecOps department.

Most workflows do not need broad write access. This guide shows how to trim GitHub Actions permissions step by step.

Understand the real risk behind pull_request_target and how to separate untrusted pull request code from privileged automation.