The sandbox is the security boundary

An agent in Spotlight can run commands, edit files and call out to the network. It needs all three to do its work, and each is a reason for a team to decide what the agent can reach. Spotlight gives two kinds of answer to that question, and it matters which one is doing the work.

Permissions are guardrails

A harness profile lets a team say what its agents may do: which files they may read, which commands they may run without asking, and which need a person's approval first. Spotlight writes those rules into each harness in its own terms, and an ask rule turns into an approval in the inbox.

These rules are useful, but the harness enforces them itself, and that is their limit. An agent can still find a way around its own harness's rules, since a rule about one kind of action need not cover another that reaches the same place. A repository can loosen whatever is not enforced, because a harness reads the repository's own settings files on top of the ones Spotlight writes. Spotlight puts the rules that must apply where a repository cannot reach them, where the harness allows that, but the harnesses differ in what they allow.

So Spotlight treats harness permissions as guardrails. They keep a well-meaning agent on the path and give people a say at the points that matter to them. They do not contain an agent that has gone off the path. What contains an agent is the sandbox it runs in and egress, the only route out of it. Limit what agents may do covers the guardrails.

One route out

Each run's sandbox sits on a network of its own that leads nowhere. The only other thing on that network is the run's egress, a proxy container the host starts next to the sandbox for that run alone: the egress sidecar. Every client in the sandbox is pointed at it, and a client that ignores the proxy has no route out at all.

With one exit, there is one place for the host's rules to apply, and nothing in the sandbox can route around them. Some addresses are blocked whatever the host's list says: loopback and link-local, so that a sandbox never reaches the cloud's instance metadata or the host's own identity. A machine's identity lets it claim work and read secrets, and an agent that could borrow it would no longer be contained by anything on this page. Limit where sandboxes can connect covers the allow-list, and the Egress reference lists what egress allows and blocks.

Keeping secrets out of the sandbox

An agent's tools need credentials: an API key for an MCP server, a harness key for the harness itself. The obvious way to give them is to put them in the sandbox's environment. Spotlight does not, because anything in the sandbox can be read by the agent, and so by anything that talks the agent into reading it.

Instead the sandbox gets a stand-in. An MCP server whose environment names the workspace secret LINEAR_API_KEY sees spotlight-egress:LINEAR_API_KEY where the value would be. Egress, which is outside the sandbox, keeps the real value for the length of the run. When a request leaves for a host the secret is bound to, and its header or query parameter contains the stand-in, egress injects the value in its place. Where the host's answer repeats the value, egress swaps the stand-in back before the sandbox sees it. The server's request works, and the agent never had the value to leak.

Without the binding to a host, this would be unsafe. A proxy that swapped in a secret on any request would turn into a credential oracle: the agent could send the stand-in to a server it controls and receive the real value there. Egress injects a secret only into requests to the hosts it is bound to, only for the run that was granted it, and only in place of its stand-in. A request to anywhere else contains nothing egress injected, and so does a request to the bound host that doesn't name the secret, such as a script the agent runs.

Some credentials must be in the sandbox, such as a key that signs a token for a test server. A secret with sandbox = "env" is the one exception: a harness profile's env gives its runs the real value as an environment variable. The agent and every process in the sandbox can read it, and it needs no egress. Spotlight puts the stand-in in place of the value in what the run records, but not in files or commits. Give such a secret only a credential made for this, with the smallest access. See Give a run a secret as an environment variable.

The stand-in only names a secret; it isn't a password. Everything in the sandbox can read the MCP server's environment, so anything there can still write the stand-in and have the secret used for its host. What the binding and the stand-in together prevent is the value leaving the sandbox's reach and being sent anywhere else.

The values also stay out of reach while they travel to egress. Spotlight stores every value, encrypted, and seals each one to a key egress made, for that run or, on a shared egress, when the egress process started, so only that egress can open it. The spotlight_secret reference and Give an MCP server a secret have the details.

Tools a team defines on an integration go further still. When an agent calls one, Spotlight makes the call on its behalf, outside the sandbox, so the credential is never near the agent at all.

A shared egress for push pools

A push pool's runner starts on the team's own platform, not on a host, so there is no host to build a private network and an egress around it. Instead the pool can name a shared egress: one long-lived process that serves the runs of many runners. The runner sends all its traffic there. Inside the sandbox, a local proxy ends the TLS of requests to the hosts the run's secrets are bound to, and passes those requests to egress, which injects the secrets. Everything else goes to egress in tunnels it does not decrypt, and egress records each connection.

