build(deps): track Cargo dependencies with Dependabot - #178
Draft
rominf wants to merge 2 commits into
Draft
Conversation
The Dependabot config covered only the github-actions ecosystem, so no Rust dependency in the workspace was ever checked for newer releases or published advisories despite the repo pinning Actions to SHAs for supply-chain safety. Group minor and patch bumps into one weekly pull request and leave major bumps as individual pull requests so each breaking change is reviewed on its own. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
A crate bump PR runs the new version's build.rs and proc macros on the CI runner as soon as it opens, so a malicious release is executed before anyone reads the lockfile diff. Waiting a week lets the usual yank happen off our runners. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
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
cargoecosystem entry to.github/dependabot.yml, with a 7-day cooldown.Until now the Dependabot config covered only the
github-actionsecosystem. Every Rust dependency in the workspace was therefore untracked: no PR ever opened for a new crate release, and nothing surfaced a published advisory for a crate we depend on. That is an odd gap in a repo that deliberately SHA-pins every third-party Action for supply-chain safety.directory: /is the workspace root — Dependabot resolves the full member graph from the root manifest andCargo.lock, so a single entry covers all workspace crates.Grouping. Minor and patch bumps are collected into one weekly grouped PR (
cargo-minor-patch, scoped withapplies-to: version-updates). For a workspace this wide, one PR per crate per week would be pure noise and would bury genuine review signal; minor/patch bumps are near-always drop-in and are best reviewed as a single lockfile delta with one CI run. Major bumps are deliberately left out of the group so each breaking change arrives as its own PR and can be reviewed, adapted to, and merged independently.Cooldown.
default-days: 7. A crate bump is not inert data waiting for review —cargo buildruns the new version'sbuild.rsand expands its proc macros on the CI runner, so the bump PR executes third-party code the moment it opens, before a human reads the lockfile diff. A week is long enough for the common case of a malicious or backdoored release being yanked from crates.io to play out off our runners. Cooldown delays only version updates; security updates are never held back.PR volume.
open-pull-requests-limit: 10(default is 5). Expect a burst on the first run: one grouped minor/patch PR plus up to nine individual major-bump PRs, since the workspace has never been swept. Steady state after that first catch-up should be roughly one grouped PR per week plus the occasional major. The limit is a cap on concurrently open version-update PRs, so it keeps the queue readable while leaving enough headroom that a backlog of majors cannot starve the grouped PR.Relationship to #154
#154 adds the same
cooldown: default-days: 7to the existinggithub-actionsentry. The two PRs are complementary, not competing: #154 edits inside thegithub-actionsblock, this one appends a newcargoblock. They touch the same file but disjoint regions and should merge cleanly in either order. The rationale differs by ecosystem — #154's is about a bumped SHA running the new action's code on CI, this one's is aboutbuild.rsand proc macros running at compile time — so the comments are written separately rather than shared.Test plan
prek run --all-files— all hooks pass (check yamlincluded).package-ecosystem: cargo,open-pull-requests-limit,cooldown.default-days, and group-levelapplies-to/patterns/update-typesare all current.Risk: low — configuration only, and reversible by dropping the entry.