Skip to content

fix(deps): bump virtualenv and setuptools for security advisories - #5

Merged
aravhawk merged 3 commits into
mainfrom
security/virtualenv-setuptools-20261030
Oct 30, 2026
Merged

aravhawk merged 3 commits into
mainfrom
security/virtualenv-setuptools-20261030

Conversation

@aravhawk

@aravhawk aravhawk commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes:

  • GHSA-cx6f-vjhg-g3cc (HIGH): the virtualenv Bash activator leaves the --prompt value unescaped in PS1 when promptvars is off, so prompt expansion later executes it. This is a regression in 21.14.9. Affected: virtualenv >=21.14.9,<21.14.13; first patched: 21.14.13.
  • GHSA-4f8h-vr72-p32c (MODERATE): temporary app-data in virtualenv can leave dangling seed package links. Affected: >=21.14.8,<21.14.10; first patched: 21.14.10.
  • GHSA-h35f-9h28-mq5c (MODERATE, PYSEC-2026-3447): setuptools sdist builds can bypass MANIFEST.in exclusions through an NFC/NFD Unicode normalization collision on macOS APFS/HFS+. Affected: <83.0.0; first patched: 83.0.0.
  • GHSA-xmj3-9gf7-h52w (LOW): setuptools can escape the target path on Windows through namespace_packages.txt during legacy wheel installation. Affected: >=38.2.2,<84.1.0; first patched: 84.1.0.
  • torch PYSEC-2025-194 (LOW): fixed in 2.13.0.