Two credentials keep the secrets on the egress side. The egress token, which the egress keeps, is the only way to fetch the secrets that egress injects for a run, and it never enters a sandbox. The runner fetches the values that a harness profile's env names with its own credential, and puts them in the sandbox. The run proxy credential, which the runner keeps, lets the run send traffic through that one egress and nothing more. A sandbox that leaks its credential leaks nothing that opens a secret.

What the platform decides is whether egress is the only route out. A shared egress cannot close the sandbox's other routes; only the platform's firewall can. So before the harness starts, the runner tries to connect to Spotlight directly, and the run's trace says what it reported. The report comes from inside the sandbox, so it is evidence, not proof: an agent that took over the sandbox could report Enforced. Enforced means the sandbox could not connect around egress: the allow-list applies to every client, and every connection is on record. Not enforced means it could: a tool that ignores the proxy goes out directly, past both. The secrets that egress injects are safe in both cases, since the sandbox only has their stand-ins. Enforcement is about the allow-list and the record, and it comes from a firewall that lets the container connect only to egress.

Tools Spotlight calls for the agent

A tool an integration offers, whether written out, generated from an API description or listed by a remote MCP server, is called by Spotlight, not by the agent. The credential stays with Spotlight, the call can wait for a person's approval, a hook can deny it, and the run's journal records it. An MCP server the harness starts in the sandbox, from a harness profile's mcpServers, gets none of that: its calls never reach Spotlight. That is why a remote server belongs on an integration, and a profile's mcpServers is for servers that must run as a local process.

What a remote server says still reaches the agent. Its tool descriptions are passed to agents as the server wrote them, and its answers are returned as they came. Text in either can carry instructions aimed at the agent, which is prompt injection, and Spotlight does not filter it. In the docs' view, a server's descriptions deserve the same trust as its code. Offering a station only the tools it needs, with tools.include, and keeping approval on for any tool that changes data, limits what text from the server can make an agent do. A tool the server marks as only reading runs without asking, so a server that marks a writing tool as reading is trusted to that degree. See MCP servers.

The host decides where its keys may go

Harness keys, such as an Anthropic or OpenAI key, reach egress in two ways: the workspace holds them as secrets, or whoever runs a host keeps them on it. Both stay out of the sandbox the same way, as stand-ins, and egress injects each one into requests to its model provider's API.

A key the workspace holds is a secret like any other. Its binding, which a workspace admin sets, names the host it may go to.

For a key the host keeps, which key may go to which host is the host's own table, and the control plane has no say in it. A design that let the control plane declare it was rejected after an audit: a compromised control plane could then aim an operator's key at any host it liked. A host adds its keys only to requests to the destinations it knows, and only in place of the exact stand-in. When the host has a key for a provider's host, egress injects no workspace secret there, so on that machine the operator's key is the one used. Give hosts your harness keys covers setting them.

Two users inside the sandbox

Inside the sandbox there are two parties. The runner, which runs as root, keeps the run's credential, fetches the work, prepares the checkout and talks to the control plane. The agent runs as a separate user, and its environment carries none of the runner's credentials. (Pools, trusts and tokens follows the run's credential from the host to the runner.)

The separate user is the part that counts. With both in one account, the agent could read whatever the runner kept, and the division between them would be cosmetic.

Known gaps

Some things do not yet go through this design, and each is a gap because it leaves a credential or a route outside what egress controls.

OpenCode Zen's key, and the key of any OpenCode provider other than Anthropic, OpenAI and OpenRouter, enter the sandbox. The host has no destination for them in its table, so they pass into the sandbox as they are. Cursor CLI exchanges its key at api2.cursor.sh for a short-lived token, and that token is in the sandbox, where the agent can read it. Logins that refresh their own tokens, such as Codex signed in with ChatGPT or Claude signed in through a browser, are not injected by egress; an API key, or a token from claude setup-token, is. Egress cannot itself sit behind a corporate proxy.

A push pool's sandbox is enforced only if the team's platform makes it so. The runner checks and the trace reports it, but a run that reads Not enforced still runs. A shared egress keeps no harness keys of its own. It injects the ones the workspace holds as secrets, but a key that the push pool's provisioner puts in the runner's environment enters the sandbox as it is. A push pool that names no egress has nothing to inject a secret into requests, so a run whose secrets egress injects is never offered to it, and waits for a host or for a pool that names an egress. A run whose only secrets are in a harness profile's env needs no egress.

What enters a sandbox can be read

Whatever enters a sandbox can be read by the agent in it, which rules out skills, prompts, attachments and files baked into an image as places for anything secret. A skill, for instance, is text laid into the sandbox for the agent to read. If a station needs something the agent must not see, it belongs in a secret that egress injects into requests, or in a tool that Spotlight calls.

On this page