Skip to content

chore: add 7-day supply chain cooldown via exclude-newer#2382

Merged
hallerite merged 3 commits intomainfrom
chore/exclude-newer-7days
May 1, 2026
Merged

chore: add 7-day supply chain cooldown via exclude-newer#2382
hallerite merged 3 commits intomainfrom
chore/exclude-newer-7days

Conversation

@hallerite
Copy link
Copy Markdown
Member

@hallerite hallerite commented Apr 30, 2026

Summary

  • Adds exclude-newer = "7 days" to [tool.uv], preventing resolution of packages published less than 7 days ago
  • Exempts torch and flash_attn_3 (pytorch-cu128 / pytorch-cu128-test indexes lack upload dates) and self-vendored primeintellect index packages
  • Lock file is left unchanged; the policy will take effect on the next intentional uv lock

Why

The recent litellm supply chain attack had malicious packages on PyPI for ~5 hours before being yanked. A 7-day cooldown would have completely prevented any automated install from picking them up.

This re-opens #2147 against current main.

🤖 Generated with Claude Code


Note

Medium Risk
Changes dependency resolution behavior by preventing installs of newly published packages, which can unexpectedly block upgrades or fresh environment builds until the cooldown passes. Risk is mitigated by explicit exemptions for packages/indexes without upload timestamps and for trusted/pinned sources.

Overview
Adds a 7-day uv “exclude-newer” cooldown in pyproject.toml so dependency resolution avoids packages published within the last week.

Introduces a tool.uv.exclude-newer-package allowlist to opt out specific packages (e.g., torch, flash_attn_3, internal primeintellect env packages, and pinned git/URL deps), and records the corresponding policy metadata in uv.lock under [options].

Reviewed by Cursor Bugbot for commit d3eb968. Bugbot is set up for automated code reviews on this repo. Configure here.

hallerite and others added 3 commits April 30, 2026 19:35
Prevents uv from resolving packages published less than 7 days ago,
mitigating smash-and-grab supply chain attacks like the recent litellm
incident. Custom index and self-vendored packages are exempted since
they lack upload dates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds verifiers, vllm-router, dion, pydantic-config, deep-ep, deep-gemm,
and nixl-cu12 to the exemption list. These resolve from pinned git revs
or wheel URLs (so exclude-newer doesn't filter them anyway), but the
explicit entries document trust intent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…data

Exempts prime, prime-sandboxes, prime-tunnel, and prime-evals — all
PrimeIntellect-published on PyPI — so prime>=0.5.73 (published <7 days
ago) doesn't trip the cooldown.

Re-runs uv lock to record the policy in uv.lock's [options] section.
No package versions change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hallerite hallerite marked this pull request as ready for review April 30, 2026 20:02
@hallerite hallerite merged commit a50b407 into main May 1, 2026
26 of 30 checks passed
@hallerite hallerite deleted the chore/exclude-newer-7days branch May 1, 2026 00:55
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.

2 participants