From e0a91426afc90c4366e87f75daa7f983c674a4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Mon, 13 May 2019 13:04:23 +0200 Subject: [PATCH] Fix bandit errors Bandit 1.6.0 changes the behavior of the '-x' option so that it now supports glob patterns. Update our tox file to use to correctly exclude test code from bandit scans. This requires bumping our minimum bandit version. As an aside, changing the behavior of an option like this in a minor version if bad form :( Change-Id: I11bee26373ea9894b47d7f964eac88ef70859732 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index a22e50a5..73bfb438 100644 --- a/tox.ini +++ b/tox.ini @@ -74,12 +74,12 @@ commands = yapf -dr {toxinidir}/armada {toxinidir}/setup.py flake8 {posargs} # Run security linter as part of the pep8 gate instead of a separate zuul job. - bandit -r armada -x armada/tests -n 5 + bandit -r armada -n 5 -x armada/tests/* [testenv:bandit] basepython = python3 commands = - bandit -r armada -x armada/tests -n 5 + bandit -r armada -n 5 -x armada/tests/* [testenv:cover] basepython = python3