Skip to content

Commit fade87c

Browse files
committed
feat: add bandit security scanning to pre-commit hooks
1 parent 5205b62 commit fade87c

File tree

3 files changed

+104
-4
lines changed

3 files changed

+104
-4
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ repos:
1414
# Ruff version.
1515
rev: v0.12.4
1616
hooks:
17-
# Run the linter.
18-
- id: ruff
19-
exclude: ruff.xml
20-
# Run the formatter.
17+
# Run the formatter first.
2118
- id: ruff-format
2219
exclude: ruff.xml
20+
# Then run the linter.
21+
- id: ruff
22+
exclude: ruff.xml
23+
24+
- repo: https://github.com/PyCQA/bandit
25+
rev: 1.8.0
26+
hooks:
27+
- id: bandit
28+
args: ['-c', 'pyproject.toml']

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dev = [
3838
"ruff==0.12.3",
3939
"pre-commit==4.2.0",
4040
"commitizen>=3.0.0",
41+
"bandit==1.8.0",
4142
]
4243

4344
[tool.hatch.build.targets.wheel]

uv.lock

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)