Support project-scoped loopback listener allowlists without enabling allow_local_binding
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- macos, rust
- Domain
- cli, desktop-dev, security
Research direction
Start with codex-rs/sandboxing/src/seatbelt.rs, especially the linked lines 283-309, and review related issues #23973, #33227, and #24742. Map how permission profiles are represented and enforced in CLI and Desktop before defining the cross-platform design. Done means project-scoped loopback address and port allowlists work without enabling broader local binding or outbound access.
Written by the indexing model from the issue text.
Description
What variant of Codex are you using?
Codex Desktop and CLI on macOS.
What feature would you like to see?
Add a first-class permission for narrowly allowing loopback listeners by address and port within a named permission profile.
For example, an illustrative configuration might be:
[permissions.workspace-tests.network]
enabled = true
allow_local_binding = false
[[permissions.workspace-tests.network.listeners]]
addresses = ["127.0.0.1", "::1"]
ports = "ephemeral"
This would let tests create local HTTP servers using an OS-assigned port without broadly enabling local binding or access to other local/private-network services.
The setting should:
- Be usable from a trusted project's
.codex/config.toml. - Apply only when that project's permission profile is selected.
- Permit
bind()only on the declared loopback addresses and ports. - Not allow non-loopback listeners.
- Not grant additional outbound access to local or private-network targets.
- Be supported consistently by CLI and Desktop execution.
- Keep the global
allow_local_binding = falsedefault intact.
Motivation
Some unit tests create an in-process loopback server:
import socket
server = socket.socket()
server.bind(("127.0.0.1", 0))
print(server.getsockname())
With allow_local_binding = false, this fails with:
PermissionError: [Errno 1] Operation not permitted
Setting allow_local_binding = true permits the tests, but is broader than necessary. The current macOS policy permits wildcard local binds when enabled and also uses the setting for a DNS carve-out (current Seatbelt implementation, PR #17370).
A typed listener allowlist would provide a portable, auditable least-privilege alternative.
Related issues
- #23973 concerns Desktop ignoring
allow_local_binding = true. - #33227 concerns outbound connections to explicitly allowlisted loopback targets.
- #24742 proposes raw user-provided macOS Seatbelt rules. That could offer a platform-specific escape hatch, but not a validated, cross-platform listener permission.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·