Skip to content

Commit 0b70793

Browse files
author
Hustle
committed
fix(ci): audit only project deps in pip-audit, not runner environment
pip-audit without -r flag audits the full runner environment, including pre-installed packages like pygments that are not project dependencies. This caused false positive security failures unrelated to webstatuspi. Now audits only requirements.txt and requirements-dev.txt.
1 parent 25b166c commit 0b70793

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/security.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install pip-audit
29-
# Install only the dependencies, not the local package
30-
pip install PyYAML requests
3129
3230
- name: Run pip-audit
33-
run: pip-audit --strict --progress-spinner off
31+
# Audit only project dependencies (requirements.txt), not the full runner environment.
32+
# This avoids false positives from pre-installed system packages like pygments.
33+
run: pip-audit --strict --progress-spinner off -r requirements.txt -r requirements-dev.txt
3434

3535
codeql:
3636
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)