Skip to main content

subprocess_env

Function subprocess_env 

Source
pub fn subprocess_env() -> HashMap<String, String>
Expand description

Returns a copy of process.env with sensitive secrets stripped, for use when spawning subprocesses (Bash tool, shell snapshot, MCP stdio servers, LSP servers, shell hooks).

Gated on AI_CODE_SUBPROCESS_ENV_SCRUB. claude-code-action sets this automatically when allowed_non_write_users is configured — the flag that exposes a workflow to untrusted content (prompt injection surface).