Repository navigation
Security: pin softprops/action-gh-release to commit SHA in release workflow - #16
Open
pimfeltkamp wants to merge 1 commit into
Open
pimfeltkamp wants to merge 1 commit into
pimfeltkamp wants to merge 1 commit into
Conversation
…rkflow The tag-triggered publish job holds contents: write and id-token: write and uses NPM_TOKEN, but ran softprops/action-gh-release by the mutable @V3 tag. Pin it to the commit that v3 / v3.0.4 resolve to today so a moved tag cannot run different code with the job's token. Dependabot's github-actions ecosystem keeps the pin updated via the version comment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pimfeltkamp
commented
Nov 9, 2026
pimfeltkamp
left a comment
Contributor
Author
There was a problem hiding this comment.
✅ Automated review passed — no issues found. (Would approve, but the reviewer account authored this PR and GitHub forbids self-approval.)
✅ Safe to merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was vulnerable
The tag-triggered publish job in
.github/workflows/release.ymlruns withcontents: writeandid-token: writeand usessecrets.NPM_TOKENin an earlier step. Its last step ransoftprops/action-gh-release@v3, a mutable tag. If that tag were moved or the action compromised, attacker-controlled code would run with the job's GITHUB_TOKEN and could tamper with the workspace and the GitHub release.What the fix does
Pins the action to the full commit SHA that both
v3andv3.0.4resolve to today, with a# v3.0.4version comment:The SHA was resolved via
gh apiby dereferencing the annotatedv3tag object to its commit, and cross-checked against thev3.0.4tag..github/dependabot.ymlalready has agithub-actionsecosystem entry, so Dependabot will keep the SHA and version comment updated.Why it is non-breaking
The pinned commit is exactly the code
@v3runs today, so release behaviour is unchanged. The action's inputs used here (generate_release_notes,prerelease) are unchanged at that commit. The only behavioural difference is that future v3.x patches arrive via Dependabot PRs instead of silently.Tests run
git diff: one line changed in one file.v3/v3.0.4point to, that it is on upstream history (identical to master), that inputs and permissions are unchanged, and found no regression.Noted, not changed (pre-existing, out of scope of this finding)
actions/checkout@v6andactions/setup-node@v6inrelease.ymlandci.ymlremain on mutable tags. Inrelease.ymlthey run before the npm publish step in the same privileged job. Worth a separate follow-up.🤖 Automated security fix by claude-code-security. It is reviewed by the automated PR reviewer and auto-merged only if the review passes, CI is green, and the change is small and non-breaking.
🤖 Generated with Claude Code