-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
The linter
cron job runs osv-linter
on all records and writes the findings to a datastore. To remove old findings, the job deletes any existing entry from the datastore that does not have a corresponding finding in the current linter run.
But importer
also does JSON validation and writes its findings to the same datastore. Since this JSON schema validation check isn't part of the osv-linter
itself, the linter
cron job incorrectly assumes these findings are obsolete and deletes them.
Two ways to fix this:
- Add JSON schema validation to the osv-linter. This is the ideal solution, as it would aggregate all checks into one place. One issue here is that the OSV schema is defined outside of this Go project, so we can't simply use go:embed. Also osv-linter doesn't have a formal release process, so we can't add an automated pre-build step to copy the schema. The most straightforward solution for now is probably just to copy the schema into this project?
OR
- Modify the
linter
cron job's logic. We could either add the schema validation check directly to the job or, more simply, prevent the job from deleting findings related to JSON validation.
Metadata
Metadata
Assignees
Labels
No labels