---
title: Runner security
description: Why pols runners serve only private repositories, how each job is isolated, what the GitHub App may do, and why pull requests from forks never write the cache.
---

## One sandbox per job

Every job on a pols runner runs in a new sandbox, a virtual machine of its own, which is deleted once the job is over. Nothing a job leaves behind reaches the next job, except what it keeps on the repository's [runner cache](#runner-caches). A runner is registered with GitHub just in time, for one job; its registration configuration reaches the sandbox in the runner's environment, never on a command line.

## Private repositories only

pols runs the jobs of private and internal repositories of GitHub organizations, and not those of public repositories: a pull request from a fork of a public repository can run its own code on the runner. A public repository's jobs are listed on the Runners page with that reason and are not run.

If you need runners for a public repository, a [self-hosted runner](/docs/runners/self-hosted/) in a sandbox you keep refuses public repositories too, unless you pass `--allow-public` and accept that risk.

## What the GitHub App may do

For runners, the pols.so GitHub App has the repository permission **Actions** (read), to look up a job's run, and the organization permission **Self-hosted runners** (read and write), to register and remove its runners. pols asks GitHub for a short-lived installation token to register each runner and revokes it afterwards.

The [wizard](/docs/runners/move-jobs/) also needs **Contents**, **Workflows** and **Pull requests** (read and write) to open its pull request, with a token for that one repository. It pushes only to a branch of its own and never to the default branch.

## Runner caches

- A cache belongs to one repository of one org. Caches are never shared between repositories or orgs, and a renamed repository starts a new one.
- Each job works on a copy of the cache; the copy becomes the cache only when the job succeeds.
- Jobs of a pull request from a fork read the cache but never write to it: pols asks GitHub for the job's run, and the copy of a run whose head repository is another one, or that GitHub does not answer about, is always dropped.

Since a job can read the cache, do not keep secrets on it: anything a successful job writes under `/mnt/pols-cache` is there for every later job of the repository, including jobs of pull requests from forks.
