Skip to content

Commit

Permalink
Merge pull request #1003 from mulkieran/skip-B404
Browse files Browse the repository at this point in the history
Skip bandit B404 check
  • Loading branch information
mulkieran authored Aug 7, 2023
2 parents 2e6645a + fe6a8b2 commit 0e63b56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
UNITTEST_OPTS = --verbose
#
# Ignore bandit B404 errors. Any import of the subprocess module causes this
# error. We know what we are doing when we import that module and do not
# need to be warned.
BANDIT_SKIP = --skip B404

.PHONY: lint
lint:
pylint setup.py
pylint bin/stratis
pylint src/stratis_cli --disable=duplicate-code --ignore=_introspect.py
pylint tests/whitebox --disable=duplicate-code
bandit setup.py
bandit bin/stratis
bandit setup.py ${BANDIT_SKIP}
bandit bin/stratis ${BANDIT_SKIP}
# Ignore B101 errors. We do not distribute optimized code, i.e., .pyo
# files in Fedora, so we do not need to have concerns that assertions
# are removed by optimization.
bandit --recursive ./src --skip B101
bandit --recursive ./tests
bandit --recursive ./src ${BANDIT_SKIP} --skip B101
bandit --recursive ./tests ${BANDIT_SKIP}

.PHONY: fmt
fmt:
Expand Down
2 changes: 1 addition & 1 deletion tests/whitebox/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import random
import signal
import string
import subprocess # nosec B404
import subprocess
import sys
import time
import unittest
Expand Down

0 comments on commit 0e63b56

Please sign in to comment.