Replace blacklist approach with explicit whitelist for child process environment variables to prevent secret exfiltration via creative naming. Changes: - tools/code_execution_tool.py: Implement _ALLOWED_ENV_VARS frozenset - Only pass explicitly listed env vars to sandboxed child processes - Drop all other variables silently to prevent credential theft Fixes CWE-526: Exposure of Sensitive Information to an Unauthorized Actor CVSS: 9.3 (Critical) Refs: V-003 in SECURITY_AUDIT_REPORT.md
32 KiB
32 KiB