chore: add 7-day supply chain cooldown via exclude-newer#2382
Merged
chore: add 7-day supply chain cooldown via exclude-newer#2382
Conversation
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>
samsja
approved these changes
May 1, 2026
This was referenced May 1, 2026
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.
Summary
exclude-newer = "7 days"to[tool.uv], preventing resolution of packages published less than 7 days agotorchandflash_attn_3(pytorch-cu128 / pytorch-cu128-test indexes lack upload dates) and self-vendored primeintellect index packagesuv lockWhy
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 inpyproject.tomlso dependency resolution avoids packages published within the last week.Introduces a
tool.uv.exclude-newer-packageallowlist to opt out specific packages (e.g.,torch,flash_attn_3, internalprimeintellectenv packages, and pinned git/URL deps), and records the corresponding policy metadata inuv.lockunder[options].Reviewed by Cursor Bugbot for commit d3eb968. Bugbot is set up for automated code reviews on this repo. Configure here.