Egress policy
Pin the hosts a sandboxed agent run may reach for one repository. Each pinned host becomes exactly one network capability in the sandbox RepoOps already ships, nothing else is granted, and a run that tries another host can raise an alert.
How to
RepoOps installed, with the repository tracked. The alert in step 5 also needs an alert sink set in Settings.
- Open the tab with the repository chosen.
This machine, Privacy and egress, then Sandbox egress allowlist. Pick the repository on the Pinned hosts card: the card reads one repository at a time, and with none tracked it says so.
- Pin a host.
Type a domain, or a domain with a port (
api.anthropic.com,registry.npmjs.org:443), and press Pin host. Only DNS names are accepted. An IP address is refused in any spelling, and so are localhost, loopback and private ranges, because those would let a sandboxed run call back into your own machine. A refused host is reported and never written. - Check the capabilities it generated.
Pinned hosts lists each host beside the capability it grants,
net:<host>. That list is what the sandbox grants and all it grants. - Run the sandbox bound to the repository.
From a checkout,
node scripts/remote-grader.mjs --repo-id <id> --repo-root <path>starts the benchmark grader service bound to the repository, and it grants exactly this list to every run. Started unbound, it uses the sandbox's own defaults and the list only describes what it would grant. A run that tries an unpinned host is denied and writes a digest-onlysandbox.runaudit row into the repository. - Turn on the scan that raises alerts.
Set
REPOOPS_EGRESS_POLICY_SCAN_INTERVAL_MSto a positive number of milliseconds and restart. Then set a sink under Settings, Privacy & keys, Session Signals alerts and capture: Slack, PagerDuty or incident.io. Each scan reads thesandbox.runrows and sends one unlisted-host alert per repository and host. - Remove a host you no longer need.
Press Remove on its row. Removing a host that is not pinned changes nothing.
Use cases
An agent run that only needs the package registry
- Situation
- The grader runs a repository's test suite in the sandbox, and the suite installs packages.
- You do
- Pin registry.npmjs.org, check that its row reads net:registry.npmjs.org, and start the grader bound to the repository.
- You see
- Runs reach the registry and nothing else. A test that calls another host is denied by the sandbox and leaves a sandbox.run row.
Hearing about a host nobody pinned
- Situation
- You want to know when a run tries to reach somewhere new, without reading audit rows.
- You do
- Set REPOOPS_EGRESS_POLICY_SCAN_INTERVAL_MS to 300000, restart, and set a Slack webhook under Session Signals alerts and capture.
- You see
- Unlisted-host alerts reads Scan every 300 s. The first time a run tries an unpinned host, Slack receives one alert naming the repository and the host, and the host is listed on that card with the time it was first alerted.
Expected outcome
Next step: It is an IP address, a private or loopback name, or not a valid host. Pin the DNS name instead.
Next step: Set REPOOPS_EGRESS_POLICY_SCAN_INTERVAL_MS to a positive number and restart. Runs still record their denials meanwhile.
Next step: No sink is set, so the scan recorded the host and sent nothing. Set one under Session Signals alerts and capture. Each repository and host alerts once.
What else to consider
It fails closed
A policy file that will not load is read as the empty allowlist, so every host a run reached counts as unlisted and is flagged. A configuration error produces a noisy alert, never a silent allow.
What it does not cover
The allowlist governs the sandbox RepoOps runs, not your coding agent's own process, your browser or the RepoOps app. No sandbox is ever started from this tab. It is local and makes no model call.
Hosts your agents' sessions reached
The same list scores your coding agents' own sessions, read from the transcript and not seen on the wire. RepoOps reads each session's tool calls on this machine: WebFetch URLs, the URLs and remotes in curl, wget, git and ssh commands, the public registry an npm, pip, cargo, go or gem install uses by default, and the endpoint of an MCP server the session called. Once a repository has a pinned host, every other host a session names raises a medium Live egress signal, unexpected-egress-host, on AI Security, and the Session signals card says the hosts are scored. With nothing pinned, no session raises one. GET /api/egress/session?repo=<id>&session=<id> lists one session's hosts with each one's status. A child process or an install script can reach a host no tool call names, so the list is a floor, never the whole of what left.
From the command line
From a checkout, repoops egress-policy prints the allowlist and its capabilities, repoops egress-policy add <host> and remove <host> change it, --repo <id> picks the repository and --json prints the status as JSON. The routes are GET and POST /api/egress-policy.
Where it is stored
Each change appends a snapshot to egress-policy.jsonl under the data directory's egress-policy folder, and the latest snapshot for a repository is its allowlist. Alerts already sent are kept beside it in egress-alerted.jsonl, which is how a host alerts once.
What leaves the machine
Nothing, unless you set a sink: then the alert goes to it through the same redacted delivery path as every other outbound event. For what else leaves and how long it is kept, read Privacy and retention.