Skip to content

fix: unblock private DNS in macOS sandbox#17370

Merged
viyatb-oai merged 7 commits intomainfrom
codex/viyatb/fix-proxy-dns-resolution
Apr 11, 2026
Merged

fix: unblock private DNS in macOS sandbox#17370
viyatb-oai merged 7 commits intomainfrom
codex/viyatb/fix-proxy-dns-resolution

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented Apr 10, 2026

Summary

  • keep hostname targets proxied by default by removing hostname suffixes from the managed NO_PROXY value while preserving private/link-local CIDRs
  • make the macOS allow_local_binding sandbox rules match the local socket shape used by DNS tools by allowing wildcard local binds
  • allow raw DNS egress to remote port 53 only when allow_local_binding is enabled, without opening blanket outbound network access

Root cause

Raw DNS tools do not honor HTTP_PROXY or ALL_PROXY, so the proxy-only Seatbelt policy blocked their resolver traffic before it could reach host DNS. In the affected managed config, allow_local_binding = true, but the existing rule only allowed localhost:* binds; dig/BIND can bind sockets in a way that needs wildcard local binding. Separately, hostname suffixes in NO_PROXY could force internal hostnames to resolve locally instead of through the proxy path.

@viyatb-oai viyatb-oai changed the title Fix proxy NO_PROXY defaults for PrivateLink DNS resolution Fix proxy NO_PROXY defaults for private DNS resolution Apr 10, 2026
@viyatb-oai viyatb-oai changed the title Fix proxy NO_PROXY defaults for private DNS resolution fix(network-proxy): proxy NO_PROXY defaults for private DNS resolution Apr 10, 2026
Preserve private/link-local CIDRs in NO_PROXY while removing hostname suffix bypasses so internal hostnames can be resolved through the managed proxy path.

Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai closed this Apr 10, 2026
Co-authored-by: Codex <noreply@openai.com>
@viyatb-oai viyatb-oai reopened this Apr 11, 2026
@viyatb-oai viyatb-oai changed the title fix(network-proxy): proxy NO_PROXY defaults for private DNS resolution fix(network-proxy): unblock private DNS in macOS sandbox Apr 11, 2026
viyatb-oai and others added 2 commits April 10, 2026 17:18
@viyatb-oai viyatb-oai marked this pull request as ready for review April 11, 2026 00:47
@viyatb-oai viyatb-oai changed the title fix(network-proxy): unblock private DNS in macOS sandbox fix: unblock private DNS in macOS sandbox Apr 11, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10a1a41144

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/seatbelt.rs
viyatb-oai and others added 2 commits April 10, 2026 18:42
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai merged commit 8a474a6 into main Apr 11, 2026
28 of 30 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/fix-proxy-dns-resolution branch April 11, 2026 03:34
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants