Skip to content

glaeda-cmux-runner: trusted-only runners for a mini that holds a secret - #1203

Merged
teamleaderleo merged 2 commits into
mainfrom
runner-trusted-ref
Sep 25, 2026
Merged

teamleaderleo merged 2 commits into
mainfrom
runner-trusted-ref

Conversation

@teamleaderleo

Copy link
Copy Markdown
Owner

Leo wants cmux7s (the fleet-cas signing writer) to run builds again. Its signing key is readable by the build user, so it must never run PR code (see docs/experiments/fleet-compilation-cache-signed-writes-2026-09-24.md, Limits).

  • overrides.runner.trustedRef in the manifest (validated as refs/heads/...).
  • Such a member gets the pool label glaeda-trusted-<class>-xcode-<version> and glaeda-trusted in place of the std pool label, so the PR picker never counts or routes to it.
  • The installer bakes --trusted-ref REF into the job-started hook. The hook refuses unless the event is push, schedule or workflow_dispatch and GITHUB_REF equals REF, and for a push the payload ref must match too. pull_request, merge_group and workflow_run are refused. That holds even if a PR's workflow names the trusted label, because the hook lives on the host.
  • Docs: CMUX_MINI_RUNNER.md 2e.

Tests: a table for the hook gate (main push, schedule, and dispatch are admitted; branch dispatch, branch push, mismatched payload, PR, merge queue, and a missing ref are refused), pool labels and validation, and the baked hook flag. 81 runner tests, the fleet and mini-fleet suites pass.

A follow-up (separate-user runner on 7s, so PR jobs can run there too) needs Leo's sudo to create the user.

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits September 24, 2026 21:36
A host's overrides.runner.trustedRef (refs/heads/main) gives its runners their own
glaeda-trusted-<class>-xcode-<version> pool and a hook gate that admits only push,
schedule and workflow_dispatch jobs on that ref, so the fleet-cas writer mini can run
main and nightly builds without ever running PR code as the user that reads the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d cross-checks

Review: a dispatch on main can check out any ref from its inputs, and an org-scoped
runner would take main of any org repo. Drop workflow_dispatch, require trustedRepo
with trustedRef, match repository/ref/default branch in env and payload, refuse payloads
carrying pull_request, workflow_run or merge_group, and document the limits the gate
cannot see (push rules, pinned actions, PR-writable caches, runner group scope).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 29a1f59 into main Sep 25, 2026
4 checks passed
@teamleaderleo
teamleaderleo deleted the runner-trusted-ref branch September 25, 2026 01:56
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