advisory-db icon indicating copy to clipboard operation
advisory-db copied to clipboard

Systemic issue with OSV JSON Schema compliance

Open andrewpollock opened this issue 1 year ago • 6 comments

Hi,

By the looks of it, there's a systemic issue with how OSV records are being generated (invalid schema_version field).

OSV.dev would like to start validating OSV records imported both against the JSON Schema and (separately) the Properties of a High Quality OSV Record so it would be good to address this issue in the short term.

We'll be in touch separately about any other problems we identify with your records.

/cc @hogo6002

andrewpollock avatar Nov 15 '24 07:11 andrewpollock

Ah, this appears to be a regression. I've opened a PR to fix this: https://github.com/rustsec/rustsec/pull/1287

Shnatsel avatar Nov 15 '24 11:11 Shnatsel

Could you also include OSV JSON Schema validation into your existing record linting workflow?

andrewpollock avatar Nov 22 '24 01:11 andrewpollock

When do you anticipate republishing the records using code that incorporates #1287 ? Ideally, the modified field should be updated to reflect the records have changed to assist with successful automatic updating by OSV.dev.

andrewpollock avatar Nov 26 '24 06:11 andrewpollock

I'll try to deploy the update in the next few days. That should apply the change to all new files being published.

Updating the modified field is trickier. We need to either bump the modification time on all the original advisories in the database (not in the OSV export branch) with some sort of no-op commit, like adding and removing a newline at the end of file, or hardcode in the exporter that modification times before today-ish get automatically bumped to today, and I don't love either option.

Any thoughts from the other maintainers?

Shnatsel avatar Nov 30 '24 02:11 Shnatsel

No-op commit(s) sound fine to me

tarcieri avatar Dec 01 '24 16:12 tarcieri

Hey @Shnatsel it doesn't look like this ever got resolved?

andrewpollock avatar Mar 17 '25 03:03 andrewpollock