From e6a09f3ce70fb0de919752a09a2fb210f797f1e1 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Thu, 30 Nov 2017 11:22:06 +0800 Subject: [PATCH] add bandit to pep8 job Add the bandit security scanner to the pep8 job. Change-Id: Ib4707b55c190b117410212cef7f5afc789c91583 --- test-requirements.txt | 2 ++ tox.ini | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 566b29b..d1bd9c5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,3 +12,5 @@ testtools>=2.2.0 # MIT coverage!=4.4,>=4.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 +# Bandit security code scanner +bandit>=1.1.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index d5dcaa7..2e1e6ad 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,12 @@ deps = -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] -commands = flake8 +deps = + -r{toxinidir}/test-requirements.txt +commands = + flake8 + # Run security linter + bandit -r oslo_middleware -x tests -n5 [testenv:venv] commands = {posargs}