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
This commit is contained in:
parent
141558e565
commit
fa16eb73e1
4
tox.ini
4
tox.ini
@ -12,7 +12,7 @@ commands =
|
|||||||
commands =
|
commands =
|
||||||
flake8
|
flake8
|
||||||
# Run security linter
|
# Run security linter
|
||||||
bandit -r oslo_config -n5
|
bandit -r oslo_config -x tests -n5
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
@ -28,7 +28,7 @@ commands = python setup.py build_sphinx
|
|||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = bandit -r oslo_config -n5
|
commands = bandit -r oslo_config -x tests -n5
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user