File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,27 @@ repos:
128128 - id : shellcheck
129129
130130 # Python hooks
131+ # Run bandit on the Molecule tests
131132 - repo : https://github.com/PyCQA/bandit
132133 rev : 1.9.1
133134 hooks :
134135 - id : bandit
135- # Bandit complains about the use of assert() in tests. This should cover
136- # the tests/ subdirectory for any molecule scenario.
137- exclude : molecule/[^/]+/tests
136+ name : bandit (Molecule tests)
137+ files : molecule/[^/]+/tests
138138 args :
139- - --config=.bandit.yml
139+ # Skip "assert used" check since assertions are used
140+ # frequently in pytests.
141+ - --skip=B101
142+ # Run bandit on everything except the Molecule tests
143+ - repo : https://github.com/PyCQA/bandit
144+ rev : 1.8.6
145+ hooks :
146+ - id : bandit
147+ name : bandit (everything else)
148+ # Bandit complains about the use of assert() in tests. This
149+ # should cover the tests/ subdirectory for any molecule
150+ # scenario.
151+ exclude : molecule/[^/]+/tests
140152 - repo : https://github.com/psf/black-pre-commit-mirror
141153 rev : 25.11.0
142154 hooks :
You can’t perform that action at this time.
0 commit comments