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(scope): scope external-tool findings to the detector's ignore set + HTML log
Engine-orchestrated external tools (Gitleaks/Trivy/...) scan the raw working
tree and did NOT honor the scanner's file-discovery exclusions, so a single
secret scanner flooded the report with false positives from generated caches.
Measured on a real Flutter project: 749 path hits from a Chrome profile under
.dart_tool/, 265 from .supabase/, plus build/. The built-in detector never sees
those dirs, so the external tools were manufacturing the very false positives
this suite exists to cut.
- Extract a canonical DEFAULT_IGNORE_DIRS / DEFAULT_IGNORE_PATTERNS +
buildScannerIgnoreGlobs() into src/ignore.js (single source of truth),
adding the generated caches .dart_tool, .gradle and .supabase.
- scanner.js derives its discovery globs from it (DRY; a regression test
asserts every legacy exclusion is retained).
- index.js layers DEFAULT_IGNORE_PATTERNS BEFORE the user's .csreview-ignore
(last-match-wins, so a project can `!`-re-include a default) so the external
tools' findings are scoped to first-party source, exactly like the detector.
Read-only and fail-open, as before.
- Each tool result is annotated with how many findings were filtered; the CLI
surfaces "N filtered as generated/cache" and an accurate suppression label.
- reports/html.js now logs "Generating HTML report..." + "HTML report saved to"
for parity with the Markdown/SARIF reporters (the missing line made the HTML
report look absent in the run output even though it was always written).
Tests: +6 (ignore defaults/globs, runAnalysis tool-scoping, HTML log parity,
normalizer source-attribution contract). 167/167 - lint clean - typecheck 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments