Skip to content

fix: constrain transitive setuptools to the patched release - #381

Merged
Abhash-Chakraborty merged 1 commit into
canaryfrom
fix/setuptools-constraint
Jul 29, 2026
Merged

fix: constrain transitive setuptools to the patched release#381
Abhash-Chakraborty merged 1 commit into
canaryfrom
fix/setuptools-constraint

Conversation

@Abhash-Chakraborty

@Abhash-Chakraborty Abhash-Chakraborty commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the last actionable backend advisory: setuptools <83.0.0 (medium) against backend/uv.lock.

#373 bumped the build-system pin to setuptools>=83.0.0, but [build-system].requires only governs building this package — it does not constrain the resolved environment. setuptools also arrives transitively via torch and pip-audit with no lower bound, so uv.lock stayed on 82.0.1 and the alert stayed open.

Adding constraint-dependencies under [tool.uv] pins the transitive resolution forward without making setuptools a direct runtime dependency:

[tool.uv]
constraint-dependencies = ["setuptools>=83.0.0"]

uv lock then moves it: Updated setuptools v82.0.1 -> v83.0.0.

Type of change

  • Bug fix

Release impact

  • Critical/security fix (keep sensitive details private)

How to test

cd backend
uv sync --group dev --locked
uv run ruff check . && uv run ruff format --check .
uv run pytest tests/
uv run pip-audit
grep -A1 '^name = "setuptools"$' uv.lock   # 83.0.0

All green locally: 527 tests passing (5 skipped), pip-audit reports no known vulnerabilities.

Summary by CodeRabbit

  • Chores
    • Updated dependency resolution to require a secure version of the package build tooling.
    • Prevented installation of a vulnerable transitive dependency version.

#373 raised the build-system pin to setuptools>=83.0.0, but that only
governs building this package -- it does not constrain the resolved
environment. setuptools also arrives transitively (torch, pip-audit) with
no lower bound, so uv.lock stayed on 82.0.1 and the <83.0.0 advisory
remained open against the lockfile.

Add a uv constraint-dependencies entry so the transitive resolution is
pinned forward too, without introducing setuptools as a direct runtime
dependency.

Verified: uv sync --group dev --locked, ruff check, ruff format --check,
pytest (527 passing, 5 skipped), pip-audit clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhbwK5NKaXutwKjqYzGjDk
Copilot AI review requested due to automatic review settings July 29, 2026 11:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the needs linked issue Pull request needs to link a valid issue before review. label Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Context Summary

Suggested issue links

Use Fixes #123 or Closes #123 in the PR body when one of the suggestions is the intended issue.
Manual rerun: Actions > PR Context Triage > Run workflow > set pr_number and force_review=true.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 644836ad-c9c0-43fd-8b5a-5132876f378d

📥 Commits

Reviewing files that changed from the base of the PR and between 288a780 and 12a0a85.

⛔ Files ignored due to path filters (1)
  • backend/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • backend/pyproject.toml

📝 Walkthrough

Walkthrough

The backend project configuration adds a uv dependency constraint requiring setuptools>=83.0.0 for environment resolution.

Changes

Dependency Resolution

Layer / File(s) Summary
Setuptools resolution constraint
backend/pyproject.toml
Adds a uv constraint requiring setuptools>=83.0.0 and documents the transitive resolution issue it prevents.

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

Poem

I’m a rabbit with a package to mend,
Setuptools stays fresh from start to end.
No older burrow, no vulnerable flight,
Just a safer constraint hopping right. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: constraining transitive setuptools to a patched version.
Description check ✅ Passed The description covers Summary, Type of change, Release impact, and How to test, with only non-critical template sections missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

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

@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 12a0a85

This is a straightforward security fix that constrains the transitive setuptools dependency to >=83.0.0 to address a known vulnerability (GHSA). The change only affects dependency resolution, not runtime behavior, and the author is the designated code owner of this file.

You can customize Macroscope's approvability policy. Learn more.

@Abhash-Chakraborty
Abhash-Chakraborty merged commit 7bbe9ba into canary Jul 29, 2026
21 checks passed
@Abhash-Chakraborty
Abhash-Chakraborty deleted the fix/setuptools-constraint branch July 29, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs linked issue Pull request needs to link a valid issue before review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants