add bandit to pep8 job

Add the bandit security scanner to the pep8 job.

Change-Id: I3cf1630c8d69515700e98a9274f42aa3f3b05303
This commit is contained in:
ChangBo Guo(gcb) 2017-11-30 11:30:17 +08:00
parent a9931f3708
commit 839b34080b
2 changed files with 9 additions and 1 deletions

View File

@ -13,3 +13,6 @@ openstackdocstheme>=1.17.0 # Apache-2.0
sphinx>=1.6.2 # BSD
reno>=2.5.0 # Apache-2.0
# Bandit security code scanner
bandit>=1.1.0 # Apache-2.0

View File

@ -12,7 +12,12 @@ deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
deps =
-r{toxinidir}/test-requirements.txt
commands =
flake8
# Run security linter
bandit -r oslo_policy tests -n5
[testenv:venv]
commands = {posargs}