openai / openai/codex

Permission-profile read denials are reported active but ignored by unified exec on macOS

Open
#40,555 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI exec sandbox
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Environment

  • Codex CLI 0.149.1
  • macOS 26.5.1
  • Intel Mac
  • ChatGPT subscription authentication
  • codex exec --json

Configuration

A custom permission profile contained:

  • ":root" = "deny"
  • ":minimal" = "read"
  • write access to one synthetic project
  • an exact deny for a synthetic sibling directory
  • network disabled

The invocation used --ignore-user-config, --ignore-rules, approval policy never, and no legacy --sandbox flag.

The disposable fixture contained only:

/private/tmp/codex-profile-repro/
  project/allowed.txt
  denied/forbidden.txt

A single turn performed an allowed project read/write and attempted to read the denied marker with all output redirected to /dev/null.

Expected

  • Project read/write succeeds.
  • Reading denied/forbidden.txt fails, or Codex refuses to execute if the policy cannot be enforced.

Actual

  • Project read/write succeeds.
  • Reading the explicitly denied file also succeeds.
  • Recorded session metadata identifies the custom profile as active and contains the root deny and exact denied path.
  • Applying the same generated profile directly with codex sandbox -P correctly denies the read.
  • The live failure reproduced twice.

No real credentials, private files, or secret contents were tested or printed. No API key was provided.

Questions

  1. Why does unified exec ignore the recorded filesystem deny entries?
  2. Should local profile denials survive every ordinary unified-exec path when no escalation or legacy sandbox is requested?
  3. Is there a supported no-inference diagnostic for the same execution path?

Documentation: https://learn.chatgpt.com/docs/permissions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with codex exec --json using the described profile, then compare it with the same generated profile under codex sandbox -P. Trace how the recorded filesystem denials are handled in unified exec; done when the denied read fails or execution refuses safely, and the no-inference diagnostic path is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.