Skip to content
PathGuided

A Prompt Is Not a Security Boundary

Why autonomous coding workers require default-deny egress, DNS-pinned proxies, strict authority separation, and confinement read-backs instead of prompt instructions.

3 min read
Email

In many agentic coding setups today, an autonomous worker runs as a standard child process on the host. It inherits the developer's environment variables, can read the host filesystem, loads web-fetching tools, and enjoys unrestricted outbound network access. When teams worry about what happens if that worker encounters a hostile instruction on a web page or inside a repository, they often add a warning to the system prompt.

A system prompt is not a security boundary. If a worker running as your user follows a hostile instruction, it can read SSH keys, GitHub tokens, and local credential stores, and post them anywhere on the internet. Worse, on a developer workstation or local server, an unconfined worker can reach internal dashboards on loopback—where a local caller can often fetch an action token without credentials and start new sessions.

Protecting autonomous runs requires moving security out of the prompt and into the operating system, the network stack, and the host architecture.

Default-Deny Egress and DNS Pinning

The baseline rule for an isolated worker is simple: the execution environment starts with no network (--network none in container runtimes, or --unshare-net in Linux network namespaces).

When a worker genuinely needs to reach an external service—such as a model provider API—all traffic must pass through a forward CONNECT proxy running outside the sandbox, exposed only through a read-only Unix socket mounted into a tiny tmpfs volume. Inside the workload, a lightweight init process relays a local loopback port to that socket and sets HTTP_PROXY and HTTPS_PROXY.

Loopback Relay Allowlist + Resolve Once + Dial Checked IP 403 Blocked + Finding Logged Read-Back Probe (Fail Closed on Drift) Worker Sandbox (--network none) Read-Only Unix Socket Egress CONNECT Proxy Approved Model APIs Host / Loopback / Metadata / Arbitrary Web Trusted Host Launcher

Domain allowlisting alone, however, is notoriously easy to bypass via DNS rebinding or unusual IP encodings. A sound egress proxy enforces four mechanical rules:

  1. Refuse unlisted hosts before lookup: Names not on the explicit allowlist (capped in size and restricted to ports 80 and 443) never trigger a DNS query.
  2. Block non-public address ranges: Private, loopback, link-local, cloud metadata, and multicast addresses are rejected across decimal, octal, hex, IPv4-mapped, NAT64, and 6to4 spellings.
  3. Resolve once, dial the checked IP: The proxy resolves the hostname once, validates every returned address, connects directly to the checked IP, and never follows redirects.
  4. Drop privileges and environment noise: The workload runs with no_new_privs, empty Linux capability sets, and only minimal variables like PATH and HOME.

Read the Confinement Back

Asking a runtime for isolation is not the same as verifying that isolation took effect. Silent configuration drift is a documented failure mode: in CVE-2025-66479, a sandbox with no configured domain list enforced nothing at all. Similarly, a systemd network restriction silently does nothing when cgroup eBPF is unavailable.

The fix is confinement read-back, or failing closed on drift. After launching a container or namespace, the host inspects the live configuration against the requested specification—rejecting any unexpected host-configuration fields—and runs a probe inside the sandbox against fixed external addresses (1.1.1.1:443, 8.8.8.8:443, and UDP port 53) as well as the local dashboard port. If bytes come back, or if dropped capabilities cannot be proven, the launcher aborts and records a launch refusal rather than degrading silently to an unconfined run.

PathGuided repository file explorer
PathGuided repository file explorer

Separate Authority From Execution

Network isolation must be paired with clear authority boundaries across the run contract:

  • Trusted host services authorize workspaces, issue immutable run manifests, prepare dependency bundles, and hold repository leases.
  • Secret issuers and supervisors resolve credentials outside the workload and mediate access.
  • Workloads receive only private writable volumes and non-secret inputs—never runtime sockets, arbitrary mount controls, or administration tokens.

Even with tight sandboxing, one hard truth remains: a compromised workload can still exercise every capability explicitly granted to it. Hiding a GitHub credential does not stop misuse of a permitted GitHub write, and allowing a model provider's API leaves that API as a potential data channel. Isolation is not magic; it is the foundation that makes branch protections, narrow grants, and scoped policies actually hold.

Join the PathGuided Closed Beta

Onboard your repositories with local-to-cloud spec execution, split-tier model routing, and commit-bound Work Tours.

Request beta access