Codebase list python-castellan / dd6ad90
Add a bandit environment to tox This change is being proposed as part of the OpenStack Security Project working session at the Austin 2016 summit. It adds support for running the bandit[1] security linting tool against the Castellan codebase. This change adds a targetted environment for bandit and also adds bandit as part of the pep8 job. The bandit configuration has been tailored to exclude tests that are currently producing warning against the codebase. These issues will be followed up with bug reports and patches. At the time of submission, Castellan passes all Bandit tests configured in tox. [1]: https://wiki.openstack.org/wiki/Security/Projects/Bandit Change-Id: I19368d3440ad5dc862e7d91f7890f9b1901fced3 Robert Clark 7 years ago
2 changed file(s) with 16 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1212 testrepository>=0.0.18 # Apache-2.0/BSD
1313 testscenarios>=0.4 # Apache-2.0/BSD
1414 testtools>=1.4.0 # MIT
15 bandit>=1.0.1 # Apache-2.0
1313 commands = python setup.py testr --slowest --testr-args='{posargs}'
1414
1515 [testenv:pep8]
16 commands = flake8
16 commands =
17 flake8
18 bandit -r castellan -x tests -s B105,B106,B107,B607
19
20 [testenv:bandit]
21 # This command runs the bandit security linter against the castellan
22 # codebase minus the tests directory. Some tests are being excluded to
23 # reduce the number of positives before a team inspection, and to ensure a
24 # passing gate job for initial addition. The excluded tests are:
25 # B105-B107: hardcoded password checks - likely to generate false positives
26 # in a gate environment
27 # B607: start process with a partial path - this should be a project level
28 # decision
29 commands =
30 bandit -r castellan -x tests -s B105,B106,B107,B607
1731
1832 [testenv:venv]
1933 commands = {posargs}