Skip to content

fix: resolve relative scan roots before building tool exclusions - #897

Open
Sk1tch wants to merge 1 commit into
peteromallet:mainfrom
Sk1tch:fix/absolute-scan-exclusions
Open

Sk1tch wants to merge 1 commit into
peteromallet:mainfrom
Sk1tch:fix/absolute-scan-exclusions

Conversation

@Sk1tch

@Sk1tch Sk1tch commented Oct 27, 2026

Copy link
Copy Markdown

Scanning with --path . passes relative directory exclusions to external tools even though their scan targets are absolute. Bandit turns existing relative directories into relative globs, so .cache/* does not match the absolute filenames it scans. A real project scan consequently included dependency caches and reported hundreds of unrelated security findings.

Resolve the scan root before constructing exclusion paths. Add a regression test using Path(".") and a configured .cache exclusion.

Validation: 66 external-adapter tests pass; the complete desloppify/tests/ suite passes with 5,811 passed and 5 skipped. The same project scan now limits Bandit to 70 authored files, down from 454 including generated and vendor files.

github-actions Bot added a commit to citizenadam/desloppify that referenced this pull request Oct 27, 2026

This branch has not been deployed

No deployments
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.

1 participant