Skip to content

Commit 8114449

Browse files
committed
chore(ci): add bandit and vulture to pre-commit hooks
Standard --severity-level=low --confidence-level=low thresholds with B110/B112/B311 skipped (graceful-degradation patterns, non-crypto random). Existing findings are tracked in issue #221.
1 parent 3228831 commit 8114449

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,20 @@ repos:
2525
- id: 'end-of-file-fixer'
2626
- id: 'mixed-line-ending'
2727
- id: 'trailing-whitespace'
28+
29+
- repo: 'https://github.com/PyCQA/bandit'
30+
rev: '1.9.4'
31+
hooks:
32+
- id: 'bandit'
33+
args:
34+
- '--severity-level=low'
35+
- '--confidence-level=low'
36+
- '--skip=B110,B112,B311' # graceful-degradation patterns, non-crypto randomness
37+
types_or: ['python']
38+
39+
- repo: 'https://github.com/jendrikseipp/vulture'
40+
rev: 'v2.16'
41+
hooks:
42+
- id: 'vulture'
43+
args: ['--min-confidence=80']
44+
types_or: ['python']

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
## [Unreleased]
1212

13+
### Added
14+
15+
* **ci**: Add bandit (security) and vulture (dead code) to pre-commit hooks
16+
1317
### Fixed
1418

1519
* **execution-environment**: Add missing `sshpass` system package, required for SSH password-based connections (e.g. `--ask-pass`)

0 commit comments

Comments
 (0)