mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-05-17 06:09:29 +00:00
ci(security): add Bandit pre-commit hook
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -223,6 +223,10 @@ cython_debug/
|
|||||||
.github/copilot-instructions.md
|
.github/copilot-instructions.md
|
||||||
CLAUDE.md
|
CLAUDE.md
|
||||||
|
|
||||||
|
# CodeQL local analysis
|
||||||
|
.codeql-db/
|
||||||
|
.codeql-results/
|
||||||
|
|
||||||
# Ruff stuff:
|
# Ruff stuff:
|
||||||
.ruff_cache/
|
.ruff_cache/
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,15 @@ repos:
|
|||||||
rev: 6.0.1
|
rev: 6.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
- repo: https://github.com/PyCQA/bandit
|
||||||
|
rev: 1.8.3
|
||||||
|
hooks:
|
||||||
|
- id: bandit
|
||||||
|
args:
|
||||||
|
- -c=pyproject.toml
|
||||||
|
- --severity-level=medium
|
||||||
|
- --confidence-level=medium
|
||||||
|
additional_dependencies: ['bandit[toml]']
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v5.0.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|||||||
@@ -119,6 +119,16 @@ follow_imports = "silent"
|
|||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
no_implicit_optional = true
|
no_implicit_optional = true
|
||||||
|
|
||||||
|
[tool.bandit]
|
||||||
|
exclude_dirs = ["tests", ".venv"]
|
||||||
|
skips = [
|
||||||
|
"B101", # assert used legitimately in non-test code
|
||||||
|
"B324", # MD5/SHA1 used for identifiers and cache keys, not security
|
||||||
|
"B413", # false positive: pycryptodome uses Crypto namespace, not deprecated pyCrypto
|
||||||
|
"B314", # XML from DRM protocol headers, not untrusted user input
|
||||||
|
"B608", # SQL table names from internal service tags, not user input; parameterized values
|
||||||
|
]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
unshackle = { workspace = true }
|
unshackle = { workspace = true }
|
||||||
subby = { git = "https://github.com/vevv/subby.git", rev = "1ea6a52028c5bea8177c8abc91716d74e4d097e1" }
|
subby = { git = "https://github.com/vevv/subby.git", rev = "1ea6a52028c5bea8177c8abc91716d74e4d097e1" }
|
||||||
|
|||||||
Reference in New Issue
Block a user