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

Redundant message to use --debug #883

Closed ericwb closed 2 years ago

ericwb commented 2 years ago

Describe the bug

If you run Bandit with the --debug flag when you have a traceback, you'll notice in the output, that Bandit still recommends running bandit with the --debug flag even though you already have.

Reproduction steps

1. Run the steps in https://github.com/PyCQA/bandit/issues/882
2. It instructs to run `bandit --debug pocfile.py`
3. Notice in the console output the following redundant message:

[manager]   ERROR   Exception occurred when executing tests against pocfile.py. Run "bandit --debug pocfile.py" to see the full traceback.


### Expected behavior

If running in debug mode, it shouldn't tell the user to run it again.

### Bandit version

1.7.4 (Default)

### Python version

3.10 (Default)

### Additional context

_No response_