PyCQA / bandit

Bandit is a tool designed to find common security issues in Python code.
https://bandit.readthedocs.io
Apache License 2.0
6.52k stars 612 forks source link

Add the ability to skip files and directories to other tests #982

Open simple-nathan opened 1 year ago

simple-nathan commented 1 year ago

Is your feature request related to a problem? Please describe. Specifically I'd like to be able to apply the skips: [ ] configuration to B105/6/7 but I imagine it would be useful for all tests.

Describe the solution you'd like In the bandit.yaml file I would like to be able to do: hardcoded_password_string: skips: ["*/test_*.py"]

Describe alternatives you've considered I could disable the test for the whole project but that seems like a very black and white approach to take.

There are also tests listed in the generated yaml config file that aren't in the docs, such as B311 : random that may benefit from selective skipping.