schema: Support References without type#66
Open
Jarrah-TLR wants to merge 2 commits intogcmurphy:mainfrom
Open
Conversation
0e16569 to
762f17d
Compare
There are some examples in the OSV database which have untyped references and Severities. Currently these fail to parse. For example: https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Debian%2FCVE-2018-11212.json?generation=1758701673567991&alt=media
Ubuntu keep adding items to their ecosystem strings, resulting in the regex regularly failing and dropping all data. Instead, relax the regex to allow it to parse only the start of the line. Having most of the data is better than none. An example of this is "USN-7550-2.json". Additionally, Ubuntu OSVs now include an ubuntu specific severity. This otherwise matches the existing schema but is expected to contain a simple string rather than the CVSS score. An example of this is "UBUNTU-CVE-2025-9825.json".
3b7e950 to
48ba336
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are some examples in the OSV database which have untyped references. Currently these fail to parse. For example: https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Debian%2FCVE-2018-11212.json?generation=1758701673567991&alt=media
I went for setting the ReferenceType to Undefined by default to retain backwards compatibility and avoid having to unwrap it every time. To me, Undefined doesn't feel particularly different to None.