Adds Safety dependency vulnerability checks

This change adds dependency vulnerability checks into tox. These checks
are performed by the Safety package which checks requirements files
against a vulnerability database for any issues. If any vulnerabilities
are found, tox will fail its pep8 env.

Change-Id: I6e356d1f55ced7df9490d34e06451acd9cbb6d70
This commit is contained in:
Ian H. Pittwood 2019-05-29 11:50:54 -05:00
parent 387de658dc
commit db1fe14c0b

View File

@ -35,9 +35,17 @@ commands =
yapf -dr {toxinidir}/spyglass-plugin-xls {toxinidir}/setup.py
flake8 {toxinidir}/spyglass-plugin-xls
bandit -r spyglass-plugin-xls -n 5
safety check -r requirements.txt --bare
whitelist_externals =
bash
[testenv:safety]
deps =
safety
commands =
safety check -r {toxinidir}/requirements.txt --full-report
safety check -r {toxinidir}/test-requirements.txt --full-report
[testenv:bandit]
deps =
bandit