Files
zed/crates/acp_thread
Richard Feldman e7d5336158 sandbox: Let callers keep system network services out of the proxy sandbox (#67372)
`SandboxNetPolicy::Restricted` gains `allow_system_network_services`,
which lets a caller keep a command that is confined to the proxy from
also reaching the macOS system services for network configuration and
TLS trust evaluation (`configd`, `networkd`, `SecurityServer`, `trustd`,
and `ocspd`).

Those services run outside the sandbox with unrestricted network access,
and `trustd` fetches the issuer URL named in a certificate it is asked
to evaluate. Under the proxy profile, `security verify-cert` on a
certificate whose issuer URL points at a local listener makes `trustd`
connect to it; with the services left out, nothing connects. So today a
command restricted to an allowlist of hosts can still send data to any
host by putting it in a URL. `trustd` appears to rate-limit these
fetches, which slows this down but doesn't prevent it.

Leaving the services out is not free: programs that verify certificates
through the Security framework need them, which is why they were added.
So this is a choice for the caller, and Zed's own callers pass `true`,
which keeps their behavior (and this exposure) exactly as it is. Whether
the agent should pass `false` is a separate decision. The proxy still
reports refused hosts without the services, so a caller can run it with
an empty allowlist purely to learn what a command attempted.

Other platforms have no equivalent services and ignore the field.

Release Notes:

- N/A
2026-11-24 18:14:37 +00:00
..