Skip to content

Commit 07b5fc9

Browse files
committed
Add bandit pre-commit hook
Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com>
1 parent c76a2a8 commit 07b5fc9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.bandit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ any_other_function_with_shell_equals_true:
134134
- subprocess.run
135135
assert_used:
136136
skips:
137+
- tests/*.py
137138
- ./tests/*.py
138139
hardcoded_tmp_directory:
139140
tmp_dirs:

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ repos:
3232
args: [ --fix ]
3333
# Run the formatter.
3434
#- id: ruff-format
35+
- repo: https://github.com/PyCQA/bandit
36+
# Ruff version.
37+
rev: 1.7.6
38+
hooks:
39+
- id: bandit
40+
args: [ --configfile, .bandit.yml ]

0 commit comments

Comments
 (0)