enforce a 7-day uv package cooldown#39
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request configures uv to delay the use of newly uploaded artifacts by 7 days, enhancing security against malicious fresh releases. The feedback highlights the need to specify a minimum uv version (0.5.0) to support relative duration strings and points out that the necessary GitHub Actions workflow updates to enforce --locked syncs are missing from the current changes.
why
newly uploaded package artifacts are a high-risk supply-chain window. this change hardens
uvresolution and ci install behavior so fresh registry artifacts are avoided, and the repo requires a new enoughuvto understand the cooldown syntax.for dependabot, the goal here is routine maintenance triage, not a fake security/non-security split that
dependabot.ymlcannot express on its own.what changed
added repo-level
tool.uvpolicy to exclude artifacts uploaded within the last 7 days and requireuv >= 0.9.17, which is the release that added relative durations forexclude-newer.updated github actions installs to
uv sync --lockedso ci uses the committed lockfile instead of silently re-resolving.added
.github/dependabot.ymlwith weekly checks, a matching 7-day cooldown foruvupdates, andscope/ci-cdlabels for routine dependabot prs.updated the committed
uv.lockmetadata to record the relative exclusion window.risk
low risk. this changes dependency resolution and update automation, not runtime application logic.
review focus is whether the 7-day cooldown is the right operational tradeoff and whether any workflow still relies on unlocked dependency resolution.
verification
ran
uv lock.ran
uv lock --check.ran
uv sync --locked.ran
uv run pytest -qwith1924 passed in 1.12sbefore the follow-up,1924 passed in 0.84safter the dependabot changes, and1924 passed in 0.90safter bumping theuvminimum version.Greptile Summary
This PR hardens the repository's supply-chain posture by enforcing a 7-day artifact cooldown via
[tool.uv]inpyproject.toml, switching both CI workflows fromuv synctouv sync --locked, and adding adependabot.ymlwith matching cooldown and weekly schedules.pyproject.toml: Addsexclude-newer = "7 days"to filter packages uploaded in the last 7 days during resolution, guarded byrequired-version = ">=0.9.17"which is the version that introduced relative exclusion windows.tests.yml,typing.yml): Switch touv sync --lockedso CI installs exactly what is in the committed lockfile instead of silently re-resolving.dependabot.yml: Introduces weekly dependency checks with a 7-day cooldown for theuvecosystem;github-actionsintentionally omits a cooldown per the PR's stated scope.Confidence Score: 5/5
Safe to merge — changes are confined to tooling configuration and do not touch runtime application logic.
The required-version = ">=0.9.17" correctly gates the relative exclude-newer format, the lockfile metadata is consistent with the pyproject.toml policy, and uv sync --locked in CI is the right call now that a committed lockfile is the source of truth. No application code is affected.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Developer / Dependabot] --> B{Run uv lock?} B -->|Yes| C[uv checks required-version >= 0.9.17] C --> D{Version OK?} D -->|No| E[Hard fail: version mismatch error] D -->|Yes| F[Apply exclude-newer = 7 days filter] F --> G{Package uploaded < 7 days ago?} G -->|Yes| H[Excluded from resolution] G -->|No| I[Included in lockfile] I --> J[uv.lock updated with exclude-newer-span = P7D] B -->|No, CI uv sync locked| K[Read committed uv.lock] K --> L[Install exact pinned versions] L --> M[Tests / Type checks run] N[Dependabot weekly check] --> O{Package age >= 7 days cooldown?} O -->|No| P[Skip PR] O -->|Yes| Q[Open update PR with scope/ci-cd label] Q --> BReviews (4): Last reviewed commit: "require uv 0.9.17 for relative cooldowns" | Re-trigger Greptile