Skip to content

Pin the ARM64 Arrow overlay to a commit before its wheels are signed - #11911

Merged
danielhanchen merged 5 commits into
mainfrom
pin-woa-arrow-overlay
Sep 25, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
pin-woa-arrow-overlay

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

What this changes

woa-wheelhouse.yml builds the Windows ARM64 pyarrow wheel from the Apache release tag and then overlays ARM64 build support from a third-party fork, MugundanMCW/arrow. That overlay was checked out by branch name (Pyarrow_WoA). The wheel it produces is Authenticode signed with our Trusted Signing credentials and --clobbered onto the rolling release that install.ps1 fetches by default on Windows ARM64.

A branch on someone else's fork is mutable, and the fork's batch files are copied into the Arrow tree and executed during the build. So whoever can push to that branch decides the contents of a binary we sign and ship. The downstream smoke tests prove the wheel works, and the signature check proves we signed it. Neither one says where the code came from.

This PR makes three changes:

  1. ARROW_WOA_REF now points to 423b9b38f85a2b7634f7fc8e4975b3ed573f3697, which is the current head of Pyarrow_WoA (2026-08-18). The build input is exactly what it resolves to today, so nothing about the wheel changes. Bumping it becomes a deliberate edit, made after reading the diff. This is the same rule as the digest pin on trusted-signing-cli in the sign job.

  2. A new step, Confirm the overlay is the pinned commit, runs before the overlay files are copied. It refuses a ref that is not a full 40-hex SHA, and it refuses a checkout whose HEAD differs from the pin.

  3. tests/security/test_woa_wheelhouse_integrity.py checks, from the workflow YAML:

    • the ref is a commit SHA;
    • the overlay checkout takes that ref;
    • the runtime check exists and runs before the overlay step;
    • the Arrow and sqlite-vec dispatch defaults are release tags, not branches;
    • publish defaults to false.

    It runs in the existing tests/security invocation in workflow-trigger-lint.yml.

Evidence

Workflow Tests failed Tests passed
main 2: test_arm64_overlay_is_pinned_to_a_commit (ref is 'Pyarrow_WoA'), test_the_run_re_checks_the_pin_before_copying_the_batch_files 3
this branch 0 5

The pinned commit exists on the fork and is still the branch head (gh api repos/MugundanMCW/arrow/branches/Pyarrow_WoA). The workflow YAML parses.

Not covered

The workflow is workflow_dispatch only and needs the Windows ARM64 runner and the signing environment, so the build itself was not run for this PR. The new step is plain pwsh and git rev-parse on the checkout directory that the overlay step already uses.

This was originally part of #11137, where it did not belong. Once this lands, the identical lines drop out of that PR's diff on its next merge from main.

danielhanchen and others added 2 commits September 25, 2026 08:57
woa-wheelhouse.yml checked out MugundanMCW/arrow at the branch Pyarrow_WoA,
copied two of its batch files into the Arrow tree and ran them. The wheel that
comes out is Authenticode signed in the release-signing job and --clobbered
onto the rolling release install.ps1 reads by default on Windows ARM64, so a
mutable ref there decides the contents of a binary we sign. The smoke tests and
the signature check prove the wheel works and that we signed it; neither says
anything about where it came from.

The ref is now the commit SHA 423b9b38f85a2b7634f7fc8e4975b3ed573f3697, which
is the branch head as reviewed and carries the same build.bat and test.bat the
overlay step already asserts on. A run-time step re-reads the checkout and
fails if it is not that commit, before anything is copied.

tests/security/test_woa_wheelhouse_integrity.py gates it: the ref must be a
40-hex commit, the checkout must use the pinned env var, the confirm step must
run before the overlay step, and the two upstream sources must stay on release
tags.
The file was added without one, which the new-file header check rejects.
No change to what it tests.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T14:51:21.743795Z 3e466e2 Manual request
🔒 Security Review ✅ Completed 2026-09-25T09:50:32.958055Z b4ecca5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: b4ecca5245

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: b4ecca5245

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 3e466e28eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 4a16bff into main Sep 25, 2026
1 of 26 checks passed
@danielhanchen
danielhanchen deleted the pin-woa-arrow-overlay branch September 25, 2026 17:44
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…nslothai#11911)

* Pin the ARM64 Arrow overlay to a commit before its wheels are signed

woa-wheelhouse.yml checked out MugundanMCW/arrow at the branch Pyarrow_WoA,
copied two of its batch files into the Arrow tree and ran them. The wheel that
comes out is Authenticode signed in the release-signing job and --clobbered
onto the rolling release install.ps1 reads by default on Windows ARM64, so a
mutable ref there decides the contents of a binary we sign. The smoke tests and
the signature check prove the wheel works and that we signed it; neither says
anything about where it came from.

The ref is now the commit SHA 423b9b38f85a2b7634f7fc8e4975b3ed573f3697, which
is the branch head as reviewed and carries the same build.bat and test.bat the
overlay step already asserts on. A run-time step re-reads the checkout and
fails if it is not that commit, before anything is copied.

tests/security/test_woa_wheelhouse_integrity.py gates it: the ref must be a
40-hex commit, the checkout must use the pinned env var, the confirm step must
run before the overlay step, and the two upstream sources must stay on release
tags.

* Add the AGPL-3.0 header to the woa-wheelhouse integrity test

The file was added without one, which the new-file header check rejects.
No change to what it tests.

* Trim comments in the ARM64 Arrow overlay pin

* Drop the ARROW_WOA_REF comment the guard and test already enforce

---------

Co-authored-by: danielhanchen <[email protected]>
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