Pin github actions with ratchet - #276
Conversation
Signed-off-by: averevki <sandyverevkin@gmail.com>
📝 WalkthroughWalkthroughThe workflows now pin GitHub Actions to immutable commit SHAs. The Makefile adds versioned Ratchet tooling and pinning commands. CI runs Ratchet verification and includes it in required checks. ChangesGitHub Actions pinning
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test.yaml:
- Around line 212-226: Add a job-level permissions block to the verify-ratchet
job, granting only read access needed for checking out repository contents
(contents: read) and denying all other permissions by default. Keep the existing
checkout, Go setup, and make verify-ratchet steps unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c849aaa1-77cb-4e7b-bd7e-29a2e8734275
📒 Files selected for processing (10)
.github/workflows/build-images-base.yaml.github/workflows/build-images-for-tag-release.yaml.github/workflows/build-images-nightly.yaml.github/workflows/delete-release-helm-chart.yaml.github/workflows/issues-workflow.yaml.github/workflows/release-helm-chart.yaml.github/workflows/release.yaml.github/workflows/test.yamlMakefilemake/verify.mk
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
- Coverage 77.83% 76.51% -1.32%
==========================================
Files 18 18
Lines 1137 1137
==========================================
- Hits 885 870 -15
- Misses 204 214 +10
- Partials 48 53 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
ratchet-pinandverify-ratchetMake targets for pinning and verifying action referencesverify-ratchetjob to the existing CI workflow to block PRs with unpinned action referencesPart of the work on Kuadrant/kuadrant-operator#2055
Motivation
Tags are mutable — action maintainers can force-push them, silently changing the code our CI runs. Pinning to commit SHAs makes each reference immutable, mitigating supply-chain attacks.
Summary by CodeRabbit
Security & Reliability
Maintenance