🦊

GitHub self-hosted runner attacks

We recommend that you only use self-hosted runners with private repositories. This is because forks of your public repository can potentially run dangerous code on your self-hosted runner machine by creating a pull request that executes the code in a workflow. - GitHub documentation

Anyone who can make a fork or PR can run arbitrary code execution on the self-hosted runner (by default).

Prevention

Do not use self-hosted runners on public repos.

Mitigations

To reduce risk, opt-in configurations can be set to:

Past attacks

Many data breach examples from Microsoft.

Resources