File tree Expand file tree Collapse file tree 1 file changed +28
-8
lines changed Expand file tree Collapse file tree 1 file changed +28
-8
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 security :
1111 runs-on : ubuntu-latest
12+
1213 steps :
1314 - uses : actions/checkout@v4
1415
15- - name : Run Bandit security scan
16+ # Use the same Python that your project targets
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.10'
21+
22+ - name : Install Poetry
23+ run : |
24+ pipx install poetry
25+ poetry --version
26+
27+ # Install project deps in Poetry venv (dev group included so scanners are available)
28+ - name : Install dependencies with Poetry
1629 run : |
17- pip install bandit
18- bandit -r min_ratio_cycle/
30+ poetry install --with dev --no-interaction --no-ansi
1931
20- - name : Run Safety check
32+ # --- Bandit: run in the project venv, tune failure level if desired ---
33+ - name : Bandit (security linter)
2134 run : |
22- pip install safety
23- safety check
35+ poetry run bandit -r min_ratio_cycle/ --severity-level medium --confidence-level high
2436
25- - name : Dependency vulnerability scan
26- 37+ # OPTION A: Safety scans the *installed* packages inside your Poetry venv
38+ - name : Safety (scan installed env)
39+ run : |
40+ poetry run pip install --upgrade safety
41+ poetry run safety check --full-report
42+
43+ - name : pip-audit (scan exported requirements, not global env)
44+ run : |
45+ pipx install pip-audit
46+ pip-audit -r requirements.txt --strict
You can’t perform that action at this time.
0 commit comments