For the complete documentation index, see llms.txt. A markdown version of this page is at /security/model/rule-locations/index.md.

Rule locations

A rule about a workstation can live inside it, at the edge of its VM or outside it.

A rule is a limit on what a workstation can do or reach, such as which folders it sees or which hosts it connects to. A rule about a workstation can live in one of three places, and where it lives decides whether the coding agent can change it:

  • Inside the workstation, where the agent can change any rule.
  • At the edge of its VM, the VM boundary, where a rule protects your computer.
  • Outside the workstation, where a rule limits where it may connect and what its requests carry, and the agent cannot change it.

The sections below take each place in turn.

Rules inside the workstation

The agent’s own settings, its list of allowed tools and the workstation’s network configuration are all files and processes. The agent can edit or stop any of them. The login user has passwordless sudo by default. Setting identity.sudo: false does not change that on most providers, and a provisioning script in the system phase runs as root either way. Login user says where sudo: false takes effect.

The VM boundary

At the edge of the workstation is the VM boundary. The workstation shares none of your folders, except on vz the ones you list under mounts. On vz and hcs it has no path to services on your computer. Loopback reach says when a qemu workstation reaches your computer’s 127.0.0.1. The boundary does not cover the rest of your network. A vz or hcs workstation with no egress block reaches other computers on your network, and anything your VPN routes to.

Ways across the boundary

These are the ways across the boundary, each of which you turn on:

  • A folder you list under providerConfig.mounts is shared with the workstation. The workstation reads it, and changes it only if the share sets writable: true. Only vz shares folders, and your organization may limit them.
  • A LocalBinding forwards the ports you name, in either direction, or every port the workstation listens on if you ask for that. Its reversePorts and reverseSockets connect the workstation to a port or a Unix socket on your computer. Only the owner of your computer can forward one of its services into the workstation.
  • A LocalBinding’s urlForward sends the links a workstation asks to open to your computer. A link opens in your browser without asking only when your URL open rules say open, as Browser sign-in explains. A WorkstationConfig’s defaultLocalBinding can turn urlForward on for a workstation that is not node-bound, so check the configurations its labels select. A node-bound workstation takes no host access from a configuration.
  • An SSHKey lets programs in the workstation sign with a key on your computer while your computer is connected to the workstation. An SSHKey with no selector reaches every workstation.
  • A local source in a WorkstationConfig’s spec.sources copies a folder from your computer into the workstation each time the configuration is applied.

Rules outside the workstation

What enforces the rules outside the workstation depends on where it runs:

  • On a cloud, your cloud’s firewall enforces the addresses the workstation may reach. An Edge, a small VM in your cloud account, enforces the host names, on ports 80 and 443.
  • On vz, hcs and qemu, a Ringleader process on your computer, the network process, enforces them. Once a namespace administrator declares an Edge for the workstation, an edge VM on your computer does.

Whichever it is, it keeps the firewall rule and the list of allowed host names. It also keeps the injected key and the signing key of the certificate authority the workstation trusts. None of them is on the workstation. Enforcement points says what holds a policy on each provider.

A list of host names also needs an address rule underneath it that refuses everything else. The name is read off the connection, so without that rule an agent could dial an address directly and go around the list.

Held-closed workstations

A strict workstation is held closed while whatever must serve its policy is not serving it yet: a declared edge VM, or its own network process before it confirms the policy. Held-closed workstations says what each provider reaches meanwhile and what ends it.

Files and accounts your computer keeps from the agent

These stay out of the workstation unless you open one of the ways above:

  • Your shell profile and history, such as an API key exported in ~/.zshrc.
  • ~/.ssh and its keys.
  • The macOS Keychain.
  • Your other repositories and their .env files.
  • Your downloads.
  • Your browser’s cookies and signed-in sessions.

The network is the other way in, as The VM boundary says. Lock down Claude Code for unattended runs closes it, together with the other ways out.

Example: a laptop before and after

Picture a developer’s Mac with an Anthropic key exported in ~/.zshrc, .env files in several repositories, gh signed in and an SSH key in ~/.ssh. A browser is signed in to GitHub and the company’s tools. This table says what an agent can reach on it:

On the laptopAgent in a workstation set up as in the guideWhat would let the agent reach it
The key in ~/.zshrcNoSharing your home folder, or copying the key into the workstation.
.env filesNoSharing a folder that holds them, or a local source of one.
gh’s tokenNoCopying the token into the workstation.
The SSH keyNoAn SSHKey, which lets it sign while the key is forwarded.
The signed-in browserNoA urlForward together with the open action in your URL open rules, which lets it open pages that your browser loads with your cookies.
Your local network and VPNNoRemoving the egress block.

Setups compared

Aim for rules enforced outside the workstation. Use an egress block with enforcement: strict, a credential injection rule for each key the agent needs, and a Policy or OrgPolicy for each limit a member must not widen. If you do not yet know which destinations to allow, start with audit and let it write the list. This is the configuration that holds against an agent with root. A Policy or OrgPolicy covers a workstation that Ringleader stores: a cloud workstation, or a node-bound local one. A workstation in the local namespace, or one an earlier release of rl stored on your computer in another namespace, gets only the rules in Rules your organization sets for your computer.

Here is what each setup gives you, from least to most:

  • Rules inside the workstation cost nothing to set up and are enough for a developer’s own convenience. They are the agent’s own settings, its list of allowed tools and a firewall configured inside the VM. The agent, or anything it runs, can change or remove them, because the login user has sudo and a system script runs as root.
  • The VM boundary alone, with no egress block and keys placed inside, protects your computer and nothing else. The workstation reaches anything your network routes, and every process inside can read a key you placed there. That is enough for an experiment that holds no credentials and touches nothing private.
  • Rules enforced outside the workstation need a list of destinations, which audit can write for you. On a cloud they also need an Edge if the list names hosts rather than addresses. They are enforced on vz, hcs, qemu and a cloud.

Next steps