Problem
A single-file target bypasses the extension/shebang filter (out.push(target) for any file), so binaries get readFileSync(f, "utf8") decoded lossily and produce garbage findings.
Where
src/scan.js (collectFiles single-file branch).
Acceptance
Add a failing test first asserting scanning a binary fixture yields zero files (or a clean "not scannable" outcome). Then fix.
Problem
A single-file target bypasses the extension/shebang filter (
out.push(target)for any file), so binaries getreadFileSync(f, "utf8")decoded lossily and produce garbage findings.Where
src/scan.js(collectFilessingle-file branch).Acceptance
Add a failing test first asserting scanning a binary fixture yields zero files (or a clean "not scannable" outcome). Then fix.