google / osv.dev

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

Tooling exists for OSV record creators to validate that they meet the minimum quality bar at record creation time #2187

Open andrewpollock opened 4 months ago

andrewpollock commented 4 months ago

Where possible, relying on JSON schema validation

andrewpollock commented 3 months ago

There are valid concerns about the UX of JSON Schema validation.

I am exploring options to address these concerns:

I am not feeling particularly confident they can be fundamentally addressed, though, at this point in time.

In the interests of not succumbing to the tyranny of the or one possibility is to do both JSON Schema validation and replicate the checks in the OSV record linter that will be inevitably necessary.

That also feels not very DRY, though, and introduces other maintenance and behaviour consistency headaches.

andrewpollock commented 3 months ago

Decision:

Take a belt-and-suspenders approach: add schema validation (and more human-targeted title) to the OSV Schema where practical, but replicate the checks in the linter.

oliverchang commented 3 months ago

Decision:

Take a belt-and-suspenders approach: add schema validation (and more human-targeted title) to the OSV Schema where practical, but replicate the checks in the linter.

+1 that makes sense.

Let's do the basic checks where we can in the JSON schema to enable a flexible option that can be re-used everywhere, and offer a more full featured standalone linter separately for users that can integrate that.

andrewpollock commented 2 months ago

https://github.com/ossf/osv-schema/pull/246 bolstered the schema validation to the extent I currently believe possible.

andrewpollock commented 1 month ago

ossf/osv-schema#246 bolstered the schema validation to the extent I currently believe possible.

I spoke too soon: https://github.com/ossf/osv-schema/pull/251 adds CVSS score validation.

andrewpollock commented 1 month ago

https://github.com/ossf/osv-schema/issues/90 is relevant to this work also.