Pin github actions with ratchet - #413
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe pull request pins GitHub Actions to commit SHAs, adds Ratchet-based verification, and corrects the release workflow event structure. ChangesGitHub Actions pinning
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 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: 2
🤖 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/build-image.yaml:
- Line 25: Disable credential persistence for every actions/checkout step: add
persist-credentials: false at .github/workflows/build-image.yaml:25,
.github/workflows/e2e.yaml:18 and 34, .github/workflows/license-scan.yaml:17,
.github/workflows/rust.yaml:20, 30, and 42, and .github/workflows/tests.yaml:18.
In @.github/workflows/ratchet-check.yaml:
- Around line 5-6: Extend Ratchet enforcement to composite actions: in
.github/workflows/ratchet-check.yaml lines 5-6 add .github/actions/** to the
pull-request paths, and in lines 24-26 add glob patterns for
.github/actions/**/*.yaml and .github/actions/**/*.yml; in make/verify.mk lines
14-18 include .github/actions in both find expressions.
🪄 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: ce83bc5b-0510-4c9f-89ed-82d5d2fc66f7
📒 Files selected for processing (12)
.github/actions/setup-rust-wasm/action.yaml.github/workflows/automated-release.yaml.github/workflows/build-image.yaml.github/workflows/e2e.yaml.github/workflows/issues-workflow.yaml.github/workflows/license-scan.yaml.github/workflows/ratchet-check.yaml.github/workflows/release.yaml.github/workflows/rust.yaml.github/workflows/sector-release.yaml.github/workflows/tests.yamlmake/verify.mk
Signed-off-by: averevki <sandyverevkin@gmail.com>
c06abb4 to
d4816b7
Compare
| runs-on: ubuntu-latest | ||
| name: Check pinned actions | ||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # ratchet:actions/checkout@v4 |
There was a problem hiding this comment.
Any reason to use checkout@v4 vs checkout@v6 used elsewhere in the project?
Summary
ratchet-checkCI workflow that lints pull requests for unpinned action referencesratchet,ratchet-pin, andverify-ratchetmake targets inmake/verify.mkPart 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
Bug Fixes
Developer Tools