dependabot / dependabot/dependabot-core

Switch bumping `cargo` security versions to using `cargo`'s `--precise` flag

Open
#6,427 0 comments 1 reaction 2 assignees Claimed by @jeffwidman View on GitHub
Keep L: rust:cargo T: tech-debt ⚙️
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
149

Description

We want to move toward leveraging native package manager functionality where possible rather than re-implementing it in Ruby. Beyond being more DRY, it generally lets us sidestep a lot of maintenance / edge-case bugs.

It looks like `cargo update` supports [a `--precise` flag that bumps a dependency to a specific version number](https://doc.rust-lang.org/cargo/commands/cargo-update.html).

We should explore switching to that for bumping security vulnerabilities.

Today we do the following for rust security updates:
1. query https://crates.io/ for available versions
2. filter for non-vulnerable versions
3. find the lowest remaining version
4. use Ruby `gsub()` to bump that in the manifest/lockfile

We should flip step 4 to using `cargo` directly via this `--precise` flag.

Related:
* https://github.com/dependabot/dependabot-core/issues/6426

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.