Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct no-prefix no-suffix exclude for top-level dirs (#975) #1028

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

b-kamphorst
Copy link

@b-kamphorst b-kamphorst commented May 11, 2023

Bandit 1.7.5 has some inconsistent behaviour. Assume a directory with just one subdirectory in it, which in turn contains a single file: ./tests/build.py

The following behaviour is observed:

  • bandit . -vrx ./tests ignores the file,
  • bandit . -vrx test ignores the file,
  • bandit . -vrx tests does NOT ignore the file.

This PR removes the internal tweaking of an excluded path if the path is a directory.

No breaking change is foreseen.

Closes #975

@b-kamphorst b-kamphorst force-pushed the 975-fix-exclude-directories-in-cwd branch from 18d1bf8 to 35825e4 Compare May 11, 2023 12:45
@b-kamphorst
Copy link
Author

Friendly reminder to @ericwb, @lukehinds and/ or @sigmavirus24 for considering this PR.

@b-kamphorst
Copy link
Author

Another friendly reminder to @ericwb, @lukehinds and/ or @sigmavirus24. Your consideration of this PR would be much appreciated :)

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.

Exclusion filter not working correctly with relative paths
1 participant