security: add 7-day exclude-newer cooldown#31
Open
burnpiro wants to merge 1 commit into
Open
Conversation
Refuse to resolve any PyPI dependency uploaded in the last 7 days (`[tool.uv] exclude-newer = "7 days"`) when this project is locked or installed via uv. Mitigates blast radius of compromised dependencies (typosquatting, account takeovers, dependency confusion). Pins `required-version = ">=0.11.1"` so older uvs fail loudly instead of silently parsing "7 days" as an RFC 3339 date and proceeding *without* the cooldown — see uv#17908. pypiquant has no first-party PrimeIntellect packages in its closure (cffi, torch, numpy), so no `[tool.uv.exclude-newer-package]` exemptions are needed. The comment in pyproject.toml documents when to add one. Part 1 of 3 in a coordinated supply-chain hardening across PI repos. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dac3d24 to
8eb73b4
Compare
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
exclude-newer = "7 days"topython/pyproject.toml's[tool.uv]table. New PyPI uploads are filtered out of resolution until they've been on the index for ≥ 7 days, whenever this project is locked or installed via uv.pypiquant's dependency closure iscffi,torch,numpy(+ dev tooling) — no first-party PrimeIntellect packages, so no[tool.uv.exclude-newer-package]exemptions are needed.Why
Most malicious PyPI uploads (typosquatting, account takeovers, dependency confusion) are detected and yanked within hours-to-days. A short cooldown quarantines them at near-zero cost. Part 1 of 3 in a coordinated supply-chain hardening rolling out across PrimeIntellect repos.
Notes
python/pyproject.tomlis the project's Python build config (alongside the C++ build at the repo root); the cooldown applies whenever someone resolves/installs the Python package via uv.uv lock/uv pip installinvocation.🤖 Generated with Claude Code