Skip to content

Commit

Permalink
fix: pass --excludes to bandit
Browse files Browse the repository at this point in the history
Until PyCQA/bandit#657 is fixed, specify --excludes when invoking
bandit.  Remove version exclusion for bandit 1.6.3 since 1.7.0 has the
same issue.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid committed Mar 31, 2021
1 parent 18958d0 commit 11affe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[bandit]
# Note: exclude is ignored by bandit 1.6.3 and later.
# See https://github.com/PyCQA/bandit/issues/657
exclude = /.tox/,/.venv/
# B101 assert_used (needed for pytest, arguably useful outside)
# B321 ftplib (not actionable)
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Abstract top-level development dependencies (e.g. linters and other tools)
bandit!=1.6.3
bandit
black; python_version >= '3.6'
blacken-docs; python_version >= '3.6'
flake8
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ commands_pre =
commands =
flake8
pylint_runner
bandit -f txt -r .
bandit -f txt --exclude /.git/,/.tox/,/.venv/,/__pycache__/ -r .
pyroma .
vulture --exclude */docs/*,*/tests/*,*/.tox/*,*/.venv*/* .
black --check --diff .
Expand Down

0 comments on commit 11affe1

Please sign in to comment.