Skip to content

security: pin GitHub Actions to full-length commit SHAs - #62

Merged
manuelwedler merged 1 commit into
mainfrom
security/pin-actions-by-sha
Aug 4, 2026
Merged

security: pin GitHub Actions to full-length commit SHAs#62
manuelwedler merged 1 commit into
mainfrom
security/pin-actions-by-sha

Conversation

@kuzdogan

@kuzdogan kuzdogan commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Part of the org-wide action pinning work (argotorg/sourcify#2898). Pins every GitHub Action in this repo to a full-length commit SHA.

Tags are mutable: whoever controls an action's repository can repoint @v4 at different code at any time, and that code then runs in CI with this repo's secrets. A commit SHA can't be repointed.

Changed 2 workflow file(s): ci.yml publish.yml

Each pin keeps a trailing # v4.4.0 comment showing the version it resolved to, so the readable version is still there. This matches the convention already used elsewhere in the org (e.g. mikepenz/action-junit-report).

Nothing else changed

Versions are pinned as they are today — no upgrades bundled in. Where a workflow sits on an old major (several repos are still on actions/checkout@v2 / setup-node@v2, which run on end-of-life runners), that deserves a separate upgrade PR rather than mixing a behaviour change into a security pin.

Why now

The sourcifyeth org is enabling Settings → Actions → General → Policies → "Require actions to be pinned to a full-length commit SHA". Once that's on, any workflow with an unpinned action fails. This should merge before that flip.

Keeping pins fresh

Pinning without an updater means these SHAs go stale and stop picking up upstream security fixes. This repo has no Renovate config, so the pins are manual for now. Onboarding Renovate with pinDigests: true would keep them maintained — worth a follow-up.

🤖 Generated with Claude Code

Tags like `actions/checkout@v4` are mutable — whoever controls the action's
repo can repoint the tag at different code, which then runs in CI with this
repo's secrets. Pinning to a commit SHA makes the reference immutable.

Each pin keeps a trailing comment with the version it resolved to, so the
human-readable version is still visible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@manuelwedler
manuelwedler merged commit eec0c3a into main Aug 4, 2026
2 checks passed
@manuelwedler
manuelwedler deleted the security/pin-actions-by-sha branch August 4, 2026 12:46
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