Repository navigation
Clear 13 dependency advisories and start scanning for them - #173
Merged
Merged
Conversation
Thirteen packages in uv.lock had published advisories against the exact
versions we pinned: cryptography 48.0.0 (vulnerable OpenSSL in the
wheels, and a Bleichenbacher oracle in PKCS#7 decryption), starlette
1.1.0 (unvalidated request path poisoning request.url_for, form limits
silently ignored), urllib3 2.7.0 (HTTPS proxy TLS configuration ignored,
chunked-deflate infinite loop), plus aiohttp, anyio, pillow, pyjwt,
python-multipart, tornado, virtualenv, fsspec, multidict and soupsieve.
None of them was exotic. All thirteen had fixes already on PyPI, and a
plain `uv lock --upgrade` clears every one: scanned against OSV before
and after, 13 vulnerable packages of 184 became 0 of 189.
The reason they accumulated is the part worth fixing. zizmor audits the
workflow files; upstream-compat probes the four packages we sit directly
downstream of. Neither reads an advisory database, and nothing else
looked at the other ~180 packages at all. So this adds:
- .github/workflows/audit.yml, scanning the fully exported graph
(--all-extras --all-groups, 188 packages) with osv-scanner. It runs
on lockfile changes and weekly, because an advisory can be published
against a version we already pin and no push would ever trigger it.
- .github/dependabot.yml, grouping routine minor/patch bumps into one
weekly PR so they do not arrive as a hundred ignorable ones. Security
updates still come through ungrouped.
osv-scanner rather than pip-audit: pip-audit resolves the requirements
into a throwaway virtualenv, which fails on this graph (antimeridian has
no sdist for the resolver's Python). osv-scanner reads the file and
queries OSV directly, covering the same advisory sources with no install
step.
The new workflow pins its actions to full commit SHAs. .github/zizmor.yml
exempts the older workflows from `unpinned-uses` as a tracked follow-up,
but a job whose purpose is supply-chain safety should not be joining that
list, so this one pins properly and needs no exemption.
The upgrade moves xarray 2026.4.0 -> 2026.9.0 among 112 packages, so it
was checked on every lane rather than just the core one: core 1374
passed, hpc 25 passed, yac 3 passed, pre-commit 11/11.
osv-scanner-action is a Docker action: it bind-mounts GITHUB_WORKSPACE and nothing else, so the file written to the runner's /tmp did not exist inside the container. The scan died with `stat /tmp/requirements-audit.txt: no such file or directory` and exit 127, before reading a single package. Writing it into the workspace is all it needs. The filename is gitignored so running the same export locally cannot leave a stray file staged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thirteen packages in
uv.lockhad published advisories against the exact versions we pinned. All thirteen had fixes already on PyPI.What was vulnerable
cryptographystarletterequest.url_for; form limits ignoredurllib3aiohttppillowpyjwttornadoanyio,python-multipart,virtualenv,fsspec,multidict,soupsieveA plain
uv lock --upgradeclears every one. Scanned against OSV before and after:Why they accumulated — the part actually worth fixing
zizmoraudits workflow files.upstream-compatprobes the four packages we sit directly downstream of. Neither reads an advisory database, and nothing looked at the other ~180 packages at all.So this adds two jobs that answer different questions:
.github/workflows/audit.yml— does anything we pin have a published advisory? Scans the fully exported graph (--all-extras --all-groups, 188 packages), not the installed environment, because dev-only and extra-only packages run in CI and ship in the Docker image. Runs on lockfile changes and weekly, since an advisory can be published against a version we already pin and no push would ever trigger it..github/dependabot.yml— is anything simply out of date? Groups routine minor/patch bumps into one weekly PR so they don't arrive as a hundred ignorable ones. Security updates stay ungrouped.Two deliberate choices
osv-scanner, notpip-audit. pip-audit resolves requirements into a throwaway virtualenv, which fails on this graph (antimeridianhas no sdist for the resolver's Python — reproduced locally). osv-scanner reads the file and queries OSV directly: same advisory sources, no install step.Actions pinned to full commit SHAs.
.github/zizmor.ymlexempts the older workflows fromunpinned-usesas a tracked follow-up, but a job whose entire purpose is supply-chain safety should not join that list. This one needs no exemption —zizmorreports clean on it.Verification
The upgrade moves 112 packages including
xarray 2026.4.0 → 2026.9.0, so it was checked on every lane rather than just the core one:This is PR 1 of 2. PR 2 covers MCP protocol-level tests (in-process
ClientSession, wire-JSON assertions) — kept separate so a 112-package bump stays bisectable.