Skip to content

Restrict Unix local MCP servers to stdio descriptors - #47094

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/37409a5673dbaafa851fd1f78e3a2443eda5f7c6
Sep 21, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Restrict Unix local MCP servers to stdio descriptors

Why

Local MCP servers communicate over stdio, so unrelated parent file descriptors should not propagate into the server or its descendants.

What changed

Apply DescriptorPolicy::StdioOnly when launching local stdio MCP servers on Unix, preserving their explicit transport stdio.

Testing

Add Unix integration tests that check inheritable pipe, socket, and file descriptors are absent from servers and descendants across absolute, relative, and shell-fallback launches. Verify MCP communication, arguments, environment, working directory, parent descriptor ownership, and exec failure reporting remain intact.

## Why

Local MCP servers communicate over stdio, so unrelated parent file descriptors should not propagate into the server or its descendants.

## What changed

Apply `DescriptorPolicy::StdioOnly` when launching local stdio MCP servers on Unix, preserving their explicit transport stdio.

## Testing

Add Unix integration tests that check inheritable pipe, socket, and file descriptors are absent from servers and descendants across absolute, relative, and shell-fallback launches. Verify MCP communication, arguments, environment, working directory, parent descriptor ownership, and exec failure reporting remain intact.

GitOrigin-RevId: 37409a5673dbaafa851fd1f78e3a2443eda5f7c6
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/37409a5673dbaafa851fd1f78e3a2443eda5f7c6 branch from 6b8dfe5 to afe4249 Compare September 21, 2026 19:37
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot merged commit afe4249 into main Sep 21, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/37409a5673dbaafa851fd1f78e3a2443eda5f7c6 branch September 21, 2026 19:38
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 21, 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