ci(verify-pr): enable fork-PR dispatch via pull_request_target + ok-to-test - #306
Conversation
…o-test Switch fullsend-verify-pr.yml from pull_request to pull_request_target so fork-origin PRs get the upstream vars/secrets/OIDC the mint step needs (fixes "FULLSEND_MINT_URL is not set"; fullsend ADR-0009). The workflow still never checks out or executes fork code — it builds the dispatch matrix from github.event alone and hands off to reusable-dispatch.yml. Add an ok-to-test maintainer-label gate as defense-in-depth: fork PRs dispatch only after a maintainer applies the label; the remove-ok-to-test job strips it on every new push (synchronize) to force re-review. Same-repo PRs are unchanged. Update fullsend.md with the pull_request_target + ok-to-test model and remove the obsolete "upstream head branch required" framing. Implements TC-6331 Assisted-by: Claude Code Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reviewer's GuideThe PR enables verify-pr dispatches for fork-origin pull requests by using Sequence diagram for gated fork PR verification dispatchsequenceDiagram
actor Maintainer
participant GitHub as GitHub pull_request_target
participant Verify as fullsend-verify-pr.yml
participant Dispatch as reusable-dispatch.yml
participant Fullsend as Fullsend service
GitHub->>Verify: pull_request_target opened/reopened
Verify->>Verify: wait-for-checks
Verify->>Dispatch: dispatch matrix from github.event
Dispatch->>Fullsend: mint and run verify-pr
Maintainer->>GitHub: Apply ok-to-test label
GitHub->>Verify: pull_request_target labeled
Verify->>Verify: wait-for-checks
Verify->>Dispatch: dispatch matrix from github.event
Dispatch->>Fullsend: mint and run verify-pr
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. This changes the workflow trust boundary so fork-controlled pull requests can trigger base-branch code with upstream secrets and OIDC credentials. If the event-data or reusable-workflow handoff permits credential exfiltration or an unauthorized dispatch, credentials or access could be exposed outside the repository and reverting would not undo that exposure.
Summary
Enables
fullsend-verify-pr.ymlto dispatch on fork-origin PRs by switching the trigger frompull_requesttopull_request_target(fullsend ADR-0009). Apull_requestrun on a fork head gets no upstream vars/secrets/OIDC, so the mint step failed withFULLSEND_MINT_URL is not set;pull_request_targetruns the base-branch workflow with full credential access.Safety is preserved by not checking out or executing fork code — the workflow builds the dispatch matrix from
github.eventalone and hands off toreusable-dispatch.yml(which does its own checkout/mint in base-repo context).Defense-in-depth: an
ok-to-testmaintainer-label gate.ok-to-test.remove-ok-to-testjob strips the label on every new push to a fork PR, forcing re-review.Changes
.github/workflows/fullsend-verify-pr.yml—pull_request_targettrigger (+labeled);ok-to-testgate onwait-for-checks; newremove-ok-to-testjob.fullsend.md— new Fork PRs subsection documenting the model; obsolete "upstream head branch required" framing removed/annotated.Verification
pytest147 passed;claude plugin validatepassed;skillsaw0 errors.actions/checkoutof PR head anywhere.Implements TC-6331
🤖 Generated with Claude Code
Summary by Sourcery
Enable safe verification dispatches for fork pull requests with maintainer approval while retaining automatic verification for same-repository changes.
New Features:
ok-to-testmaintainer label before running verification for fork pull requests, with the label removed after new commits.Bug Fixes:
Enhancements:
CI:
Documentation:
pull_request_targetsecurity model, maintainer-label approval flow, and removal of the former upstream-branch requirement.