Asking bandit to use pyproject.toml
without a bandit config section causes exception
#1027
Labels
bug
Something isn't working
Describe the bug
Apparently bandit does not like it if asked to use
pyproject.toml
and not find a dedicated config section.Reproduction steps
I use the following pre-commit hook to run bandit:
with a
pyproject.toml
that has no configuration for bandit.This results in:
Expected behavior
For most tools with some config files, if the config does not "override" behavior, it is using default values.
So I expect the same when running
bandit
with apyproject.toml
. A missing section in the toml to me feels the same as an empty config file.Currently, I have to create an empty
bandit
config section in order to be able to keep the hook as it is (anticipating that IF I change the config, I will put it in the toml).Bandit version
1.7.5 (Default)
Python version
3.8
Additional context
No response
The text was updated successfully, but these errors were encountered: