google / osv.dev

Open source vulnerability DB and triage service.
https://osv.dev
Apache License 2.0
1.52k stars 188 forks source link

Improve the UX of failed vulnerability retrieval by the API #2235

Open andrewpollock opened 5 months ago

andrewpollock commented 5 months ago

Describe the bug Users try to retrieve a vulnerability (typically a CVE) by the API that the web interface reports as an alias of another vulnerability and that retrieval fails because the CVE record does not exist in OSV.dev

To Reproduce Steps to reproduce the behaviour:

  1. View a vulnerability record on OSV.dev with an (unlinked) alias to a CVE
  2. Attempt to retrieve that CVE via the API
  3. Get a 404/Bug not found response from the API

Expected behaviour The user receives some pointers to documentation to assist with interpreting the search failure.

My initial thoughts:

Screenshots

Contrived example:

$ GET -s https://api.osv.dev/v1/vulns/CVE-2025-0001
404 Not Found
{"code":5,"message":"Bug not found."}
github-actions[bot] commented 3 months ago

This issue has not had any activity for 60 days and will be automatically closed in two weeks