Skip to content

fix: apply extension/shebang filter to single-file targets - #28

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-single-file-binary-filter-169d
Sep 12, 2026
Merged

fix: apply extension/shebang filter to single-file targets#28
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-single-file-binary-filter-169d

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

Summary

collectFiles previously added a single-file path unconditionally, so binaries could still be read as UTF-8. Directory walks already filtered by extension/shebang; this applies the same rules to the single-file branch.

Test plan

  • npm test — includes regression for binary-target.bin (expect files: 0, no findings)

Fixes #11

Apply the same scannable-file rules when the scan target is a file path
as when walking a directory, so binary single-file targets are skipped.

Fixes AgentPostmortem#11

Co-authored-by: Sharad. <sharadvc@users.noreply.github.com>
@sharadvc

Copy link
Copy Markdown
Contributor Author

Friendly bump on the open PRs from me — happy to adjust any of them:

All have tests. Thanks for maintaining this — merge whatever looks good, I can close or revise the rest.

@royalpinto007
royalpinto007 merged commit 98f0bc8 into AgentPostmortem:main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single-file target bypasses the extension/shebang filter

3 participants