Skip to content

Require explicit project trust in non-interactive runs - #60041

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b57f4f8829f98d77c5487fa8405c7f29b5d70d0c
Nov 7, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b57f4f8829f98d77c5487fa8405c7f29b5d70d0c

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Require explicit project trust in non-interactive runs

What changed

Keep untrusted project configuration and MCP servers disabled in exec runs, even with --sandbox workspace-write, and warn when project configuration is disabled.

Add --trust to codex exec and codex review to save project trust for the current and future chats, including MCP commands outside the sandbox. The grant persists with --ephemeral, refuses explicitly untrusted projects, and cannot be combined with --ignore-user-config.

Pass the working directory as a configuration default so embedded server startup does not implicitly grant trust. Preserve the selected --oss provider across configuration reloads.

Testing

Extend CLI parsing and MCP integration coverage for explicit trust, persistence across ephemeral runs, disabled project configuration with write access, and rejection of conflicting or explicitly untrusted settings.

## What changed

Keep untrusted project configuration and MCP servers disabled in exec runs, even with `--sandbox workspace-write`, and warn when project configuration is disabled.

Add `--trust` to `codex exec` and `codex review` to save project trust for the current and future chats, including MCP commands outside the sandbox. The grant persists with `--ephemeral`, refuses explicitly untrusted projects, and cannot be combined with `--ignore-user-config`.

Pass the working directory as a configuration default so embedded server startup does not implicitly grant trust. Preserve the selected `--oss` provider across configuration reloads.

## Testing

Extend CLI parsing and MCP integration coverage for explicit trust, persistence across ephemeral runs, disabled project configuration with write access, and rejection of conflicting or explicitly untrusted settings.

GitOrigin-RevId: b57f4f8829f98d77c5487fa8405c7f29b5d70d0c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b57f4f8829f98d77c5487fa8405c7f29b5d70d0c branch from 28d14e8 to 11ca3f7 Compare November 7, 2026 02:39
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-07T02:39:15.556437Z 28d14e8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 11ca3f7 into main Nov 7, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b57f4f8829f98d77c5487fa8405c7f29b5d70d0c branch November 7, 2026 02:39
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant