Skip to content

Pin all GitHub Actions to commit SHAs#85

Merged
miguelsousa merged 1 commit into
mainfrom
use-commit-hashes
May 21, 2026
Merged

Pin all GitHub Actions to commit SHAs#85
miguelsousa merged 1 commit into
mainfrom
use-commit-hashes

Conversation

@miguelsousa
Copy link
Copy Markdown
Member

Replace movable-tag refs (uses: owner/repo@vX) with immutable commit SHAs plus a trailing # vX comment in every workflow under .github/workflows/. This matches the style established by PR #83 for pypa/gh-action-pypi-publish and protects against tag-tampering supply-chain attacks: if a tag is force-moved by a compromised maintainer account, CI would silently execute new code with the workflow's permissions; a pinned SHA cannot be repointed.

Also extend renovate.json with the helpers:pinGitHubActionDigests preset so any future tag-only uses: line is auto-pinned by Renovate.

No version changes — every SHA resolves to the same commit the tag already pointed to.

Replace movable-tag refs (`uses: owner/repo@vX`) with immutable commit SHAs
plus a trailing `# vX` comment in every workflow under .github/workflows/.
This matches the style established by PR #83 for pypa/gh-action-pypi-publish
and protects against tag-tampering supply-chain attacks: if a tag is
force-moved by a compromised maintainer account, CI would silently execute
new code with the workflow's permissions; a pinned SHA cannot be repointed.

Also extend renovate.json with the `helpers:pinGitHubActionDigests` preset
so any future tag-only `uses:` line is auto-pinned by Renovate.

No version changes — every SHA resolves to the same commit the tag already
pointed to.
@miguelsousa miguelsousa merged commit d1ed9b4 into main May 21, 2026
3 checks passed
@miguelsousa miguelsousa deleted the use-commit-hashes branch May 21, 2026 00:32
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