Start checking the salt code base with bandit

This commit is contained in:
Pedro Algarvio 2021-01-27 10:45:06 +00:00 committed by Megan Wilhite
parent 7bff39ed0e
commit d16ab08a4d
2 changed files with 27 additions and 0 deletions

2
.bandit Normal file
View file

@ -0,0 +1,2 @@
[bandit]
exclude: salt/ext/tornado/*

View file

@ -1144,6 +1144,31 @@ repos:
additional_dependencies: [black==19.10b0]
# <---- Code Formatting --------------------------------------------------------------------------------------------
# ----- Security -------------------------------------------------------------------------------------------------->
- repo: https://github.com/PyCQA/bandit
rev: "1.7.0"
hooks:
- id: bandit
alias: bandit-salt
name: Run bandit against Salt
args: [--silent, -lll]
exclude: >
(?x)^(
templates/.*|
salt/ext/.*|
tests/.*
)$
- repo: https://github.com/PyCQA/bandit
rev: "1.7.0"
hooks:
- id: bandit
alias: bandit-tests
name: Run bandit against the test suite
args: [--silent, -lll]
files: ^tests/.*
exclude: ^tests/minionswarm\.py
# <---- Security ---------------------------------------------------------------------------------------------------
# ----- Pre-Commit ------------------------------------------------------------------------------------------------>
- repo: https://github.com/saltstack/mirrors-nox
rev: v2020.8.22