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: Ie81d052cd57318a987f0ebfe718e1c01bdbffcd3
This commit is contained in:
Eric Brown 2016-03-08 16:27:05 -08:00
parent 45ffe4ee20
commit e28fb14a7c
1 changed files with 2 additions and 2 deletions

View File

@ -51,13 +51,13 @@ commands =
bash -c "find keystone -type f -regex '.*\.pot?' -print0| \
xargs -0 -n 1 msgfmt --check-format -o /dev/null"
# Run security linter
bandit -r keystone
bandit -r keystone -x tests
[testenv:bandit]
# NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove.
deps = .[bandit]
commands = bandit -r keystone
commands = bandit -r keystone -x tests
[testenv:cover]
commands =