Case 07: Self-Hosted Runner Risks

Case 07: Self-Hosted Runner Risks #

Target Files #

Vulnerability Overview #

Using self-hosted runners in public repositories is dangerous because state persists between workflow runs. An attacker can execute arbitrary code via a PR and plant a backdoor on the runner that persists across future workflow runs.

Detection Example #

arc-codecov-simulation.yml:7:14: job "build" uses self-hosted runner (direct label specification).
Self-hosted runners are dangerous in public repositories because they can persist state between
workflow runs and allow arbitrary code execution from pull requests. [self-hosted-runner]
  • Use ephemeral runners (e.g., ARC with ephemeral mode)
  • Migrate to GitHub-hosted runners
  • Restrict runner access for pull_request triggers

Verdict: DETECTED #