fix: clear environment variables in shell tool to prevent secret leakage
This fix addresses CWE-200 by clearing environment variables before executing shell commands and only re-adding safe, functional variables. - Add SAFE_ENV_VARS constant with whitelist of safe variables - Use .env_clear() before executing commands - Add tests for environment variable isolation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1e19b12efd
commit
b722189ef1