fix(ci): do not persist the job token in .git/config in the public-repo guard - #42
fix(ci): do not persist the job token in .git/config in the public-repo guard#42yakimoto wants to merge 1 commit into
Conversation
…po guard actions/checkout without persist-credentials:false leaves GITHUB_TOKEN readable in .git/config for every later step — including the one that downloads and executes the gitleaks binary. Nothing in this job uses the credential (contents:read, gitleaks runs --no-git, no gh/push steps). Refs #1870.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7104d5d0-0b65-4711-ba4a-1db17c298291) |
ApprovabilityVerdict: Approved dd2a0b7 This is a minor CI security hardening change that adds You can customize Macroscope's approvability policy. Learn more. |
PR Summary by QodoHarden public-repo guard checkout by disabling credential persistence
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 31 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
|
This PR is redundant with #39 ( Evidence — #39's diff to + # tree. Nothing here pushes -- the scan is `--no-git` over the working tree --
+ # so no step needs authenticated Git; drop it. (zizmor: artipacked)
+ persist-credentials: false#39 is also broader than this PR: it syncs the whole vendored Closing as redundant. This duplicate exists because the fan-out that opened this PR |
Why
actions/checkoutwithoutpersist-credentials: falsewrites the job's GITHUB_TOKEN into.git/config, where any later step — or anything those steps execute — can read it. This is thesecurity gate that DOWNLOADS AND EXECUTES the gitleaks binary, and the workflow's own comment
already reasons about tampered downloads ("so a tampered or MITM'd download can never execute
inside the security gate"), so the threat model is written down and only the credential half of
the mitigation is missing. Found by zizmor as
warning[artipacked]: credential persistence through GitHub Actions artifacts.Safety
Verified this job only: checks out, installs gitleaks (pinned + checksum), runs
gitleaks detect --no-git, installs ripgrep, runscontent-policy.sh.permissions: contents: read. Nothing pushes, callsgh, or reads GITHUB_TOKEN/GH_TOKEN, so the token was never neededin
.git/configin the first place.Refs wave-av/claude-workstation#1870.
Note
Cursor Bugbot is generating a summary for commit dd2a0b7. Configure here.