Skip to content

Add a global rule against env vars in the command line - #128

Merged
technicalpickles merged 1 commit into
mainfrom
cli-env-vars-rule
Nov 10, 2026
Merged

technicalpickles merged 1 commit into
mainfrom
cli-env-vars-rule

Conversation

@technicalpickles

Copy link
Copy Markdown
Owner

Summary

  • Adds a global rule: don't put env vars in the command line (FOO=bar cmd, env FOO=bar cmd). Wrap it in a script or mise task, or pull secrets with av inject / op run --env-file.
  • Why it matters: an inline assignment changes the command string that allow rules and the auto-mode classifier look at, so a command that should match gets denied, and any secret ends up in the transcript and process list. Hit this on 2026-11-10 when auto mode kept denying a token read.

Test plan

  • After merge, run ./claudeconfig.sh and confirm ~/.claude/rules/cli-env-vars.md shows up.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@technicalpickles
technicalpickles merged commit 1be3bb5 into main Nov 10, 2026
2 checks passed
@technicalpickles
technicalpickles deleted the cli-env-vars-rule branch November 10, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant