[Security] Implement bandit

Bandit (https://github.com/openstack/bandit) is a python
security linter.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2016-12-07 09:41:23 +01:00
parent 3fbd182453
commit 6fa0a4a796
3 changed files with 16 additions and 1 deletions

12
bandit.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash -xe
# Runs bandit tests
pyver="$(python -V 2>&1)"
if [[ $pyver =~ Python\ 2\.6 ]]
then
echo 'Bandit does not support python 2.6'
else
bandit -r puppetboard
bandit -r tests
fi