Securing Your Own GitHub Actions Runners

Your own Actions runner executes whatever workflow code ships in an incoming pull request — on a public repository, that means an attacker-controlled PR can potentially run on it, unless it's gated. Here are the real hardening steps, whether the runner is registered against GitHub itself or against Rithub.

The actual risk, stated plainly

This isn't theoretical — security researchers have documented it repeatedly: a runner you register yourself against a public repo will run a workflow defined in a pull request from anyone who opens one, by default. The runner doesn't know the difference between a trusted maintainer's push and an unknown contributor's PR unless it's configured to.

The real fixes, in order

  1. Require approval for outside contributors. In repo settings, require a maintainer to approve workflow runs from first-time or outside contributors before anything executes.
  2. Use ephemeral, single-job runners. A runner that tears down after one job can't carry state or a compromised environment into the next run.
  3. Isolate the runner. Run it in its own container or VM with no access to production secrets, deploy keys, or other repos' credentials.
  4. Scope runner labels/groups narrowly. Only the repos that actually need that specific runner should be able to target it.

Same rules, on GitHub or Rithub

Rithub's own-runner model (built-in CI runners, see also GitHub Actions alternative) runs on the same model, so the same four rules apply directly — the runner you register is your own hardware, not shared with arbitrary public internet traffic the way github.com's hosted runners are, which shrinks the blast radius if something does get through.

Sign up freeImport from GitHub