ci: disable credential persistence in build-validation checkout#1901
Conversation
The build-validation job only reads the repository and never pushes or fetches with the token after checkout, so persisting credentials in the git config is unnecessary. Explicitly set persist-credentials: false as a hardening default (zizmor 'artipacked' finding). Suggested by CodeRabbit during review of maester365#1899.
There was a problem hiding this comment.
Pull request overview
Hardens the CI build-validation workflow by preventing GitHub’s checkout action from persisting the workflow token in the local git config after checkout, aligning with the job’s read-only usage.
Changes:
- Set
persist-credentials: falseon theactions/checkoutstep inbuild-validation.yaml. - Added inline comments documenting why credential persistence is disabled.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesCheckout Hardening
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 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 |
Up to standards ✅🟢 Issues
|
TL;DR
Sets
persist-credentials: falseon theactions/checkoutstep inbuild-validation.yaml. This job only reads the repository and never pushes or fetches with the token after checkout, so persisting the credential in the git config is unnecessary. Low-cost hardening default (zizmorartipackedfinding).Scope
Intentionally limited to
build-validation.yaml. The publish workflows are excluded because they usestefanzweifel/git-auto-commit-actionto commit website version bumps, which requires the persisted checkout credential.Follow-up to review feedback on #1899. Minimal 4-line diff (the file's existing mixed line endings are left untouched here; normalization is proposed separately in #1900).
Suggested by CodeRabbit.
Summary by CodeRabbit