fix: pin 6 actions to commit SHA, extract 1 expression to env var#987
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughGitHub Actions dependencies across CI/CD workflows are pinned to specific commit SHAs for reproducibility and security. Affected actions include pnpm/action-setup, oven-sh/setup-bun, and softprops/action-gh-release. Release workflow tag validation is refactored to use an environment variable. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rity fix: pin 6 actions to commit SHA, extract 1 expression to env var
…rity fix: pin 6 actions to commit SHA, extract 1 expression to env var
Re-submission of #949. Had a problem with my fork and had to delete it, which closed the original PR. Apologies for the noise.
Summary
This PR pins all GitHub Actions to immutable commit SHAs instead of mutable version tags and extracts expressions from
run:blocks intoenv:mappings.Changes by file
How to verify
Review the diff, each change is mechanical and preserves workflow behavior:
action@v3becomesaction@abc123 # v3, original version preserved as comment${{ expr }}inrun:moves toenv:block, referenced as"${ENV_VAR}"in the scriptI wrote a scanner called Runner Guard and open sourced it here so you can scan yourself if you want to. Also put up a link to my research on Twitter if you're interested.
If you have any questions, reach out. I'll be monitoring comms.
- Chris Nyhuis (dagecko)
Summary by cubic
Hardened CI by pinning six GitHub Actions to immutable SHAs and moving one inline tag expression to an env var. This removes mutable tags and keeps builds and releases reproducible with no behavior changes.
Dependencies
pnpm/action-setup,oven-sh/setup-bun, andsoftprops/action-gh-releaseto SHAs inci.yml,reusable-test.yml,release.yml, andreusable-release.yml.Refactors
${{ github.ref_name }}intoREF_NAMEenv inrelease.ymlfor tag validation.Written for commit 28a1fbc. Summary will update on new commits.
Summary by CodeRabbit