Stop privileged workflows from checking out artifact-selected SHAs - #1248
Conversation
|
Skipping CI for Draft Pull Request. |
Sandbox test results
Static review
Happy path (same-repo push)Pushed
Checkout logged Negative path (fork PR)Opened sandbox PR #11 from
Skip is from the VerdictPass for the change in this PR: same-repo triggers still check out Residual risk (not a failure of this PR)
A smoke test on |
Fork PRs could place an arbitrary fork-network SHA in the producer artifact and bypass actions/checkout's unsafe-checkout guard. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Eric Sauer <esauer@redhat.com>
751514b to
947123a
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgruver The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
Linked Issues
related to Red Hat PSIRTSUPT-22553 / BOOST-VPD-2026-044
Description
Privileged
workflow_runjobs intest-images.ymlandintegration-tests.ymlchecked out whatever SHA the untrusted producer artifact supplied asbranch_ref. A fork pull request can put a different fork-network commit in that artifact and bypassactions/checkout's unsafe-checkout guard, then run with Quay and other secrets.These consumers now check out
github.event.workflow_run.head_sha, skip unless the triggering repository is this repo, and disable persisted git credentials after checkout.Testing Instructions
workflow_runhead SHA (notbranch_reffrom the artifact).head_repositorycondition).Made with Cursor