Skip to content

ci: route PR jobs to the pool only when the head repository is ours - #370

Merged
avrabe merged 2 commits into
mainfrom
ci/fork-fallback-fail-closed
Nov 18, 2026
Merged

avrabe merged 2 commits into
mainfrom
ci/fork-fallback-fail-closed

Conversation

@avrabe

@avrabe avrabe commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

21 runs-on expressions across ci.yml, systest.yml, fuzz.yml and gate-probe.yml chose the runner with github.event.pull_request.head.repo.fork && 'ubuntu-latest' || <pool>. That check fails open: a PR from a deleted fork has head.repo null, .fork is then not true, and the job runs on the self-hosted pool.

The new form sends a job to the pool only for a non-PR event (merge_group) or a pull_request whose head.repo.full_name == github.repository. Every other case goes to ubuntu-latest, including a null head repository:

runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","linux","x64","light"]') || 'ubuntu-latest' }}

The rust-cpu jobs change the same way. In the ci.yml matrix, hosted entries such as macos-latest keep their own runner. Job and check names are unchanged, so the required contexts still match. Fork PRs never reach the self-hosted pool under this form. As the existing comment says, the routing is not the security boundary (a fork can edit the workflow); the runner-group policy and fork-PR approval are.

Evidence: all four workflows parse as YAML, and grep head.repo.fork .github/workflows is empty. No test or tool reads these expressions. This PR's own CI is the check that same-repo PRs still land on the pool.

Reported by the org's security sweep, relayed by smithy.

Supply-chain gate

cargo deny failed on every branch for two new advisories, so this PR also carries 0121bc7:

🤖 Generated with Claude Code

https://claude.ai/code/session_01KEjmjczUmt6Rdd9DRKe75Z

@avrabe
avrabe force-pushed the ci/fork-fallback-fail-closed branch 2 times, most recently from 93faa12 to a36618f Compare November 14, 2026 19:19
The 21 `runs-on` expressions sent a job to GitHub-hosted runners when
`github.event.pull_request.head.repo.fork` was true, and to the
self-hosted pool otherwise. A deleted fork leaves head.repo null, so .fork
is not true and the job landed on self-hosted: the fallback failed open.

They now reach the pool only for a non-PR event (merge_group) or a
pull_request whose head.repo.full_name equals github.repository; anything
else, including a null head repository, gets ubuntu-latest. The matrix
form in ci.yml keeps hosted entries (macos-latest) on their own runner.

Reported by the org's security sweep, relayed by smithy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEjmjczUmt6Rdd9DRKe75Z
@avrabe
avrabe force-pushed the ci/fork-fallback-fail-closed branch from a36618f to b0393dd Compare November 17, 2026 18:38
…til wsc drops chrono

rustix 1.1.4 has unsound xattr functions (RUSTSEC-2026-0486); 1.1.6 is
the patched release and declares rust-version 1.65. Cargo.lock only.

chrono is now flagged unmaintained (RUSTSEC-2026-0543, no patched
release), which fails cargo deny on every branch. chrono reaches varve
only through sigil's wsc 0.11.0 and wsc-attestation 0.11.0/0.12.0, the
latest published versions. The ignore names its removal condition,
tracked in pulseengine/sigil#382.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEjmjczUmt6Rdd9DRKe75Z
@avrabe
avrabe merged commit 1ebb49d into main Nov 18, 2026
53 checks passed
@avrabe
avrabe deleted the ci/fork-fallback-fail-closed branch November 18, 2026 00:34
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