mirror of
https://github.com/openai/codex.git
synced 2026-10-30 19:18:49 +00:00
Config surface
New config key: [network_proxy.policy].allow_unix_sockets (string array), stored/edited via network_proxy.rs.
Entries support:
SSH_AUTH_SOCK / ${SSH_AUTH_SOCK}
preset aliases: ssh-agent, ssh_auth_sock, ssh_auth_socket
Entries are resolved at runtime to canonical absolute socket paths before generating Seatbelt rules.
macOS Seatbelt integration
seatbelt.rs now:
allows only loopback proxy ports (localhost:<port>) + explicitly allowed unix socket paths
does not emit per-domain (remote tcp ...) rules (those break under sandbox-exec)
Unix socket allowlist resolution is done via network_proxy::resolve_unix_socket_allowlist(...).
Prompt-on-deny UX (TUI)
When an exec approval happens and the command appears to need the SSH agent socket (ssh/scp/sftp/ssh-add, or git with ssh-style remotes), and the socket isn’t already allowed:
TUI shows an approval modal for the unix socket.
Allow for session: writes the resolved socket path to config (and removes it on exit, like session domain approvals).
Allow always: writes SSH_AUTH_SOCK to allow_unix_sockets for portability across restarts.
This commit is contained in:
@@ -33,6 +33,10 @@ poll_interval_ms = 1000
|
||||
[network_proxy.policy]
|
||||
allowed_domains = ["example.com", "*.github.com"]
|
||||
denied_domains = ["metadata.google.internal", "169.254.*"]
|
||||
# macOS only: allow specific local IPC when proxy-restricted.
|
||||
allow_local_binding = false
|
||||
# Example: allow SSH agent socket for git/ssh.
|
||||
allow_unix_sockets = ["$SSH_AUTH_SOCK"]
|
||||
|
||||
[network_proxy.mitm]
|
||||
enabled = false
|
||||
|
||||
Reference in New Issue
Block a user