fix: pin checkout v6.0.3 for fork PR workflows#394
Merged
Conversation
Open
8 tasks
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.
Summary
Temporarily pin the
actions/checkoutsteps that fetch a pull request's head repository to the last known working v6.0.3 commit:Only checkout steps using
github.event.pull_request.head.repo.full_nameare pinned. Checkouts of trusted fixed repositories such asmatrixorigin/mo-testerandmatrixorigin/CIremain on@v6.Background
actions/checkout@v6was a floating major-version reference. On 2026-07-20, GitHub published v6.1.0 and moved thev6tag fromdf4cb1ctod23441a.v6.1.0 introduced a breaking security default that rejects checking out fork PR code from a
pull_request_targetworkflow unlessallow-unsafe-pr-checkoutis explicitly enabled. MatrixOne's PR entrypoint usespull_request_target, inherits secrets, and delegates to these reusable workflows, which explicitly check out the fork repository and branch.As a result, all fork PR jobs now fail during checkout before any MatrixOne code is built or tested. Example: matrixorigin/matrixone#25909, Actions run https://github.com/matrixorigin/matrixone/actions/runs/29756799570.
A successful job immediately before the release resolved
actions/checkout@v6todf4cb1c; a failing job 34 minutes later resolved the same reference tod23441a, with the same runner image and CI workflow revision.Scope
Pin 12 PR-head checkout steps across:
.github/workflows/ci.yaml.github/workflows/e2e-upgrade.yaml.github/workflows/e2e-compose.yaml.github/workflows/e2e-standalone.yaml.github/workflows/utils.yamlThis covers UT, SCA, upgrade, Compose/Standalone BVT, coverage, and benchmark workflows for fork PRs targeting MatrixOne
main.Security note and follow-up
This is an explicit temporary rollback to the pre-v6.1.0 behavior. It restores fork PR CI but also preserves the existing risk of executing fork-controlled code in a
pull_request_targetcontext with inherited secrets and privileged runners.The durable fix is to split the model:
pull_requestwith read-only permissions, no inherited secrets, and isolated runners;pull_request_targetfor metadata/label/authorization work only, without checking out PR code;Do not replace this pin with
allow-unsafe-pr-checkout: trueas the long-term solution.Validation
github.event.pull_request.head.repo.full_nameis pinned.@v6.git diff --checkactionlintpassed for the changed workflows after ignoring existing custom-runner-label and pre-existing expression-schema findings.