ci: don't persist credentials in lint/test checkout steps - #85
Conversation
None of the lint or test jobs push commits or run authenticated git commands, yet actions/checkout persists the GITHUB_TOKEN in the local git config by default. Setting persist-credentials: false limits the blast radius if a compromised dependency step reads the git config.
PR Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #85 +/- ##
=======================================
Coverage 96.37% 96.37%
=======================================
Files 17 17
Lines 496 496
=======================================
Hits 478 478
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
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 (1)
📝 WalkthroughWalkthroughChangesWorkflow credential handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Background
actions/checkoutpersists theGITHUB_TOKENin the local git config by default, so any step that later reads git config (e.g. a compromised dependency step) could exfiltrate it.Problem
The lint and test jobs in
python-package.ymlnever push commits or run authenticated git commands, so the persisted credentials are pure risk with no benefit.What this PR changes
Adds
persist-credentials: falseto the two pre-existingactions/checkout@v7steps (lint and test jobs). Flagged by CodeRabbit on #65; kept out of that PR since it's unrelated to the parallelization work there.Tests
CI still runs (lint, full test matrix, coverage) and passes — the change only affects token persistence, not job behavior.
Summary by CodeRabbit