Browse Source

Merge "add bandit to pep8 job"

tags/2.20.0
Zuul 1 year ago
parent
commit
f9970a94e5
2 changed files with 9 additions and 1 deletions
  1. 3
    0
      test-requirements.txt
  2. 6
    1
      tox.ini

+ 3
- 0
test-requirements.txt View File

@@ -11,3 +11,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
11 11
 openstackdocstheme>=1.17.0 # Apache-2.0
12 12
 sphinx>=1.6.2 # BSD
13 13
 reno>=2.5.0 # Apache-2.0
14
+
15
+# Bandit security code scanner
16
+bandit>=1.1.0 # Apache-2.0

+ 6
- 1
tox.ini View File

@@ -11,7 +11,12 @@ deps =
11 11
 commands = python setup.py testr --slowest --testr-args='{posargs}'
12 12
 
13 13
 [testenv:pep8]
14
-commands = flake8
14
+deps =
15
+  -r{toxinidir}/test-requirements.txt
16
+commands =
17
+  flake8
18
+  # Run security linter
19
+  bandit -r oslo_context -x tests -n5
15 20
 
16 21
 [testenv:venv]
17 22
 commands = {posargs}

Loading…
Cancel
Save