osv.dev icon indicating copy to clipboard operation
osv.dev copied to clipboard

Support for versions in all advisories

Open rtfpessoa opened this issue 2 years ago • 3 comments

While querying the data in OSV I noticed that Packagist, Go, NPM and Crates.io have mostly affected ranges and no affected versions.

Is there a plan to support affected versions for these ecosystems?

rtfpessoa avatar Aug 02 '22 10:08 rtfpessoa

Packagist support is tracked in https://github.com/google/osv.dev/issues/230.

Go, npm, and crates.io use SEMVER, where enumerating versions is not a requirement. To evaluate them, one can use the defined events instead according to the evaluation algorithm.

In particular for Go, because every commit can be mapped to a pseudoversion, it's not really feasible to do so.

May we understand your use case for these a bit more?

oliverchang avatar Aug 02 '22 21:08 oliverchang

My current use case was trying to insert all versions in a database and do a live join between active versions and the advisory versions. With the ranges it becomes impossible to do that.

rtfpessoa avatar Aug 05 '22 09:08 rtfpessoa

I have a database I maintain which lists per package and it's CVE all the affected versions, and having the versions in GO and npm will make the work much easier. Maybe you can bring the affected versions data from NVD, the CPE section has a list of affected versions in the specified range. For example CVE-2023-0742 in NVD has a list of affected versions: image

Of course it won't cover all the pseudoversions of GO but it's better than nothing.

donchkat avatar Feb 21 '23 12:02 donchkat