mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Protect the guardian decisions API key from environment forwarding (#50019)
## What changed Add `CODEX_GUARDIAN_DECISIONS_API_KEY` to the non-inheritable environment variables and the HTTP header environment denylist. Case-insensitive filtering removes it from child process environments, including explicit shell policy and command overrides, and rejects its use through `http/request` header `value_env_var`. ## Testing Extend regression coverage for inherited and overridden variables, mixed-case names, and HTTP header rejection before any network request is sent. GitOrigin-RevId: 1adeef814fdccb2d6c77dd68f7a5dfcec0b41cc6
This commit is contained in:
@@ -46,6 +46,7 @@ const HTTP_HEADER_ENV_DENYLIST: &[&str] = &[
|
||||
OPENAI_IDENTITY_TOKEN_FILE_ENV_VAR,
|
||||
OPENAI_WORKLOAD_IDENTITY_CONTEXT_ENV_VAR,
|
||||
"OPENAI_API_KEY",
|
||||
"CODEX_GUARDIAN_DECISIONS_API_KEY",
|
||||
"CODEX_API_KEY",
|
||||
"CODEX_ACCESS_TOKEN",
|
||||
"CODEX_CONNECTORS_TOKEN",
|
||||
|
||||
Reference in New Issue
Block a user