chore(ci): pin GitHub Actions to full commit SHAs - #32
Conversation
Replace mutable tag/branch references in workflow `uses:` with the full 40-character commit SHA they currently resolve to, keeping the original version as a trailing comment (e.g. `actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7`). Mutable refs let a compromised or force-pushed tag execute arbitrary code in CI with access to repository secrets. SHA pinning removes that supply-chain risk. No workflow logic, triggers, inputs, or action versions were changed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe two GitHub Actions workflows now pin checkout, Python setup, and artifact actions to specific commit SHAs instead of floating v4 references. ChangesWorkflow action pinning
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change only pins existing workflow actions to immutable commit SHAs without changing workflow behavior, permissions, inputs, or triggers. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s CI supply chain by pinning GitHub Actions uses: references in the workflows to immutable 40-character commit SHAs, reducing the risk of tag/branch retargeting.
Changes:
- Replaced mutable action refs (e.g.,
@v4,@v5) with full commit SHAs in the two existing workflow files. - Preserved the original version identifiers as trailing comments (e.g.,
# v4,# v5) for readability and tooling compatibility.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/push-to-hubspot.yml | Pins checkout, setup-python, and download-artifact actions to full commit SHAs. |
| .github/workflows/export-metrics.yml | Pins checkout, setup-python, and upload-artifact actions to full commit SHAs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Pins every GitHub Actions
uses:reference in this repository's workflows to a full 40-character commit SHA instead of a mutable tag or branch.Mutable refs (
@v4,@main,@stable, …) are re-pointable by the action owner or an attacker who compromises the action repo. Because these workflows run with repository secrets and write permissions, a moved tag is a direct supply-chain code-execution path. GitHub's own hardening guide and OpenSSF Scorecard both require full-SHA pinning.Changes
Workflow files touched:
export-metrics.ymlpush-to-hubspot.ymlResulting pinned references:
actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4Follow-up recommendation: this repo has no
.github/dependabot.yml. Adding thegithub-actionsecosystem there keeps SHA pins updated automatically (Dependabot rewrites the SHA and the trailing version comment), so pinning does not mean going stale. Not included in this PR.Testing
uses:lines only — no jobs, steps, triggers, inputs, permissions or action versions were changed (verified viagit diff --shortstat).GET /repos/{owner}/{repo}/commits/{ref}) from the exact ref previously in use; no ref failed to resolve.Memory / Performance Impact
N/A — CI configuration only.
Related Issues
N/A — part of an org-wide GitHub Actions supply-chain hardening pass across the FalkorDB organisation.
Summary by CodeRabbit