chore(cargo): enforce 14-day min-publish-age for crates.io deps - #258
Merged
Merged
Conversation
Cargo excludes crates.io versions published less than 14 days ago unless they are already locked. This matches the organization’s Dependabot cooldown. The [unstable] table is temporary until Rust 1.100.
🔒 AI Security Review (claude-opus-5)✅ No security issues found. |
|
Commit: 960e3f8
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
prajwolrg
approved these changes
Sep 2, 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.
Description
Adds a 14-day cooldown for crates.io dependencies through Cargo's new
min-publish-agesetting (RFC 3923), in a root.cargo/config.toml:Dependabot already waits 14 days before proposing a bump. This makes plain
cargo add,cargo update, and hand-edited version requirements follow the same rule, so a freshly published (and possibly compromised) release can't slip in through a developer's PR. Versions already inCargo.lockare left alone. For an urgent fix there is a one-off escape hatch:This repo pins a nightly that already has the feature, so the cooldown is active right away for anyone building with the repo toolchain.
Tracking: STR-3852.
Type of Change
Notes to Reviewers
One gap worth knowing about: versions already in
Cargo.lockare exempt by design, so a lockfile produced with the override still passescargo build --lockedin CI. If we want CI to catch that,cargo update --dry-runprints aDowngradingline for every locked version that violates the policy and can be turned into a check. That is out of scope for this PR.The
[unstable]table is temporary. Stable cargo ignores it, and nightly cargo needs it until the feature reaches stable in Rust 1.100 (2026-11-12). After that it can be dropped.Verified locally with
cargo update --dry-run --workspace:AI disclosure: the change and this PR body were produced with Claude Code and Codex, then reviewed and tested by me.
Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Related Issues
STR-3852