Skip to content

Commit bc8e06a

Browse files
committed
feat: add bandit security scan
1 parent 0412a64 commit bc8e06a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: "3.10"
2222

2323
- name: Install dependencies
24-
run: pip install ruff mypy pytest pytest-cov
24+
run: pip install ruff mypy pytest pytest-cov bandit
2525

2626
- name: Ruff lint
2727
run: ruff check .
@@ -33,4 +33,7 @@ jobs:
3333
run: mypy src/
3434

3535
- name: pytest
36-
run: pytest --cov=src --cov-fail-under=80
36+
run: pytest --cov=src --cov-fail-under=80
37+
38+
- name: Bandit 安全掃描
39+
run: bandit -r src/ -ll

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ select = ["E", "F", "I", "N", "W"]
99
python_version = "3.10"
1010
ignore_missing_imports = true
1111

12+
[tool.bandit]
13+
targets = ["src"]
14+
severity = "medium"
15+
1216
[tool.pytest.ini_options]
1317
testpaths = ["tests"]

0 commit comments

Comments
 (0)