Repository navigation
Security: pin release workflow actions to commit SHAs and Bun to 1.4.4 - #18
Open
pimfeltkamp wants to merge 1 commit into
Open
pimfeltkamp wants to merge 1 commit into
pimfeltkamp wants to merge 1 commit into
Conversation
cli-release.yml runs with NPM_TOKEN, contents:write and id-token:write, yet pulled oven-sh/setup-bun, softprops/action-gh-release and the actions/* steps by mutable major tag and installed Bun "latest". A retagged action or a hijacked Bun release could have published a malicious npm package or release binaries. Pin every `uses:` to the full commit SHA that the current tag resolves to (v6.1.0, v2.2.0, v6.5.0, v7.0.2, v3.0.4) and pin bun-version to the current release 1.4.4. Same action versions as before, so behaviour is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pimfeltkamp
commented
Nov 8, 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
.github/workflows/cli-release.ymlruns withNPM_TOKEN,contents: writeandid-token: write, but referenced every third-party action by a mutable major tag (oven-sh/setup-bun@v2,softprops/action-gh-release@v3,actions/checkout@v6,actions/setup-node@v6,actions/upload-artifact@v7) and installed Bun withbun-version: latest. If any of those tags were moved to malicious code, or a Bun "latest" release were compromised, the job could publish a tampered@cryptohopper/clinpm package or tampered release binaries to users who hold exchange-trading tokens.What the fix does
uses:to the full 40-character commit SHA that the tag currently resolves to, with the version in a trailing comment:actions/checkout→d23441a4…(v6.1.0)oven-sh/setup-bun→0c5077e5…(v2.2.0)actions/setup-node→24997072…(v6.5.0)actions/upload-artifact→cf430e03…(v7.0.2)softprops/action-gh-release→8a0cd651…(v3.0.4, annotated tag peeled to its commit)bun-versionto"1.4.4", the current Bun release.All SHAs were resolved live from the upstream repositories' tag refs via the GitHub API during this run, and independently re-verified by a second reviewer (owners are the genuine
actions,oven-shandsoftpropsupstreams, none are forks).Why it is non-breaking
The pinned commits are exactly the commits the floating tags point to today, so the workflow runs the same action code it would run now. Bun 1.4.4 is the current
latest, and its release has assets for all fourbun build --compiletargets used inpackage.json. No inputs or steps changed.Trade-off: Dependabot or a manual bump is now needed to pick up future action/Bun versions.
Tests run
git diff --stat: 1 file changed, 8 insertions(+), 6 deletions(-).usesvalues). My own local parse attempt failed only because neitheryaml,js-yamlnor PyYAML is installed in this worktree.cli-v*tags, so it was not executed.Reviewer notes (not changed here)
ci.ymlstill usesactions/checkout@v6andactions/setup-node@v6. It holds no secrets and has no write permissions, so it is outside this finding; pinning it is a separate optional hardening.setup-bundownloads the Bun binary by version without a checksum check in this workflow. That is a residual risk weaker than a SHA pin, but far better thanlatest.🤖 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