Documentation
¶
Overview ¶
Command runnerguard audits who can run code on an organisation's self-hosted runners.
For each organisation it lists every runner group that admits a PUBLIC repository and flags it when
- the organisation's fork pull request approval is weaker than all_external_contributors (a stranger's pull request then runs on our machines without anyone looking at it), or
- a workflow on a repository's default branch can reach a self-hosted job from a pull_request_target trigger (that trigger runs with the base repository's secrets and token, on a runner we own, on behalf of anyone).
"Unread" is a verdict of its own, never "clean": a setting that could not be read, a workflow that could not be parsed, a job whose runs-on is an expression or a reusable workflow, whose inside this command does not open.
Everything is a GET. The token comes from a 0600 file (default ~/.github-token, scope admin:org plus repo read) and goes only in the Authorization header; https only (http for 127.0.0.1 test servers); redirects refused; responses bounded.
References (opened 2026-11-28):
https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions
"self-hosted runners should almost never be used for public repositories"
https://docs.github.com/en/rest/actions/self-hosted-runner-groups
GET /orgs/{org}/actions/runner-groups, .../{id}/repositories; fields
visibility, allows_public_repositories, restricted_to_workflows, selected_workflows
GET /orgs/{org}/actions/permissions/fork-pr-contributor-approval -> {"approval_policy": ...}