Skip to content

Prepare managed child MITM CA env#25888

Closed
winston-openai wants to merge 9 commits into
dev/winston/mitm-child-env-snapshotsfrom
dev/winston/mitm-command-ca-bundles
Closed

Prepare managed child MITM CA env#25888
winston-openai wants to merge 9 commits into
dev/winston/mitm-child-env-snapshotsfrom
dev/winston/mitm-command-ca-bundles

Conversation

@winston-openai

@winston-openai winston-openai commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Why

Managed MITM CA preparation must happen at each sandbox boundary so each command can read only its active generated bundle, never the proxy private key or a bundle generated for another command.

What

  • prepare the managed child network environment in codex-sandboxing and the debug-sandbox CLI path
  • deny the shared proxy directory and reopen only active bundle files on macOS and Linux
  • reject writable overlap, denied custom CA inputs, and legacy Landlock configurations that cannot enforce the carveback
  • reject command-specific CA overrides in the persistent Windows sandbox and cover that behavior on Windows
  • keep this stage out of codex-core

Stack

Validation

  • just test -p codex-sandboxing
  • just test -p codex-cli debug_sandbox
  • just test -p codex-network-proxy

@winston-openai winston-openai force-pushed the dev/winston/mitm-command-ca-bundles branch from 16d2b7c to ffa411c Compare June 2, 2026 17:06

@viyatb-oai viyatb-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found three policy-boundary blockers and one debug-sandbox integration gap in the child CA materialization path. The first comment includes a directly applicable suggestion; the remaining fixes span APIs or platform-safe file handling, so I described the required patch shape rather than offering an incomplete one-line replacement.

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs
Comment thread codex-rs/network-proxy/src/certs.rs
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
@harinsrikanth-openai

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a99540f257

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/network-proxy/src/certs.rs
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs Outdated
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 678a99443e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58ca772277

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs Outdated
Comment thread codex-rs/sandboxing/src/manager.rs Outdated
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e2d7471fd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml
Comment thread codex-rs/network-proxy/src/child_ca.rs
Comment thread codex-rs/network-proxy/src/child_ca.rs Outdated
Comment thread codex-rs/network-proxy/src/child_ca.rs
@winston-openai winston-openai requested a review from a team as a code owner June 3, 2026 07:36
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aec696a37b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9109a1922

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml
Comment thread codex-rs/network-proxy/src/child_ca.rs
Comment thread codex-rs/network-proxy/src/child_ca.rs
Comment thread codex-rs/network-proxy/src/native_certs.rs
Comment thread codex-rs/network-proxy/src/native_certs.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3cef0a3e9e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml
Comment thread codex-rs/network-proxy/src/certs.rs Outdated
Comment thread codex-rs/network-proxy/src/child_ca.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dac6a8b69e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/network-proxy/src/lib.rs

@viyatb-oai viyatb-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the live head specifically for plain-proxy and permission regressions. I found two remaining gaps: one changes shell-snapshot behavior when the proxy runs without MITM, and the other leaves the Windows CA materialization check/open race unresolved. The earlier deny-glob, baseline-root, and debug-sandbox findings look addressed.

Comment thread codex-rs/core/src/tools/runtimes/mod.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8961dc9c04

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/Cargo.toml Outdated
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
Comment thread codex-rs/network-proxy/src/certs.rs
Comment thread codex-rs/network-proxy/src/native_certs.rs Outdated
@winston-openai winston-openai force-pushed the dev/winston/mitm-command-ca-bundles branch from 8961dc9 to 58afe6e Compare June 4, 2026 01:46
@winston-openai winston-openai changed the title Materialize child MITM CA bundles Prepare managed child MITM CA env Jun 4, 2026
@winston-openai winston-openai changed the base branch from main to dev/winston/mitm-child-ca-materialization June 4, 2026 01:47
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: b3539f9755

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96611102b7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c529704aeb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/core/src/tools/runtimes/mod.rs Outdated
Comment thread codex-rs/core/tests/suite/tools.rs Outdated
Comment thread codex-rs/sandboxing/src/manager.rs Outdated
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41c0871b24

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf9b695f01

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/linux-sandbox/src/bwrap.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

use_legacy_landlock,

P3 Badge Reject legacy Landlock before preparing managed MITM

When the Linux codex sandbox path runs with managed network/MITM enabled and features.use_legacy_landlock = true, this passes the prepared profile with the proxy-dir deny plus active-bundle readable carveback into the legacy Landlock helper. SandboxManager::transform rejects that same combination because legacy Landlock cannot enforce the per-file carveback, so this path should reject it or force bwrap before building helper args instead of launching a helper that fails before the command runs.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/manager.rs Outdated
Comment thread codex-rs/linux-sandbox/src/bwrap.rs
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14d3e5fa00

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
Comment thread codex-rs/linux-sandbox/src/bwrap.rs
Comment thread codex-rs/sandboxing/src/manager.rs Outdated
@winston-openai winston-openai force-pushed the dev/winston/mitm-command-ca-bundles branch from f018c0f to 306b66c Compare June 18, 2026 19:50
@winston-openai winston-openai changed the base branch from dev/winston/mitm-ca-bundle-helpers to dev/winston/mitm-child-env-snapshots June 18, 2026 19:52

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the focused #29013 and #29014 stack. The replacement isolates the persisted MITM private key and preserves file-backed custom CAs present at Codex startup, with zero codex-core changes. Per-command bundle materialization, generic sandbox carvebacks, and additional shell-snapshot plumbing are intentionally deferred because they are not required for this scoped completion work.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants