Skip to content

ci(security): audit only declared runtime deps, not the runner env - #9

Merged
kallioli merged 1 commit into
mainfrom
ci/audit-runtime-deps-only
Apr 27, 2026
Merged

ci(security): audit only declared runtime deps, not the runner env#9
kallioli merged 1 commit into
mainfrom
ci/audit-runtime-deps-only

Conversation

@kallioli

Copy link
Copy Markdown
Contributor

Context

The security job runs pip-audit --skip-editable against the
job's Python environment. That picks up every package installed in
the runner — pip, setuptools, wheel, and the rest of the tooling —
alongside orca's actual runtime deps. The build then fails on
advisories that have nothing to do with orca's supply chain.

Latest example, blocking #7 and #8 today:

Found 1 known vulnerability in 1 package
Name Version ID            Fix Versions
---- ------- ------------- ------------
pip  26.0.1  CVE-2026-3219

A vuln in pip itself is a runner-environment problem, not an
orca problem. Pinning around it would be a treadmill: every new
pip CVE would block unrelated PRs.

Changes

.github/workflows/ci.yml, security job:

  • Drop pip install -e . (no need to install the project — we're
    not auditing the resolved env any more).
  • Install poetry + poetry-plugin-export>=1.7 + pip-audit.
    The plugin is bundled in poetry < 2.0 but split out in poetry 2.x;
    pinning it explicitly keeps the step working on either side.
  • Run poetry export --only main --without-hashes to a temp file
    containing only orca's declared runtime deps.
  • Run pip-audit --requirement /tmp/runtime-requirements.txt.

The audit surface now matches what users actually install when they
pip install orca-openstackclient. Tooling vulns in the runner
can no longer block PRs.

Tests

YAML validated locally; the substantive test is the next CI run on
this PR — if pip-audit no longer fails on CVE-2026-3219 the change
is doing its job.

Risks

  • Reduced audit surface: we no longer scan transitive vulns in
    build tooling. Acceptable: those tools don't ship with orca, and
    the CI runner image is GitHub-managed (vulns there would be
    GitHub's responsibility, not ours).
  • Adds a poetry install step: minor (~5 s on a cold cache).
    actions/setup-python@v5 already caches pip wheels.

Recommended merge order

This PR first — it unblocks the security job for both #7 and #8.

The security job ran ``pip-audit --skip-editable``, which audits every
package installed in the job's Python — pip, setuptools, wheel, and
the rest of the tooling — alongside orca's actual runtime deps. The
build then fails on advisories in that tooling: most recently
CVE-2026-3219 in ``pip 26.0.1``, which has nothing to do with orca's
supply chain.

Switch to exporting orca's declared runtime deps via
``poetry export --only main`` and audit that requirements file
directly. The audit surface now matches what users actually install
when they ``pip install orca-openstackclient``; tooling vulns in the
runner can no longer block PRs.

``poetry-plugin-export`` is pinned (``>=1.7``) because it's bundled
in poetry < 2.0 but split out in poetry 2.x — the explicit install
makes the step work on either side of that boundary.
@kallioli
kallioli merged commit 762117f into main Apr 27, 2026
10 checks passed
@kallioli
kallioli deleted the ci/audit-runtime-deps-only branch April 27, 2026 10:10
Vinetos pushed a commit to Vinetos/orca-cli that referenced this pull request May 30, 2026
Addresses the remaining high/medium findings from the 2026-04-20 audit:
- stackopshq#4 insecure TLS warning + cacert path validation
- stackopshq#7 atomic token cache writes
- stackopshq#9 publish action pinned to immutable SHA
- #13 CI gaps: Poetry cache, poetry build, gitleaks, pip-audit,
  deploy-docs gated on CI success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant