You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: address second-round code review issues in Tool Safety Guard
1. ENV-001 evidence leak: evidence field now stores ***REDACTED*** instead
of the raw environment variable value (fixes secrets leaking into
JSON reports, CLI output, and SafetyWrapper.last_report).
2. ENV-001 deduplication collapse: _deduplicate_findings now includes
matched_pattern in the dedup key for line_number==0 findings, so
multiple blocklisted env vars each produce independent findings
instead of being collapsed into one.
3. _audit.py docstring: corrected misleading 'thread/process-safe' claim
to 'thread-safe' — threading.Lock is not cross-process.
4. _python_scanner._handle_for: range() loop detection now handles
2-arg range(start, stop) and 3-arg range(start, stop, step) forms
in addition to the original 1-arg range(stop).
5. _bash_scanner._check_redirects: strip surrounding quotes from
redirect targets to reduce false positives from bash test expression
comparisons (e.g. [[ "a" > "/etc/passwd" ]]).
6. New tests: env value leak, env dedup collapse, allow_patterns vs
blocklist conflict (both pattern and env-based).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments