Skip to content

Implement network and tool permissions for Codex #892

Closed

Description

@dsyme

Codex currently runs with it's built-in sandboxing disabled. This is much as if these settings are set:

tools:
  bash:
  web-search:
  edit:

network: *

In the context of GH-AW this is not honouring the user's input settings which are more restrictive on network.

Codex has its own sandboxing available in the tool, so that, for example,

  • network access can be restricted
  • bash commands can be pre-approved
  • edit permissions can be restricted to workspace and /tmp

See https://github.com/openai/codex/blob/main/docs/config.md

We should continue to refine the GH-AW permission model to be coherent across Claude/Codex

Activity

  1. pelikhan commented on Sep 17, 2025

    @pelikhan
    Collaborator

    ...

  2. pelikhan commented on Sep 17, 2025

    @pelikhan
    Collaborator

    @copilot Update codex sandboxing generated config.toml as follows:

    • set sandbox_mode to "workspace-write"

    Additionally, configure the network field in the sandbox extra parameters based on this logic:

    • default network permissions (local host) -> network: false

    • allow * -> network: true

    • anything else: compilation error

    • update security section on codex documentation page

    Here is an example of syntax for the config:

    sandbox_mode = "workspace-write"

    Extra settings that only apply when sandbox = "workspace-write".

    [sandbox_workspace_write]

    By default, the cwd for the Codex session will be writable as well as $TMPDIR

    (if set) and /tmp (if it exists). Setting the respective options to true

    will override those defaults.

    exclude_tmpdir_env_var = false
    exclude_slash_tmp = false

    Optional list of additional writable roots beyond $TMPDIR and /tmp.

    writable_roots = ["/Users/YOU/.pyenv/shims"]

    Allow the command being run inside the sandbox to make outbound network

    requests. Disabled by default.

    network_access = false

  3. pelikhan commented on Sep 18, 2025

    @pelikhan
    Collaborator

    Current spec:

    // no declaration =
    network: defaults // on codex this means {}, on claude this means some defaults + localhost

    network: {} // no access on both claude and codex

    network: * // everything on both claude and codex

    • --search is removed
    • --dangerously... is removed
  4. pelikhan commented on Sep 18, 2025

    @pelikhan
    Collaborator
  5. Copilot commented on Dec 7, 2025

    Copilot
    Contributor

    The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists.

  6. pelikhan commented on Jan 21, 2026

    @pelikhan
    Collaborator

    outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions