Repository navigation
Conversation
A scheduled ci.yml run resolves needs.changes.outputs.checkout_ref to a dev commit while the run carries the default branch's Actions-cache scope. setup-bun saves the installed executable into that cache in its post step, so code executed from the checked-out ref could write a default-branch cache entry that privileged consumers (release.yml, including the OIDC provenance job) restore later — the actions/cache-poisoning/poisonable-step chain. Every other trigger checks out the run's own ref, where the cache stays branch-scoped, so the cache is only disabled on schedule. Addresses code-scanning alerts #243 and #244. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
|
Residual note for security review: this change closes the only Actions-cache writer on the affected jobs ( |
|
✅ Deterministic PR hygiene checks passed. |
|
Correction to my earlier diagnosis and residual-risk comment: the flagged checkout does not consume an untrusted revision in this fork. On Also, I am withdrawing this PR and dismissing #243/#244 as false positives with the data-flow rationale. The earlier local workflow-test pass was not evidence that either security alert was fixed. No workflow or CI gate change is required. |
Summary
Withdrawn after rechecking the checkout reference and the CodeQL query. The initial diagnosis of alerts #243/#244 was incorrect for this fork; this patch should not be merged.
6da2774369aa32552e318e333902499683d053bc,changes.nightlyemits an emptycheckout_reffor every event exceptschedule. The pinnedactions/checkoutinterprets an empty ref as the workflow event's ref/SHA.schedule, the job resolves onlyrepos/${GITHUB_REPOSITORY}/commits/devand validates the returned SHA. The fork's actual default branch isdev, so this is not an external PR head or a lower-trust dispatch input.workflow_dispatchexposes only thelanechoice; it does not accept a checkout revision. A pull request's job outputs are not reused by a scheduled or dispatched run.setup-bun's cache does not revoke the job's Actions runtime cache access. It therefore would not remedy execution of genuinely untrusted code in a cache-write-capable job.Alerts #243/#244 are false positives for the examined data flow. No workflow, security configuration, or CI gate change is needed.
Verification
changes.outputs.checkout_refand the complete producer at ci.yml lines 531–548.devthrough the repository API.CachePoisoningViaPoisonableStep.qlandUntrustedCheckoutQuery.qll: the finding concerns executing untrusted code with runtime cache access, not the presence of a particular cache-saving action.Checklist