Expand description
Strip provider credentials from child-process environments.
Host bash / plugin / MCP children inherit the process env by default.
API keys and refresh tokens must not ride along unless a spawn explicitly
re-injects them.
Functions§
- is_
secret_ env_ name - True when
nameis a known secret the child must not inherit. - secret_
env_ names_ present - Names currently set in this process that
is_secret_env_namematches. - strip_
secret_ env_ vars - Call
removefor every known exact name, then any extra matching names currently set in this process (*_API_KEY,WHYCODES_*_TOKEN, …). Duplicate names are passed twice;env_removeis idempotent. - strip_
std_ command_ secrets - Drop known secrets from a
std::process::Commandbefore spawn.