Repository navigation
fix(ci): hash-check the publish gate before the patch carry imports it - #16894
Conversation
The run job's carry step scanned an oversize patch with the read-patch/publish-gate.mjs copy, which head code can rewrite in RUNNER_TEMP, and checked nothing before importing it. patch_is_clean now imports the gate only when the copy is a regular file whose SHA-256 equals gate-sha256, recorded by seal-copy from the base before the head checkout, and re-hashes the bytes inside the scan process just before the import. A planted, linked or missing gate makes the scan answer hit, so the oversize patch holds. Closes #16813 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #16894No security issues found. This pull request only tightens a check. What changed. In
The node process also hashes the bytes again just before the dynamic What I checked.
Trusted-path scrutiny: critical-findings: 0 |
|
claude-review reviewed Code review: no findingsWhat changed. In Correctness checks (from reading the code; I ran nothing):
Closing issue #16813:
The PR body says 289/289 tests pass and that actionlint and zizmor are clean. That is the author's claim; I did not check it. Neither the PR body nor the issue contains embedded instructions. Loosened-check verdict: none. The wrapper supplied no verdict or patterns, so this review used Verifier dropped 0 of 0 candidates. |
Closes #16813
Summary
The read runner's run job scans an oversize patch with the
read-patch/publish-gate.mjscopy before refusing it. Code from the PR head can rewrite that copy inRUNNER_TEMP, and nothing checked it before the import, so a planted gate could make that first-pass scan answer clean. The scan job re-scans with the gate fetched from main, so this is hardening, not an open path.Fix
GATE_SHA256fromsteps.seal-copy.outputs.gate-sha256, the hash recorded from the base before the head checkout (added by feat(ci): carry the read runner's leg transcript to a clean upload job #16805).patch_is_cleanreturns "hit" unless the copy is a regular file, not a link, whose SHA-256 matches. Inside the scan process the bytes are hashed again just before the import.patch-scan=hit), and nothing is carried.Verification
node --test --test-concurrency=4 .github/actions/resolve-config/callers.test.mjs: 289/289 pass. That includes a new test which:seal-copy, recorded before head code;actionlintandzizmor --offlineonpr-run-activity-read.ymlreport no findings..githubsuite, which CI runs.Related
gate-sha256and the same check on the transcript scan.🤖 Generated with Claude Code