Only load config from trusted folders (#9533)

Config includes multiple code execution entrypoints. 

Now, we load the config from predetermined locations first
(~/.codex/config.toml etc), use those to learn which folders are
'trusted', and only load additional config from the CWD if it is
trusted.
This commit is contained in:
gt-oai
2026-01-20 15:44:21 +00:00
committed by GitHub
parent 3a9f436ce0
commit 7351c12999
4 changed files with 207 additions and 15 deletions

View File

@@ -531,7 +531,7 @@ pub async fn load_config_as_toml_with_cli_overrides(
Ok(cfg)
}
fn deserialize_config_toml_with_base(
pub(crate) fn deserialize_config_toml_with_base(
root_value: TomlValue,
config_base_dir: &Path,
) -> std::io::Result<ConfigToml> {