ci: a fork can no longer take the judge-change exemption - #2144
Merged
Conversation
The exemption that lets a maintainer change the release verifier keyed on the branch NAME. A fork chooses its own branch names, so a pull request from a fork on a branch called policy-update/... skipped both the judge comparison and the artifact verification, and reported the required check green on a tree that had never been verified. With no approving review required, nothing automated stood between such a pull request and a merge. Every exemption is now gated on the pull request originating in this repository (head.repo.full_name == github.repository), which the head cannot forge. A fork always takes the strict path. Also refragments the private repository's name in the verifier's leak pattern. It was published verbatim in the one control built to keep it out of the release, and did not self-trip only because the character preceding it is the b of \b. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
A policy-update change: it modifies the release verifier and its workflow, so it lands on its own and is judged by the verifier currently on
main.The bug
The exemption that lets a maintainer change the verifier keyed on the branch name:
HEAD_REFisgithub.event.pull_request.head.ref— and a fork chooses its own branch names. A pull request from a fork on a branch calledpolicy-update/anythingskipped the judge comparison and then skipped artifact verification, reporting the required check green on a tree that was never verified.With
required_approving_review_count: 0, nothing automated stood between such a pull request and a merge. The workflow's own header comment — "a PR cannot edit the judge that evaluates it" — was not true as written.The fix
Every exemption is now gated on an identity the head cannot forge:
A fork always takes the strict path — judge comparison enforced, artifact verification enforced.
Also
The private repository's name was published verbatim in the verifier's own leak pattern — the single control built to keep that string out of the release. It did not self-trip only because the character preceding it is the
bof\b. It is now assembled from fragments, as the allowlist keys already were, and still detects a real occurrence.