Skip to content

Conversation

@bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Jan 5, 2026

Previously, CODEX_MANAGED_CONFIG_PATH could be used to override the path used to read managed config data, /etc/codex/managed_config.toml:

pub(super) fn managed_config_default_path(codex_home: &Path) -> PathBuf {
if let Ok(path) = std::env::var("CODEX_MANAGED_CONFIG_PATH") {
return PathBuf::from(path);
}

While I believe this was designed to facilitate creating integration tests with test values of managed_config.toml, this also meant that end-users could use CODEX_MANAGED_CONFIG_PATH to circumvent policies defined in /etc/codex/managed_config.toml, which was likely not the intention of the policy author.

This PR plugs this loophole by:

  • Updating the shared managed_config_default_path() function to no longer honor CODEX_MANAGED_CONFIG_PATH.
  • Updating only the codex-app-server standalone binary to honor the environment variable, and only in debug builds.

@bolinfest bolinfest force-pushed the pr8762 branch 4 times, most recently from c7c11ea to 1563b46 Compare January 6, 2026 01:55
@bolinfest bolinfest changed the title fix: remove CODEX_MANAGED_CONFIG_PATH environment variable fix: stop honoring CODEX_MANAGED_CONFIG_PATH environment variable in production Jan 6, 2026
@bolinfest bolinfest marked this pull request as ready for review January 6, 2026 02:06
@bolinfest bolinfest merged commit 7ecd0dc into main Jan 6, 2026
52 checks passed
@bolinfest bolinfest deleted the pr8762 branch January 6, 2026 15:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 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