Skip to content

Derive MCP network policy and preserve saved denials - #60046

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Derive MCP network policy and preserve saved denials

Why

Stale saved grants or malformed rules can cause valid network denials to be discarded. A failed rule write can also leave the in-memory policy inconsistent with native enforcement.

What changed

  • Add a helper to derive MCP network policy from controller and environment policies, permission profiles, approval settings, and saved rules. Preserve managed restrictions and conservatively deny traffic that requires review, request hooks, or DNS checks the metadata cannot express.
  • Retain valid saved denials when grants violate managed constraints or a rule batch is malformed.
  • Serialize runtime updates and persistence, publishing denials before the write so they remain effective if saving fails. Publish saved grants after a successful write.
  • Extract validation of listener settings for running proxy updates.

Testing

Add coverage for policy composition, mixed-executor local binding, native proxy denial parity, stale grants, malformed denials, failed persistence, and compatibility with trusted MCP servers without policy negotiation support.

## Why

Stale saved grants or malformed rules can cause valid network denials to be discarded. A failed rule write can also leave the in-memory policy inconsistent with native enforcement.

## What changed

- Add a helper to derive MCP network policy from controller and environment policies, permission profiles, approval settings, and saved rules. Preserve managed restrictions and conservatively deny traffic that requires review, request hooks, or DNS checks the metadata cannot express.
- Retain valid saved denials when grants violate managed constraints or a rule batch is malformed.
- Serialize runtime updates and persistence, publishing denials before the write so they remain effective if saving fails. Publish saved grants after a successful write.
- Extract validation of listener settings for running proxy updates.

## Testing

Add coverage for policy composition, mixed-executor local binding, native proxy denial parity, stale grants, malformed denials, failed persistence, and compatibility with trusted MCP servers without policy negotiation support.

GitOrigin-RevId: ef00632acb48a51fc582f18d20a3e713f953a191
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ef00632acb48a51fc582f18d20a3e713f953a191 branch from fee0232 to b7d2321 Compare November 7, 2026 03:06
@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-07T03:06:46.027836Z fee0232 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 b7d2321 into main Nov 7, 2026
6 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ef00632acb48a51fc582f18d20a3e713f953a191 branch November 7, 2026 03:06
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 7, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — b7d2321e Deployed Nov 7, 2026 by alexander-dreyzen via Translate non-English issue #24915
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.

2 participants