mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
## What changed - Add `NetworkPolicyController` and `NetworkPolicy` APIs for publishing destination policies, checking access, and observing policy changes. Restricted policies permit only `https` and `wss` URLs with exact allowed hosts. - Add revocable `NetworkPermit` values with cancellation support. Reject stale policy publications, revoke permits when access is removed, and prevent account-bound policy handles from regaining access after invalidation. - Provide a permit API for SDK transports without destination enforcement that denies access under restricted policies. - Let `HttpClientFactory` carry a network policy, defaulting to unmanaged access, and include policy identity in factory equality. ## Testing Add tests for secure host matching, invalidation, stale publication, recovery after policy load failure, account isolation, and SDK permit revocation. Make accepted sockets blocking in redirect test servers to handle macOS socket inheritance, and add a missing read timeout. GitOrigin-RevId: c79231527bc5e6954cda6581c0b9f43c90335755