Container script firewall is overly restrictive
Resolved 💬 7 comments Opened Apr 18, 2025 by BadPirate Closed Oct 16, 2025
💡 Likely answer: A maintainer (BadPirate, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.1.2504172351
Which model were you using?
any
What platform is your computer?
MacOS
What steps can reproduce the bug?
- use
run-in-container.shscript to open codex - Ask codex to ping google.com
Expectation:
Should be able to make benign internet requests
Actual:
All outbound traffic is blocked, this forces manual interventions for adding tools (which is fine because it's in the container), running commands like yarn install among many other little grievances.
What is the expected behavior?
Docker container should protect / prevent calls to host machine, but allow internet access.
What do you see instead?
_No response_
Additional information
_No response_
7 Comments
Note: I'm looking into this for myself but wanted to drop an issue as I assume this behavior others will want.
This is actually intentional, at least for now - sorry for the confusion and lack of documentation! There's a few different risks when it comes to outbound network access, like:
We'll have guidance soon on how to do this safely, but since you've already started #383 I think it's reasonable to expose an argument like
--dangerously-allow-network-outbound(added as comment on your PR) - lmk if you have questions!Oh sorry, just noted your response here. What you say makes sense. If it is really dangerous, I might recommend opening an issue with the Mac client sandbox, Apple's
sandbox-execallows for blocking outbound network in the profile you provide when you use it, but based on my testing the current cli isn't doing so at the moment. I'll accept your changes.I was thinking about safe browsing too - could it be server side like when using chatgpt? so not doing request from client machine but from openai servers. I assume the standard browsing on chatgpt already has features of not being able to post user content; due to sandboxing any prompt injection would be limited to failing the task at hand. I guess worst case is it proposes vulnerable, hacked code to the user and user is not paying attention?
The utility I'm looking for is reading related docs and repos that are on the internet.
For my use case at least, I found the apple sandbox and the container sandbox overly restrictive. Simple case: Asking codex to make changes, and test those changes before coming back to me (Otherwise I have to go multiple rounds as it stumbles through development)
I would like to second this issue. I cannot ask it to restart an app because it restricts itself from doing so.
Closing this as obsolete