Skip to content

Commit 002815c

Browse files
committed
ci: fix pip-audit invocation to scan exported requirements
`uvx pip-audit --disable-pip` requires `-r` plus either hashed requirements or `--no-deps`. The previous invocation crashed at start. Now: export the locked deps via `uv export --no-hashes --no-emit-project` into a tmp requirements file (skipping the local editable install of the project itself), then feed that to pip-audit with `--disable-pip --no-deps`. Verified locally -- no known vulnerabilities found across the 85 locked transitive deps. Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent 0c52122 commit 002815c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/python-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ jobs:
6464
from socketsecurity.config import CliConfig
6565
print('import smoke OK')
6666
"
67-
- name: 🛡️ pip-audit (known CVEs in the synced env)
68-
run: uvx pip-audit --strict --disable-pip --progress-spinner off
67+
- name: 🛡️ pip-audit (known CVEs in the locked deps)
68+
run: |
69+
uv export --no-hashes --no-emit-project --format requirements-txt > /tmp/req-audit.txt
70+
uvx pip-audit --strict --progress-spinner off --disable-pip --no-deps -r /tmp/req-audit.txt
6971
7072
unsupported-python-install:
7173
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)