chore: add security floors to dependency versions - #115
Closed
moocow4844 wants to merge 1 commit into
Closed
Conversation
Two of the declared dependencies currently admit versions with known vulnerabilities: - setuptools was constrained as >=61.0, which permits CVE-2024-6345 (command injection via package_index, fixed in 70.0.0), CVE-2025-47273 (path traversal in PackageIndex.download, fixed in 78.1.1) and GHSA-h35f-9h28-mq5c (MANIFEST.in exclusion bypass in sdist via Unicode normalization collision on macOS APFS/HFS+, fixed in 83.0.0). - pillow was unconstrained, so a fresh install could resolve below 12.3.0, the version that fixes its most recent advisory. requests and numpy were also unconstrained; their floors are set for the same reason though current resolutions already clear them. Each floor is the highest version any OSV advisory for that package names as fixed. librosa and matplotlib carry no advisories in OSV and stay unconstrained rather than pinned for its own sake. Floors, not equality pins: users keep receiving patch updates, and nothing here forces a resolution on a consumer's environment. All four support the declared requires-python >= 3.10. Verified: `uv pip compile` resolves cleanly to librosa 0.11.0, matplotlib 3.11.1, numpy 2.4.6, pillow 12.3.0, requests 2.34.2; `uv build --wheel` succeeds under the raised setuptools floor.
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.
What
Adds lower bounds to the dependency declarations in
pyproject.toml. Floors, not equality pins.Why
Two of these currently admit versions with known vulnerabilities:
setuptools>=61.0permits CVE-2024-6345 (command injection viapackage_index, fixed 70.0.0), CVE-2025-47273 (path traversal inPackageIndex.download, fixed 78.1.1), and GHSA-h35f-9h28-mq5c (MANIFEST.in exclusion bypass in sdist via Unicode NFC/NFD collision on macOS APFS/HFS+, fixed 83.0.0 — this one can leak files you thought you'd excluded).pillowunconstrained means a fresh install can resolve below 12.3.0, which fixes its most recent advisory.requestsandnumpyare unconstrained too. Their current resolutions already clear their advisories, but the floors make that a guarantee rather than a coincidence of resolution order.How the floors were chosen
Each is the highest version any OSV advisory for that package names as
fixed, queried from the OSV API rather than picked by hand.librosaandmatplotlibhave no advisories in OSV, so they stay unconstrained rather than pinned for its own sake.Worth noting for anyone reproducing this: a naive
max()over OSV results givespillow >= 27.0.0b2, because the query returns cross-ecosystem advisories — that number comes from an Electron GHSA. The floors here filter toaffected.package.ecosystem == "PyPI"and a matching package name.Why floors and not
==Equality pins would let a scanner resolve exact versions, but they stop users receiving patch updates and force a resolution onto every consuming environment. For a tool people
pip install -e .into their own venv, floors are the right trade: they close the vulnerable range without dictating the upper one.Compatibility
All four floors support the declared
requires-python = ">=3.10"— checked against each release's ownrequires_pythonmetadata, so this does not narrow the supported Python range.Test plan
uv pip compile pyproject.tomlresolves cleanly → librosa 0.11.0, matplotlib 3.11.1, numpy 2.4.6, pillow 12.3.0, requests 2.34.2uv build --wheelsucceeds under the raised setuptools floorrequires_pythonverified againstrequires-python = ">=3.10"Independent of #114 — either can merge first.
Summary by cubic
Add lower-bound security floors to dependencies to block vulnerable versions without pinning. Also raises the build requirement to a safe
setuptoolsversion.requests>=2.33.0,pillow>=12.3.0,numpy>=1.22; build:setuptools>=83.0.0.librosaandmatplotlibremain unconstrained (no OSV advisories).>=3.10.Written for commit 7f26c07. Summary will update on new commits.