From fa16eb73e1c692af10bdd01a98fddb4602f79138 Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Sat, 12 Mar 2016 19:58:54 -0800 Subject: [PATCH] Explicitly exclude tests from bandit scan Now that the bandit linter runs without a bandit.yaml specified, it should exclude the tests directory similar to how it did before in the bandit.yaml. The reason this has not caused a problem yet is because bandit is still finding a config bandit.yaml in .tox/pep8/etc/bandit/bandit.yaml. But in a newer version of bandit this will not be the case. Change-Id: I66dc7c2b826cf6e061fc6abc368c2be00ab2d202 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index cafec994..f04fa255 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = commands = flake8 # Run security linter - bandit -r oslo_config -n5 + bandit -r oslo_config -x tests -n5 [testenv:cover] setenv = VIRTUAL_ENV={envdir} @@ -28,7 +28,7 @@ commands = python setup.py build_sphinx [testenv:bandit] deps = -r{toxinidir}/test-requirements.txt -commands = bandit -r oslo_config -n5 +commands = bandit -r oslo_config -x tests -n5 [flake8] show-source = True