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 code review issues in Tool Safety Guard
1. Fix RESET NameError in _print_summary when --no-color (tool_safety_check.py)
- RESET was only defined in the color branch, causing crash with --no-color.
2. Fix allow_patterns overriding blocklist DENY (_scanner.py)
- allow_patterns now only upgrades NEEDS_HUMAN_REVIEW → ALLOW,
never overrides DENY from risk-level or blocklist decisions.
3. Fix ||/&& false positives in _check_operators (_bash_scanner.py)
- shlex splits || into two | tokens causing false pipe detection.
- Similarly && was falsely detected as background operator.
- Now skips adjacent |/| and &/& to correctly identify shell operators.
4. Update tests to reflect new allow_patterns behavior (test_tool_safety.py)
5. Update DESIGN.md and README.md to document fixed behaviors
- Decision pipeline: allow_patterns only upgrades NEEDS_HUMAN_REVIEW
- Oversized scripts: always DENY with blocklist pre-check
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments