ci: opt in to fork-PR checkout after the actions/checkout guard change#109
Open
edenbd1 wants to merge 1 commit into
Open
ci: opt in to fork-PR checkout after the actions/checkout guard change#109edenbd1 wants to merge 1 commit into
edenbd1 wants to merge 1 commit into
Conversation
actions/checkout v4.4.0, published 2026-07-20 at 15:36 UTC, backported a guard that refuses to check out fork pull-request code from a pull_request_target workflow. The previous v4 release was v4.3.1 from 2025-11-17, so any workflow on the floating @v4 tag picked the new behaviour up without changing on its own side. Every submission PR from a fork now fails at the checkout step, before the validation script runs at all. The affected step only reads the checked-out files as data, never executes them, and already sets persist-credentials: false, so opting in restores the previous behaviour without widening what the workflow trusts. Verified on a four-run reproduction at https://github.com/test-readme/checkout-guard-repro : a fork PR on @v4 fails, the same PR on @v4.3.1 passes, the same PR on @v4 with this opt-in passes, and a same-repo PR on @v4 passes without it.
|
|
Author
|
One thing worth flagging so the red check here does not read as a contradiction: this PR's own
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every submission PR from a fork currently fails
validate, including ones whose content is fine. The job dies at Checkout PR head and the Run validation step is skipped, so the workflow never reads the submission at all.Cause
actions/checkoutv4.4.0 was published on 2026-07-20 at 15:36 UTC and backported a guard that refuses to check out fork pull-request code from apull_request_targetworkflow. The previous v4 release was v4.3.1, from 2025-11-17, so this workflow picked the new behaviour up through the floating@v4tag without changing on its own side.Verification
I reproduced it in a scratch repository rather than guessing, holding everything constant but one variable at a time: https://github.com/test-readme/checkout-guard-repro
@v4(now v4.4.0)@v4.3.1pinned@v4@v4Runs 1 and 2 isolate the cause: same pull request, same content, only the action version differs. Runs 1 and 4 isolate the trigger: only the fork differs. Run 3 is this patch.
The change
One line on the step that checks out the fork's head. That step reads the checked-out files as data, never executes them, and already sets
persist-credentials: false, so opting in restores the previous behaviour without widening what the workflow trusts. Pinning to@v4.3.1would also work but leaves the guard off indefinitely.Found this while looking into why the
validatejob went red on #64. Happy to close if you would rather handle it differently.