Repository navigation
[connectors] Track host-owned Codex Apps MCP provenance - #20649
mzeng-openai wants to merge 20 commits into
Conversation
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Flagging one security concern from Viyat's security review automation. The cached Codex Apps tool path appears to drop host-owned provenance. That matters because the exposure filtering treats host-owned Codex Apps tools differently: connector accessibility/enabled checks only apply when The fix I'd suggest: after deserializing the cache, set every cached Codex Apps |
|
Good catch. Cached Codex Apps tools now get restamped as |
…pps_mcp_declare # Conflicts: # codex-rs/core/src/mcp_tool_call.rs
…pps_mcp_declare # Conflicts: # codex-rs/Cargo.lock # codex-rs/codex-mcp/Cargo.toml # codex-rs/codex-mcp/src/codex_apps.rs # codex-rs/codex-mcp/src/connection_manager.rs # codex-rs/codex-mcp/src/connection_manager_tests.rs # codex-rs/codex-mcp/src/mcp/auth.rs # codex-rs/codex-mcp/src/mcp/mod.rs # codex-rs/codex-mcp/src/rmcp_client.rs # codex-rs/core/src/connectors.rs # codex-rs/core/src/connectors_tests.rs # codex-rs/core/src/mcp_tool_call.rs # codex-rs/core/src/mcp_tool_exposure.rs # codex-rs/core/src/mcp_tool_exposure_test.rs # codex-rs/core/src/tools/spec_tests.rs
…pps_mcp_declare # Conflicts: # codex-rs/Cargo.lock # codex-rs/codex-mcp/Cargo.toml # codex-rs/codex-mcp/src/connection_manager.rs # codex-rs/codex-mcp/src/connection_manager_tests.rs # codex-rs/codex-mcp/src/rmcp_client.rs # codex-rs/codex-mcp/src/tools.rs # codex-rs/core/src/connectors_tests.rs # codex-rs/core/src/mcp_tool_exposure_test.rs # codex-rs/core/src/tools/handlers/tool_search.rs # codex-rs/core/src/tools/spec_tests.rs
…pps_mcp_declare # Conflicts: # codex-rs/core/tests/suite/tools.rs
…' into dev/mzeng/codex_apps_mcp_declare
|
Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Why
MCP server names are routing labels, not a trustworthy ownership boundary. Connector-gateway behavior should only apply to the built-in Codex Apps MCP instance created by the host, not to an MCP server that merely has the same name or declares the same capabilities.
How provenance is determined
McpServerProvenanceis host-assigned and runtime-only. MCP servers loaded from user/plugin config deserialize asUserConfigured; the only path that marks a serverHostOwnedCodexAppsis the host path that injects Codex Apps MCP atcodex_appsusing the ChatGPT backend/wham/appsendpoint. Because provenance is not serialized, cached Codex Apps tools are restamped as host-owned when loaded.What changed
McpServerProvenanceand mark the host-injected Apps MCP asHostOwnedCodexApps.ToolInfo.codex_appsserver name is not treated as host-owned.Testing
cargo test -p codex-mcpcargo test -p codex-core mcp_tool_call