PyCQA / bandit

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

Rework GitPython dependency to be an extra for bandit-baseline #1099

Closed ericwb closed 10 months ago

ericwb commented 10 months ago

The only piece of code that requires GitPython is bandit-baseline. There tends to be an abundance of CVEs in the GitPython library due to its dependency on Git. By making GitPython optional via an extra, users who mostly use just the bandit command line and not bandit-baseline can benefit.

However, this will require different install if a user wants to use bandit-baseline. This is now noted in the Getting Started doc, but you simply do:

pip install bandit[GitPython]

FYI, this option was suggested in PR #976.