Skip to content

Conversation

@bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Jan 9, 2026

As explained in #8945 and #8472, there are legitimate cases where users expect processes spawned by Codex to inherit environment variables such as LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, where failing to do so can cause significant performance issues.

This PR removes the use of codex_process_hardening::pre_main_hardening() in Codex CLI (which was added not in response to a known security issue, but because it seemed like a prudent thing to do from a security perspective: #4521), but we will continue to use it in codex-responses-api-proxy. At some point, we probably want to introduce a slightly different version of codex_process_hardening::pre_main_hardening() in Codex CLI that excludes said environment variables from the Codex process itself, but continues to propagate them to subprocesses.

@johnzfitch
Copy link

johnzfitch commented Jan 9, 2026

Thank you for submitting this. I submitted a PR last November but was told to go through issues first as a potential feature and not a bug. Pull Request Draft.

My theory is that this is the ghost @tibo-openai was looking for last October. #8945 (comment)

@bolinfest bolinfest merged commit d3ff668 into main Jan 9, 2026
26 checks passed
@bolinfest bolinfest deleted the pr8951 branch January 9, 2026 05:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2026
@bolinfest
Copy link
Collaborator Author

@johnzfitch FYI, I cut an alpha release with this fix if you're willing to try it out and verify it fixes the issues you've reported:

https://github.com/openai/codex/releases/tag/rust-v0.80.0-alpha.5

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.

4 participants