⌨️CLAUDE_CODE_SUBPROCESS_ENV_SCRUB
Also known as CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1
Set to 1, it hides your secrets from the commands Claude Code runs.
Think of it like
It is like you take things out of your pockets. Then you lend your coat.
Example
Jack's shell holds a cloud key. A web page could trick Claude into printing it. With this set, the commands never see it.
Why it matters
If a command cannot see a key, a tricked command cannot leak it.
Definition
Example code
bash
export CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1
claudeCommon mistake
Key takeaways
- 1Secrets removed. From commands.
- 2GitHub and proxy stay. Kept on purpose.
- 3One layer. Plus permissions.