Merge pull request #320 from roidelapluie/bandit

[Security] Implement bandit
This commit is contained in:
Peter Souter
2016-12-14 16:05:31 +00:00
committed by GitHub
3 changed files with 16 additions and 1 deletions

View File

@@ -8,7 +8,9 @@ install:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install -r requirements-test.txt - pip install -r requirements-test.txt
- pip install -q coverage coveralls --use-wheel - pip install -q coverage coveralls --use-wheel
script: py.test --cov=puppetboard --pep8 -v script:
- py.test --cov=puppetboard --pep8 -v
- ./bandit.sh
after_success: after_success:
- coveralls - coveralls

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

View File

@@ -6,3 +6,4 @@ pytest-pep8==1.0.5
pytest-cov==2.2.1 pytest-cov==2.2.1
cov-core==1.15.0 cov-core==1.15.0
unittest2==1.1.0; python_version < '2.7' unittest2==1.1.0; python_version < '2.7'
bandit