bandit
bandit copied to clipboard
fix: correct no-prefix no-suffix exclude for top-level dirs (#975)
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 ./testsignores the file, -
bandit . -vrx testignores the file, -
bandit . -vrx testsdoes 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
Friendly reminder to @ericwb, @lukehinds and/ or @sigmavirus24 for considering this PR.
Another friendly reminder to @ericwb, @lukehinds and/ or @sigmavirus24. Your consideration of this PR would be much appreciated :)