google / osv.dev

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

Querybatch returns 400 when there is a malformed PURL in the batch #1628

Open SouravJohar opened 1 year ago

SouravJohar commented 1 year ago

Hi,

In the case where one of the PURLs in a batch is malformed, the querybatch returns a 400 for the entire batch without specifying which PURL(s) were malformed. Would it be possible to either:

  1. Return vulnerability information for the Valid PURLs, and an error for the invalid PURL(s)? I.e a 200 for the overall request, but an "error" field for the malformed PURLs?
  2. Return a 400 overall, but point out the invalid PURLs in the error message?

This will help us in handling these cases easily.

github-actions[bot] commented 2 months ago

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