Skip to content

Pin third-party GitHub Actions to commit SHAs - #615

Merged
MaddyMicrosoft merged 2 commits into
masterfrom
security/sha-pin-actions
Aug 19, 2026
Merged

Pin third-party GitHub Actions to commit SHAs#615
MaddyMicrosoft merged 2 commits into
masterfrom
security/sha-pin-actions

Conversation

@MaddyMicrosoft

@MaddyMicrosoft MaddyMicrosoft commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Pins externally-owned GitHub Actions to immutable commit SHAs to reduce supply-chain risk.

Changes

Third-party actions were referenced by movable major tags (e.g. actions/checkout@v6). A tag can be repointed by the upstream owner, or by an attacker who compromises that action's repository, silently running new code in our CI with our permissions. This is the class of attack seen with tj-actions in 2025.

Each externally-owned action is now pinned to the commit SHA its tag currently resolves to, with the human-readable version kept in a trailing comment:

  • actions/checkout → v6.1.0
  • actions/setup-node → v6.5.0
  • actions/github-script → v7.1.0
  • actions/stale → v8.0.0
  • github/codeql-action (init/autobuild/analyze) → v3.37.7

Maintenance

Dependabot is already configured for the github-actions ecosystem. It understands SHA pins and raises update PRs that bump both the SHA and the trailing version comment together, so the pins stay current without manual tracking and do not drift from the comment.

Deliberately not pinned

azure/login and azure/powershell stay on @v3. These are our own actions used as test and provisioning tooling; the canary and integration suites exist to validate the current v3, so pinning them to a SHA would freeze what the tests exercise and cause drift from the released major. The supply-chain threat model does not apply to our own action's CI.

Third-party actions were referenced by movable major tags (e.g.
actions/checkout@v6). A tag can be repointed by the upstream owner or an
attacker who compromises that action's repo, silently running new code
in our CI - the class of supply-chain attack seen with tj-actions in 2025.

Pin the externally-owned actions to the immutable commit SHA the tag
resolves to, with the version kept in a trailing comment. Dependabot
(github-actions ecosystem) updates both the SHA and the comment together,
so they do not drift.

Pinned: actions/checkout, actions/setup-node, actions/github-script,
actions/stale, github/codeql-action (init/autobuild/analyze).

Deliberately NOT pinned: azure/login and azure/powershell stay on @V3.
These are our own actions used as test/provisioning tooling - the canary
and integration suites exist to validate the current v3, so pinning them
to a SHA would freeze what the tests exercise and cause them to drift
from the released major. The supply-chain threat model (us attacking our
own action's CI) does not apply.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft deployed to Automation test August 19, 2026 01:27 — with GitHub Actions Active
@MaddyMicrosoft
MaddyMicrosoft merged commit d1f8233 into master Aug 19, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants