Choose a runner strategy that balances security, network access, maintainability, and cost. This guide compares the three compute options and explains how to govern self-hosted runners safely.
- GitHub-hosted runners: a managed ride-hailing service (fast and maintenance-free).
- Self-hosted runners: your company car fleet (full control, full responsibility).
- Azure Private Networking: managed compute with private network access (the best of both worlds for Azure customers).
For full documentation, see:
- About GitHub-hosted runners: https://docs.github.com/en/actions/hosting-your-own-runners/about-github-hosted-runners
- About self-hosted runners: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners
- GitHub Actions with Azure Private Networking: https://docs.github.com/en/actions/hosting-your-own-runners/configuring-a-self-hosted-runner-in-a-private-network (see Azure integration docs for details)
- Launch ephemeral runners on demand.
- No maintenance, OS patching, or scaling for your team.
- Limited to the network boundaries GitHub permits — they cannot reach your private, firewalled networks.
- You provision and maintain the runner hosts.
- They can access internal services, on-premise databases, and private networks.
- You are responsible for security, updates, and incident response — if a runner fails at 3 AM, your team must handle it.

- GitHub provisions and manages the runners, but they receive private IPs inside your Azure Virtual Network (VNet).
- This gives you the convenience of managed compute while allowing secure access to internal Azure resources.


- Open your organization or repository Settings → Actions → Runners → Runner groups.
- Select the runner group to configure.
- Change visibility from “All repositories” to “Selected repositories.”
- Explicitly check the repositories that are allowed to use that runner group.
- Audit and rotate runner hosts and credentials regularly.

Never use self-hosted runners with public repositories. Doing so allows an attacker to fork a public repo, add a malicious workflow, and open a pull request that could run on your self-hosted runner. That gives an attacker remote code execution inside your internal network.

- Never pair self-hosted runners with public repositories.
- Use runner groups with “Selected repositories” visibility for least privilege.
- Prefer GitHub-hosted runners when you do not need private network access.
- If using Azure, evaluate GitHub-hosted runners with Azure Private Networking to combine managed compute and private VNet connectivity.
- Monitor and alert on runner registration, runner health, and unauthorized access attempts.

- GitHub Actions: hosting your own runners — https://docs.github.com/en/actions/hosting-your-own-runners
- About GitHub-hosted runners — https://docs.github.com/en/actions/hosting-your-own-runners/about-github-hosted-runners
- Configure GitHub Actions runners in Azure Private Networking — https://docs.github.com/en/actions/hosting-your-own-runners/configuring-a-self-hosted-runner-in-a-private-network