Merge "pre-commit: Integrate bandit"

This commit is contained in:
Zuul 2024-01-31 15:00:32 +00:00 committed by Gerrit Code Review
commit 33244f6aae
3 changed files with 7 additions and 7 deletions

View File

@ -23,3 +23,8 @@ repos:
hooks: hooks:
- id: hacking - id: hacking
additional_dependencies: [] additional_dependencies: []
- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: ['-x', 'tests']

View File

@ -1,10 +1,6 @@
hacking>=6.1.0,<6.2.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0 pifpaf>=0.10.0 # Apache-2.0
# Bandit security code scanner
bandit>=1.7.0,<1.8.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0
pre-commit>=2.6.0 # MIT
pymemcache>=3.5.0 # Apache-2.0 pymemcache>=3.5.0 # Apache-2.0
python-binary-memcached>=0.29.0 # MIT python-binary-memcached>=0.29.0 # MIT
python-memcached>=1.56 # PSF python-memcached>=1.56 # PSF

View File

@ -20,11 +20,10 @@ commands =
pifpaf -e OSLO_CACHE_TEST run {env:PIFPAF_DAEMON} -- stestr run --slowest pifpaf -e OSLO_CACHE_TEST run {env:PIFPAF_DAEMON} -- stestr run --slowest
[testenv:pep8] [testenv:pep8]
deps = {[testenv]deps} deps =
pre-commit
commands = commands =
pre-commit run -a pre-commit run -a
# Run security linter
bandit -r oslo_cache -x tests -n5
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}