ci: disable checkout credential persistence - #469
Conversation
📝 WalkthroughWalkthroughGitHub Actions checkout steps in the CI, clippy, format, and docs jobs now disable persisted credentials on runners. ChangesWorkflow credential handling
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 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/ci.yml:
- Around line 33-34: Update both actions/checkout steps in the release workflow
to set persist-credentials to false under their with configuration. Apply the
same setting to each checkout invocation, preserving all existing checkout
options.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1bbbfe88-3690-4d53-a535-8cc2a076ed74
📒 Files selected for processing (2)
.github/workflows/ci.yml.github/workflows/lint.yml
| with: | ||
| persist-credentials: false |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 4 'actions/checkout|persist-credentials' .github/workflowsRepository: x52dev/inspect-cert-chain
Length of output: 4000
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,110p' .github/workflows/release.ymlRepository: x52dev/inspect-cert-chain
Length of output: 3931
Add persist-credentials: false to the release checkout steps.
.github/workflows/release.yml has two actions/checkout steps at lines 23 and 73, and neither sets persist-credentials: false. Add the setting to both checkout steps so release jobs do not retain credentials beyond the checkout action.
🤖 Prompt for 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.
In @.github/workflows/ci.yml around lines 33 - 34, Update both actions/checkout
steps in the release workflow to set persist-credentials to false under their
with configuration. Apply the same setting to each checkout invocation,
preserving all existing checkout options.
Disable checkout credential persistence in the workflows to prevent later steps from reusing the checkout token. git diff --check and git show --check HEAD pass.
Summary by CodeRabbit