feat(controls): ship pull-request-target-with-head-checkout (ISSUE-804)#190
Open
stephrobert wants to merge 1 commit into
Open
feat(controls): ship pull-request-target-with-head-checkout (ISSUE-804)#190stephrobert wants to merge 1 commit into
stephrobert wants to merge 1 commit into
Conversation
Promote pullRequestTargetMustNotCheckoutHead out of the dev bench: registry, plumberconfig (schema + struct), catalog, MR-comment ordering, the `config init` wizard and .plumber.yaml are all wired so the control ships enabled. The rule now abstains when the job carries an `if:` guard that restricts execution to same-repository pull requests (`head.repo.full_name == github.repository`, or a `head.repo.fork` check). Fork-controlled code never runs under such a guard, so the exploit does not apply. Without this, a correctly mitigated workflow was reported critical. Verified against a sweep of 20 popular OSS repositories: the single ISSUE-804 hit (sveltejs/svelte) is a guarded job and is now correctly silenced, while the unguarded head-checkout fixtures still fire. Closes getplumber#181
Contributor
|
Thanks for the PR @stephrobert! We'll review it ASAP. |
Collaborator
|
Will handle this tomorrow |
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.
What
Promotes
pullRequestTargetMustNotCheckoutHead(rulepull-request-target-with-head-checkout,ISSUE-804, severitycritical) from the dev bench to a shipping GitHub control.
Why
The control flags the tj-actions / CVE-2025-30066 vector: a workflow
triggered by
pull_request_targetthat checks out the pull-requesthead, placing base-repo secrets and fork-controlled code in the same
run.
How
configuration/registry.go; wired throughplumberconfig(validation schema + typed struct),control/catalog.go,control/mrcomment.go, theconfig initwizard and.plumber.yaml.if:guard thatrestricts execution to same-repository pull requests
(
head.repo.full_name == github.repository, or ahead.repo.forkcheck). Fork-controlled code never runs under such a guard, so
flagging the job would be a false positive.
Validation
TestIssue415extended to 5 cases (2 violations, 3 clean — includingthe fork-guard case).
make build && make test && make lintall green.(
sveltejs/svelte) is a guarded job — correctly silenced by theguard exclusion, while the unguarded head-checkout fixtures still
fire.
Closes #181