mirror of
https://github.com/openai/codex.git
synced 2026-10-21 09:54:56 +00:00
## Why Resolving unapproved hostnames discloses them to DNS even when the proxy ultimately rejects the request. Allowing local binding in a managed macOS sandbox also granted direct outbound access to port `53`. ## What changed - Require an allowlist match or policy approval before resolving a hostname for address checks. - Recheck baseline restrictions after local and remote policy approval so approval cannot bypass explicit denies or local/private address restrictions. - Preserve DNS checks for inner HTTPS requests after an approved CONNECT, including hosts without a persisted allowlist entry. - Remove the Seatbelt allowance for external DNS while retaining local binding and loopback proxy access. ## Testing Add regression tests for zero DNS lookups on unapproved hosts, private-address rejection after approval, local and remote approval ordering, and DNS checks after approved CONNECT requests. Add a macOS Seatbelt child test that verifies external UDP and TCP port `53` access is denied while local binding and proxy connectivity remain available. GitOrigin-RevId: 490790462c51928e831dd8375ac098bc3a257bac