mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-27 11:02:33 +01:00
e7d5336158
`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