Changes

  • virtualenv (dev extra): floor >=21.14.9 → >=21.14.13. Locked 21.14.9 → 21.15.1.
  • setuptools ([build-system] requires): floor >=80.0 → >=84.1.0, so isolated builds (pip install -e ., uv build) get a patched setuptools.
  • torch (runtime): floor >=2.12.0 → >=2.13.0. Locked 2.12.0 → 2.13.0. This unblocks the runtime setuptools in uv.lock: 81.0.0 → 84.2.1.
    • Why 2.13.0: it's the smallest torch whose metadata allows a patched setuptools. torch 2.12.0 and 2.12.1 declare setuptools<82 on every cp312 wheel (macOS arm64, Linux x86_64/aarch64, Windows). 2.13.0 and later declare only setuptools>=77.0.3.
    • Required co-moves (Linux-only exact pins in torch 2.13.0's metadata): triton 3.7.0 → 3.7.1, cuda-toolkit 13.0.2 → 13.0.3.0. No other packages move.
    • MPS CI: 2.13.0 is below the CI-only torch<2.15 cap for the macOS MPS job (ci: auto-run PR CI for write-access authors; approval only for untrusted PRs #6), so that cap doesn't affect this PR.

Determinism impact

TensorPoW isn't in use yet, so a determinism-affecting torch change was approved. Even so, no determinism or golden-value changes: the PoW reference digest f1aa4b92aceca26dbd45402dd4b996f9ff76d6c31db66df675bba44649bbbed3 still matches under torch 2.13.0 on CPU and MPS (local Apple Silicon). No test vectors were edited. Linux x86/ARM CPU and Daytona H100 CUDA determinism weren't run locally; the approved-PR CI jobs cover them.

Test results (locked env, uv sync --locked --extra dev, Python 3.12.16, macOS arm64, torch 2.13.0 / setuptools 84.2.1 / virtualenv 21.15.1)

  • ruff check .: passed
  • ruff format --check .: 118 files already formatted
  • mypy src scripts: no issues in 63 source files
  • pytest tests: 343 passed
  • TENSORPOW_DETERMINISM_BACKEND=cpu pytest -m determinism tests/determinism: 2 passed
  • TENSORPOW_DETERMINISM_BACKEND=mps pytest -m determinism tests/determinism: 2 passed (the test asserts the backend resolved to mps)

Vulnerability scan (pip-audit on uv export --all-extras)

  • Gone compared with main: virtualenv 21.14.9 (GHSA-4f8h-vr72-p32c), setuptools 81.0.0 (PYSEC-2026-3447 / GHSA-h35f-9h28-mq5c, GHSA-xmj3-9gf7-h52w), torch 2.12.0 (PYSEC-2025-194). No new findings. The pip-audit database doesn't list GHSA-cx6f-vjhg-g3cc yet. The locked 21.15.1 is outside its affected range.
  • Remaining findings are out of scope for this PR:
    • HIGH: libp2p 0.6.0 PYSEC-2026-3681. No fixed version has been published.
    • MODERATE: zeroconf 0.147.4 (5 advisories, fixed in ≤0.149.16), multidict 6.7.1 (→6.9.1), opentelemetry-api 1.42.1 (→1.45.1)
  • No CRITICAL findings.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Raised the minimum required versions for build tooling, the machine learning framework, and development environment tooling. Existing upper version limits remain unchanged.
    • These updates do not introduce user-facing features or change application functionality. No other user-visible changes are included in this release.

- virtualenv (dev extra): floor 21.14.9 -> 21.14.13, locked 21.15.1.
  Fixes GHSA-cx6f-vjhg-g3cc (HIGH) and GHSA-4f8h-vr72-p32c (MODERATE).
- setuptools (build-system requires): floor 80.0 -> 84.1.0.
  Fixes GHSA-h35f-9h28-mq5c (MODERATE) and GHSA-xmj3-9gf7-h52w (LOW)
  in the package build environment.

The runtime setuptools in uv.lock stays at 81.0.0 because torch 2.12.0
requires setuptools<82; lifting that needs a torch bump, left for a
separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b7134f36-64f3-4bfe-965b-fe76c4bd4eba
Commits

Reviewing files that changed from the base of the PR and between 0b2e4e5 and 9f674c8.

Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock
Files selected for processing: 1
  • pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The minimum setuptools build requirement, torch dependency, and virtualenv development dependency increased. Their existing upper bounds remain unchanged, and the wheel requirement is unchanged.

Changes: Dependency minimums

Layer / File(s) Summary
Update dependency minimums
pyproject.toml
The setuptools minimum changed from >=80.0 to >=84.1.0. The torch minimum changed from >=2.12.0 to >=2.13.0. The virtualenv minimum changed from >=21.14.9 to >=21.14.13. Existing upper bounds and the wheel requirement remain unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related PRs

  • aravhawk/TensorPoW#3: Adds the virtualenv constraint whose minimum version this change updates.
  • aravhawk/TensorPoW#6: Adds a torch constraint for the macOS MPS CI install; this change updates the project torch minimum.

Suggested reviewers: cursoragent

Merge Risk: Minimal · up to 9f674

The dependency floor updates present no identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the dependency and security-advisory updates for virtualenv and setuptools. It omits the torch dependency update but still accurately describes a major part of the changes…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title clearly identifies the dependency and security-advisory updates for virtualenv and setuptools. It omits the torch dependency update but still accurately describes a major part of the changes.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the versions in a row,
Three minimums rise, while upper bounds stay so.
Setuptools, torch, virtualenv take their place,
The wheel requirement keeps its steady pace.
Then off I hop, with carrots in my case.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T20:53:30.198223Z 9f674c8 New commits
🔒 Security Review ✅ Completed 2026-10-30T13:23:52.693314Z 0b2e4e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

torch 2.12.x declares setuptools<82, holding the locked runtime
setuptools at 81.0.0 (GHSA-h35f-9h28-mq5c, GHSA-xmj3-9gf7-h52w).
torch 2.13.0 is the first release that only requires
setuptools>=77.0.3, so raise the torch floor to >=2.13.0 and lock
torch 2.13.0 with setuptools 84.2.1. torch 2.13.0 also fixes
PYSEC-2025-194.

torch 2.13.0 pins triton==3.7.1 and cuda-toolkit==13.0.3 on Linux,
so those lock entries move with it. The PoW reference digest is
unchanged on CPU and MPS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aravhawk aravhawk closed this Oct 30, 2026
@aravhawk aravhawk reopened this Oct 30, 2026
@aravhawk
aravhawk merged commit f051ac8 into main Oct 30, 2026
11 checks passed
@aravhawk
aravhawk deleted the security/virtualenv-setuptools-20261030 branch November 8, 2026 08:36
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