Skip to content

Prevent launch context from reaching child processes - #37607

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2535527893985fef0995617f4c5b2462bea7c136
Aug 8, 2026
Merged

Prevent launch context from reaching child processes#37607
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2535527893985fef0995617f4c5b2462bea7c136

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 8, 2026

Copy link
Copy Markdown

Prevent launch context from reaching child processes

Why

Model-reachable child processes should not inherit Codex launch context.

What changed

  • Treat OPENAI_FEDERATION_RULE_ID and OPENAI_IDENTITY_TOKEN_FILE as non-inheritable environment variables, with case-insensitive matching.
  • Remove them after shell environment policy overrides and before spawning commands across execution, MCP, hooks, Git helpers, and remote helper processes.

Testing

  • Cover inherited and explicitly configured variants, including mixed-case names.
  • Verify the variables are absent from real child environments and app-server command and process execution.

## Why

Model-reachable child processes should not inherit Codex launch context.

## What changed

- Treat `OPENAI_FEDERATION_RULE_ID` and `OPENAI_IDENTITY_TOKEN_FILE` as non-inheritable environment variables, with case-insensitive matching.
- Remove them after shell environment policy overrides and before spawning commands across execution, MCP, hooks, Git helpers, and remote helper processes.

## Testing

- Cover inherited and explicitly configured variants, including mixed-case names.
- Verify the variables are absent from real child environments and app-server command and process execution.

GitOrigin-RevId: 2535527893985fef0995617f4c5b2462bea7c136
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2535527893985fef0995617f4c5b2462bea7c136 branch from 1c8dcf7 to c4513cb Compare August 8, 2026 16:59
@copyberry
copyberry Bot merged commit c4513cb into main Aug 8, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2535527893985fef0995617f4c5b2462bea7c136 branch August 8, 2026 17:00
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 8, 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.

3 participants