fix(ci): allow fork-PR checkout in label-gated e2e workflow#1017
Conversation
actions/checkout v5.1.0 (2026-07-20) refuses to fetch fork PR code in pull_request_target workflows unless the step opts in via allow-unsafe-pr-checkout: true, failing e2e at the Checkout step for every fork PR (first hit: PR #1016, run 29919073197). Opt in: the mitigations the gate asks for are already in place — the run is label-gated to the maintainer-approved head SHA, the e2e-tests job holds no secrets, and the token is read-only with persist-credentials: false. Claude-Session: https://claude.ai/code/session_019NzYgutK3RsJupnSe16M1w
📦 BoxLite review — couldn't completepowered by BoxLite |
|
tester seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe persistent-runner E2E workflow enables ChangesE2E checkout
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/e2e-local.ymlTraceback (most recent call last): 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 |
Why
actions/checkout v5.1.0 (2026-07-20) refuses to fetch fork PR code in
pull_request_targetworkflows unless the step opts in viaallow-unsafe-pr-checkout: true. Every fork PR now fails e2e at the Checkout step (first hit: #1016, run 29919073197):What
Opt the e2e-tests Checkout step in. The mitigations the gate asks for already exist in this workflow: fork runs are gated on the maintainer-applied
e2e-locallabel pinned to the approved head SHA (re-label per push), the job holds no secrets, and the token iscontents: readwithpersist-credentials: false.Note: actionlint ≤1.7.11 flags the input as unknown — stale bundled schema; the input is defined in action.yml at the SHA
v5resolves to.After merge: remove and re-add the
e2e-locallabel on #1016 to re-run e2e against the fixed workflow definition (pull_request_target reads the workflow from main, so the fix takes effect only once merged).https://claude.ai/code/session_019NzYgutK3RsJupnSe16M1w
Summary by CodeRabbit