Rust Crate versions missing metadata
- Dominant language
- Go
- Stars
- 2.9k
- Forks
- 369
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 149
Description
**Describe the bug**
Vulnerability reports for Rust crates are missing the metadata value (https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field) in the version field under 'affected/ranges' (and possibly other places).
**To Reproduce**
Look at the report for RUSTSEC-2024-0013 (https://api.osv.dev/v1/vulns/RUSTSEC-2024-0013). It shows that it was fixed in version 0.16.2 however the correct way to identity this version is with the additional metadata of '+1.7.2'. Without that additional metadata, there is no way to resolve the correct crate.io repo of https://crates.io/crates/libgit2-sys/0.16.2+1.7.2 because just https://crates.io/crates/libgit2-sys/0.16.2 doesn't exist.
**Expected behaviour**
The metadata must be included in order to resolve the package from other sources as well as perform proper vulnerability management. Because in this case the follow PURLs don't match
pkg:cargo/libgit2-sys@0.16.2 != pkg:cargo/libgit2-sys@0.16.2%2B1.7.2
**Additional context**
Your sister service (deps.dev) lists the versions properly (https://deps.dev/cargo/libgit2-sys/0.16.2%2B1.7.2) so there should be some consistency.
Contributor guide
Assessment
This issue has not been assessed yet.