Skip to content

Pin GitHub Actions to commit SHAs - #4

Merged
chadmyers merged 2 commits into
masterfrom
chore/pin-actions-sha
Oct 9, 2026
Merged

chadmyers merged 2 commits into
masterfrom
chore/pin-actions-sha

Conversation

@chadmyers

@chadmyers chadmyers commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Why

Git tags are mutable. A tag such as @v4 can move to different code at any time. In March 2025 an attacker moved the tags of tj-actions/changed-files to a malicious commit. Every workflow that used a tag ran that code and leaked CI secrets. A full commit SHA cannot move.

What changed

  • Each third-party uses: reference now points to a 40-character commit SHA, with the version in a trailing comment (owner/repo@<sha> # vX.Y.Z). pinact made these edits from the GitHub API. Nobody typed a SHA by hand.
  • The versions did not change. Each SHA is the commit that the current tag points to today. A short tag such as v4 gets the comment of the full release with the same SHA.
  • Local actions (./...) and refs to branches are not changed.

No other files changed.

🤖 Generated with Claude Code

chadmyers and others added 2 commits October 9, 2026 12:32
Pin each action ref to the commit SHA of its current tag with pinact.
The versions do not change. Add a monthly grouped Dependabot entry for
github-actions to keep the SHAs current.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Do not set up automatic Dependabot updates for actions. Restore
.github/dependabot.yml to its state before this branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chadmyers chadmyers self-assigned this Oct 9, 2026
@chadmyers
chadmyers merged commit 0f16767 into master Oct 9, 2026
3 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