UPDATE: please see my below comment for an updated description of the problem.
Describe the bug
When using the pre-commit hook, my excluded paths listed in .bandit are still processed by bandit.
To Reproduce
Steps to reproduce the behavior:
- Create a .bandit config file with exclusions. For example:
[bandit]
exclude: ./node_modules/*,./tests/*
- Run bandit via command line (
bandit -r .), verify exclusions ignored.
- Run bandit on all files via pre-commit hook:
pre-commit run --all-files bandit
- See that excluded files are processed by bandit
Expected behavior
I expect the excluded paths to be ignored.
Bandit version
bandit 1.6.0
python version = 3.7.3 (default, May 27 2019, 05:16:50) [Clang 10.0.0 (clang-1000.10.44.4)]
UPDATE: please see my below comment for an updated description of the problem.
Describe the bug
When using the pre-commit hook, my excluded paths listed in .bandit are still processed by bandit.
To Reproduce
Steps to reproduce the behavior:
[bandit] exclude: ./node_modules/*,./tests/*bandit -r .), verify exclusions ignored.pre-commit run --all-files banditExpected behavior
I expect the excluded paths to be ignored.
Bandit version