Security model

The container is the security boundary; agents run under bypassPermissions inside it. Layers (full detail in Security):

  • No host coupling. No host credential bind-mounts, no docker socket pass-through to agents. An agent’s sign-in (Claude or pi) lives inside its project and is deleted on destroy.
  • DIND isolation. Projects with inner Docker run under sysbox-runc (user-namespace isolation, no --privileged) where Sysbox is installed; without it they fall back to --privileged, which works but is less isolated. Their inner Docker daemon runs workers and boxes as ordinary containers. A single-container project (sandbox and the docker-based store workflows) is one runc container.
  • Inner-bridge guard (always on). A box, worker or role service cannot open a connection to its own project container, to the host at the project bridge, to the registry or to another box’s published port; it keeps the internet, Gitea’s HTTP port and the MCP proxy’s registered upstreams. Applied inside every dind project at boot; see Security.
  • Box images pulled from a read-only registry, by digest. The registry every project pulls box images from refuses writes; the operator’s push lane is a separate instance on the loopback port; every project records the digest the registry served and pulls by it, so no project can replace or redirect the image another project boots. See Security.
  • The webui listens on the router network only. It reaches every project to open terminals, but its login page, origin ports and pass-through ports refuse connections arriving from a project’s own network. See Security.
  • Host hardening (operator-applied). RS installs nothing on the host. Two paths only the host can close — a project’s root routing around rs-router, and a project reaching the host’s own services — are closed by two generic firewall rules the operator installs once; every bridge RS creates for a project or the reviewer carries an rsn interface prefix for exactly that. The rules, their order and the sshd bind are in Security.
  • Per-project network + egress filter. Each project gets its own bridge, route-injected through rs-router, whose iptables FORWARD rules key on the project subnet. Open mode allows outbound except private addresses; locked mode allows only 80/443 and DNS to the resolvers configured in SANDBOX_DNS (no ICMP). The router drops private (RFC1918) destinations in both modes — the LAN, the host, other Docker networks — but it filters only traffic routed through it: a project’s root can route around it, and the host answers at the project’s bridge gateway. The two operator-applied host rules above close those paths. Every shipped workflow except research defaults to locked; research takes the operator’s configured default.
  • MCP gating. Workers reach registry MCPs only through the per-project mcp-proxy, and only those in the project’s allowlist. An optional inner-bridge firewall (--inner-firewall) further confines worker→proxy traffic. MCP servers listed under Sandboxes → MCP are reached only through the shared MCP gateway, by an agent or box the operator wired, with a token valid only from its own project’s network; the servers’ secrets never enter a project.
  • Broker = the host-root boundary. The opt-in broker is the only component with docker access. It serves a closed verb vocabulary over a 0600 unix socket (length-prefixed JSON, SO_PEERCRED same-uid check — no network listener). Every verb dispatches to a fixed lifecycle function over a validated request; no docker passthrough. Reads (list/status) are open at the socket; every write verb is token-gated (deny-by-default), destroy, box remove and a few other sensitive verbs (repository remove, Gitea backup export, upgrade, rollback) additionally require step-up re-auth (the master password typed again). Rich-input verbs forward only an explicit field allow-list — a relayed request can never name a host path or a host port, and the one bind-mount source it can name is a folder inside RS’s own data/ folder, typed relative to it (the create form’s Add folders, the Sharing section of the ⚙ window); a folder change saved in ⚙ is re-checked when the project next starts. The network-facing webui holds no docker socket and relays everything through the broker behind its session.