Skip to content

Commit 762117f

Browse files
authored
Merge pull request #9 from stackopshq/ci/audit-runtime-deps-only
ci(security): audit only declared runtime deps, not the runner env
2 parents edaf76b + c761ded commit 762117f

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,21 @@ jobs:
140140
python-version: "3.11"
141141
cache: pip
142142

143-
- name: Install project + pip-audit
144-
run: |
145-
pip install -e .
146-
pip install pip-audit
143+
- name: Install poetry + pip-audit
144+
# poetry-plugin-export is bundled in poetry < 2.0 but split out in
145+
# poetry 2.x; pin it explicitly so this works on either side of
146+
# that boundary.
147+
run: pip install poetry "poetry-plugin-export>=1.7" pip-audit
148+
149+
- name: Export runtime requirements
150+
# Audit only what we actually ship — orca's declared runtime deps —
151+
# rather than the runner's whole environment. The previous
152+
# ``pip-audit --skip-editable`` invocation walked every package
153+
# installed in the job's Python (pip, setuptools, wheel, …) and
154+
# failed the build on advisories in the tooling itself, e.g.
155+
# CVE-2026-3219 in pip 26.0.1. Those have nothing to do with
156+
# orca's supply chain.
157+
run: poetry export --format requirements.txt --without-hashes --only main --output /tmp/runtime-requirements.txt
147158

148159
- name: Audit runtime dependencies
149-
# --skip-editable excludes our own package (installed via -e .) —
150-
# pip-audit would otherwise try to resolve it against PyPI. We drop
151-
# --strict because it would turn that skip into a fatal error;
152-
# pip-audit still exits non-zero on actual CVE findings, which is
153-
# what we want to fail the build on.
154-
run: pip-audit --skip-editable
160+
run: pip-audit --requirement /tmp/runtime-requirements.txt

0 commit comments

Comments
 (0)