Add bandit security linter

Bandit detects potential security issues in code. This patch adds
it to tox. Some of the issues found need to be fixed prior to
introducing into a gate job.

Change-Id: Id902d8b95626f98d79755cbab9144b2d6041f66e
This commit is contained in:
Eric Brown 2016-02-04 15:33:29 -08:00
parent 5a2d30bbb3
commit 6bf905b495
2 changed files with 5 additions and 0 deletions

View File

@ -19,3 +19,4 @@ WebTest>=2.0 # MIT
# This is needed for subunit-trace
tempest-lib>=0.13.0 # Apache-2.0
reno>=0.1.1 # Apache2
bandit>=0.17.3 # Apache-2.0

View File

@ -53,6 +53,10 @@ commands =
neutron-db-manage --subproject vmware-nsx check_migration
whitelist_externals = sh
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r vmware_nsx -n 5 -ll
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args='{posargs}'