Repository navigation
ci: route fork PRs to hosted runners and pin actions in secret-holding jobs - #296
Merged
Merged
Conversation
avrabe
force-pushed
the
ci/security-hardening
branch
from
October 28, 2026 15:46
6656dc5 to
0f09680
Compare
avrabe
added a commit
that referenced
this pull request
Oct 28, 2026
#296 routes fork PRs to hosted runners with `runs-on: ${{ fork && 'ubuntu-latest' || fromJSON('["self-hosted",…]') }}`. The test counted only the literal `[self-hosted, linux, x64,` list, so it read every gate as "moved back to the hosted queue" (0 of 8). It now counts either spelling; both name the class. Negative control: rewriting those jobs to a bare `ubuntu-latest` still fails the test ("ci.yml has 0 jobs on the self-hosted pool"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
Contributor
Author
|
Taking this over, as the maintainer agreed. The failing test jobs (macOS, Ubuntu and coverage) were |
avrabe
force-pushed
the
ci/security-hardening
branch
from
October 28, 2026 18:54
0f09680 to
927a129
Compare
…g jobs - route fork PRs to hosted runners - pin actions in secret-holding jobs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G5qpB7zvxLvdrvn5YRyj4R
#296 routes fork PRs to hosted runners with `runs-on: ${{ fork && 'ubuntu-latest' || fromJSON('["self-hosted",…]') }}`. The test counted only the literal `[self-hosted, linux, x64,` list, so it read every gate as "moved back to the hosted queue" (0 of 8). It now counts either spelling; both name the class. Negative control: rewriting those jobs to a bare `ubuntu-latest` still fails the test ("ci.yml has 0 jobs on the self-hosted pool"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
avrabe
force-pushed
the
ci/security-hardening
branch
from
October 29, 2026 05:33
927a129 to
0f7dac4
Compare
avrabe
enabled auto-merge (squash)
October 29, 2026 06:53
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.
Security hardening of CI workflows. Admission:
security, which the ci-status admission rule always admits.Route fork PRs to hosted runners
In
pull_request-triggered workflows,runs-onuses the warteci.ymlexpression: fork PRs go toubuntu-latest; same-repo PRs and pushes stay on the same self-hosted label as before. Matrix jobs only reroute their self-hosted entries (contains(matrix.runner, 'self-hosted')), so macOS/Windows entries are unchanged. Where a step uses a non-GITHUB_TOKENsecret (codecov uploads), it getsif: ... && github.event.pull_request.head.repo.fork != true. The guard goes on the step, not the job, so no required job is skipped on fork PRs. As the comment in the file says, this routing is a default, not a security boundary: the runner-group policy and fork-PR approval enforce isolation.Pin actions in secret-holding jobs
Every
uses:in a job that referencessecrets.(includingGITHUB_TOKEN) is pinned to a full commit SHA, with the most specific tag that points at the same commit as a trailing comment (annotated tags dereferenced). Branch refs such asdtolnay/rust-toolchain@stableare pinned to the branch's current commit; for dtolnay the branch'saction.ymlcarries the toolchain default, so behaviour is unchanged. This prepares for the org-level SHA-pinning requirement.Validation
main.runs-on,ifanduses, plus the hand edits described above.🤖 Generated with Claude Code
https://claude.ai/code/session_01G5qpB7zvxLvdrvn5YRyj4R