roadmap

Security: what an owned runner exposes, and the settings that narrow it

An appendix to gating-ci-rents-more-concurrency-before-it-owns-a-runner.md, which keeps the threat model and the preconditions. This file holds GitHub's own words, what this repository already sets, what a job could reach, the stronger VM shape, and the pull-request settings behind option (e). Everything was read on 2026-10-24 (UTC).

What GitHub says

From GitHub's secure-use reference: self-hosted runners "should almost never be used for public repositories on GitHub", because "any user can open pull requests against the repository and compromise the environment." They "can be persistently compromised by untrusted code in a workflow." Just-in-time runners "perform at most one job before being automatically removed", yet "there is no way to guarantee that a self-hosted runner only runs one job", and "re-using hardware to host JIT runners can risk exposing information from the environment."

From the runner-group page: Team organizations may create runner groups, restricted to chosen repositories. "By default, only private repositories can access runners in a runner group, but you can override this." So a public repository's runner group is an override an owner sets on purpose.

What this repository already sets

setting value read with
fork pull request workflows approval required from all_external_contributors gh api repos/nifeos/nife/actions/permissions/fork-pr-contributor-approval
default GITHUB_TOKEN read, cannot approve reviews .../actions/permissions/workflow
actions pinned by SHA required .../actions/permissions
pull requests enabled, pull_request_creation_policy: all gh api repos/nifeos/nife
forking allowed; one fork exists, the maintainer's own the same, and .../forks
interaction limits none set on the repository .../interaction-limits

In the tree: no workflow triggers on pull_request_target, and three label bots say in their headers why they refuse it. No workflow triggers on issues or issue_comment, so a stranger's comment runs nothing. No gating workflow reads a secret; the App key appears only in scheduled and cadence workflows. The gating workflows use two third-party actions, Swatinem/rust-cache and taiki-e/install-action, both pinned by SHA. The last 1,000 pull requests came from no fork, and the last 100 issues were opened by the maintainer or nife-smelter[bot].

What a job could reach

Inside any job, hosted or owned: its disk and memory, a read-only token for a public repository, the Actions cache for its own ref, and whatever egress allows. A malicious commit can make its own checks green on hosted runners too, because it carries the workflow file.

What an owned runner adds:

The stronger shape: a VM per job

When the threat model includes code from people who are not the maintainer, the lighter preconditions stop being enough, and these take their place:

  1. A fresh virtual machine per job from a pinned image, registered just in time and destroyed after one job. Gating jobs need /dev/kvm for swish-check-x86_64, so the VM needs nested virtualization. A microVM (Firecracker or Cloud Hypervisor, recalled, not read) or a plain KVM guest serves.
  2. No maintainer credential on the hypervisor host: a host of its own, or the lane work moved into a VM of its own.
  3. Its own network segment, with no local area network route and outbound denied by default.
  4. A launcher selftest that refuses a VM configuration with a host mount, a local area network route or a reused disk.

The outsider pass, as a pattern to copy

helpers/launch_pass.py runs an outside reviewer in rootless podman inside a Linux VM. The container gets the clone, a results directory and one volume, and "nothing else of the host: no home directory, SSH key, gh token or MCP configuration." Its selftest fails if a podman run carries --privileged, --network, --volume, --cap-add or eight other flags. That refusal is rung two of AGENTS.md's ladder, and a runner launcher should carry the same kind. The pass does not limit egress and keeps its volume across runs; a runner needs both.

Pull-request settings: option (e)

GitHub's REST reference for updating a repository lists two settings, and gh api repos/nifeos/nife returns both:

It is a per-repository setting, so other nifeos repositories keep pull requests open. The org-wide policies could not be read: they need the admin:org scope, which this token lacks.

What collaborators_only blocks: a stranger opening a pull request. With no pull request, no fork code reaches a workflow at all.

What it does not block, by GitHub's documentation or its silence:

The other candidates:

Does (e) make routing pull-request jobs to an owned runner safe? It removes the stranger's pull request by construction, which is the case GitHub's warning is about. The other four threats are unchanged, and they apply to pull-request and merge-group runs alike, since lanes push and enqueue their own work. It does not change the routing either. calef's ruling keeps every job reachable from pull_request on hosted runners whatever the policy says, because a lint over the workflows can check that rule and cannot check who opened a pull request. A reviewed outside change reaches owned runners only after a member re-pushes its exact commits to a branch here.