-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add bandit to pre-commit hooks to check for common security issues #77
Conversation
My suggestion would be to make it usable for running locally but not integrated as part of a github action. This allows us to parse the issues and give feedback to bandit. Hopefully over time it these |
We could add python-package-template/setup.py Lines 61 to 73 in 7292ee9
Then it’ll be installed, and users can use it if they want… or not. |
af660df
to
7d37c2e
Compare
5ab088f
to
61c2b39
Compare
7d37c2e
to
6239a60
Compare
@jenstroeger Saw this issue mentioned somewhere, and thought you might be interested in how to get the toml config working. PyCQA/bandit#902 (comment) |
As mentioned in issue #5 I added the bandit tool as a pre-commit hook.
I do have a few concerns though:
pyproject.toml
configuration isn’t currently supported (issue Error parsing pyproject.tml PyCQA/bandit#733) but seems to have been committed to mainstream (commit PyCQA/bandit@44f5c41) but I couldn’t make that work.bandit
as issue B101, and it’s not possible to disable that for tests only (issue Skip configuration for certain paths only PyCQA/bandit#457); so I’ve disabled it globally through the command-line (because thepyproject.toml
isn’t working).So, while I think that
bandit
can be useful, in its current state it’s a bit limited and inflexible for CI.