Skip to content
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

Merged
merged 3 commits into from
Jan 16, 2022

Conversation

jenstroeger
Copy link
Owner

As mentioned in issue #5 I added the bandit tool as a pre-commit hook.

I do have a few concerns though:

So, while I think that bandit can be useful, in its current state it’s a bit limited and inflexible for CI.

@jenstroeger jenstroeger requested a review from behnazh December 16, 2021 10:38
@brad-getpassport
Copy link

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 bandit issues will get fixed.

@jenstroeger
Copy link
Owner Author

We could add bandit to the development dependencies

"dev": [
"flake8==4.0.1",
"flake8-builtins==1.5.3",
"flake8-docstrings==1.6.0",
"flake8-rst-docstrings==0.2.3",
"hypothesis==6.30.1",
"mypy==0.910",
"pep8-naming==0.12.1",
"pre-commit==2.16.0",
"pylint==2.12.2",
"tox==3.24.4",
"types-setuptools==57.4.2",
],

Then it’ll be installed, and users can use it if they want… or not.

@jenstroeger jenstroeger marked this pull request as ready for review January 15, 2022 10:22
UPSTREAM_README.md Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@jenstroeger jenstroeger merged commit 57a879c into staging Jan 16, 2022
@jenstroeger jenstroeger deleted the add-bandit branch February 7, 2022 04:46
@travisjungroth
Copy link

@jenstroeger Saw this issue mentioned somewhere, and thought you might be interested in how to get the toml config working. PyCQA/bandit#902 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants