Skip to content

fix: pin checkout v6.0.3 for fork PR workflows#394

Merged
aptend merged 1 commit into
matrixorigin:mainfrom
aptend:fix/pin-checkout-v6-0-3-fork-ci
Jul 20, 2026
Merged

fix: pin checkout v6.0.3 for fork PR workflows#394
aptend merged 1 commit into
matrixorigin:mainfrom
aptend:fix/pin-checkout-v6-0-3-fork-ci

Conversation

@aptend

@aptend aptend commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Temporarily pin the actions/checkout steps that fetch a pull request's head repository to the last known working v6.0.3 commit:

df4cb1c069e1874edd31b4311f1884172cec0e10

Only checkout steps using github.event.pull_request.head.repo.full_name are pinned. Checkouts of trusted fixed repositories such as matrixorigin/mo-tester and matrixorigin/CI remain on @v6.

Background

actions/checkout@v6 was a floating major-version reference. On 2026-07-20, GitHub published v6.1.0 and moved the v6 tag from df4cb1c to d23441a.

v6.1.0 introduced a breaking security default that rejects checking out fork PR code from a pull_request_target workflow unless allow-unsafe-pr-checkout is explicitly enabled. MatrixOne's PR entrypoint uses pull_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@v6 to df4cb1c; a failing job 34 minutes later resolved the same reference to d23441a, 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.yaml

This 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_target context with inherited secrets and privileged runners.

The durable fix is to split the model:

  • run untrusted PR code under pull_request with read-only permissions, no inherited secrets, and isolated runners;
  • keep pull_request_target for metadata/label/authorization work only, without checking out PR code;
  • gate genuinely privileged tests by exact head SHA and run them with short-lived, least-privilege credentials in an isolated environment.

Do not replace this pin with allow-unsafe-pr-checkout: true as the long-term solution.

Validation

  • Confirmed the pinned SHA is the v6.0.3 release commit.
  • Confirmed every checkout step that uses github.event.pull_request.head.repo.full_name is pinned.
  • Confirmed fixed-repository checkout steps remain unchanged on @v6.
  • git diff --check
  • actionlint passed for the changed workflows after ignoring existing custom-runner-label and pre-existing expression-schema findings.

@aptend
aptend merged commit a4951ec into matrixorigin:main Jul 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant