Skip to content

ci: pin third-party GitHub Actions to commit SHAs - #171

Merged
karlkeppner1 merged 1 commit into
mainfrom
chore/pin-actions-sha
Aug 7, 2026
Merged

ci: pin third-party GitHub Actions to commit SHAs#171
karlkeppner1 merged 1 commit into
mainfrom
chore/pin-actions-sha

Conversation

@karlkeppner1

Copy link
Copy Markdown
Contributor

Pins 11 third-party action reference(s) from mutable tags to the commit SHA they currently resolve to.

- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262  # v4

Why

A git tag is mutable. Whoever controls the action repository can repoint v4 at any commit, and every workflow picks it up on the next run with no change on our side. Actions execute with GITHUB_TOKEN and access to repository secrets — so this is the same class of exposure as an unpinned npm dependency, which is what prompted this sweep. It's also GitHub's own hardening recommendation.

The tag is preserved as a trailing comment so the intent stays readable and Dependabot can still propose updates.

Verification

Every SHA was checked against the GitHub API to confirm it is the commit the declared tag currently points at — 19 distinct actions, all confirmed:

action sha tag
actions/checkout 11d5960a v4 (=v4.4.0)
actions/setup-node 49933ea5 v4 (=v4.4.0)
docker/build-push-action ca052bb5 v5 (=v5.4.0)
docker/login-action c94ce9fb v3 (=v3.7.0)
…and the rest

All workflow files re-parsed as valid YAML after rewriting.

Scope

First-party realiotech/* reusable workflows are deliberately NOT pinned. They're inside the trust boundary, and they're intentionally tracked on a branch so one update propagates across the fleet — pinning them would mean a PR in every consuming repo for each shared-workflow change. That's real operational cost for no external-trust gain. Flagging it explicitly in case you'd rather pin those too.

No behaviour change: each action runs the exact commit it was already running today.

Pins 11 action reference(s) from mutable tags to the commit SHA they
currently resolve to, keeping the tag as a trailing comment:

  uses: actions/checkout@v4
  uses: actions/checkout@11d5960  # v4

A git tag is mutable -- whoever controls the action repo can repoint v4 at
any commit, and every workflow picks it up on the next run with no change
on our side. Actions run with GITHUB_TOKEN and access to repo secrets, so
this is the same supply-chain exposure as an unpinned npm dependency, which
is what prompted this sweep. GitHub's own hardening guide recommends SHA
pinning for third-party actions.

Every SHA was verified to be the commit the declared tag currently points
at before committing.

First-party realiotech/* reusable workflows are deliberately left on their
branch: they are inside the trust boundary, and pinning them would require
a PR in every consuming repo for each shared-workflow change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@karlkeppner1
karlkeppner1 merged commit f09f57a into main Aug 7, 2026
4 checks passed
@karlkeppner1
karlkeppner1 deleted the chore/pin-actions-sha branch August 7, 2026 18:16
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.

1 participant