Repository navigation
Replies: 3 comments
|
One case of an invalid reference was pointed out after i wrote up the above discussion. It might be handled by failing or warning on a missing top-level domain. CVE-2026-28309 (https://cveawg.mitre.org/api/cve/CVE-2026-28309) has the following reference: This appears to pass the vulnogram validation since it starts with https://, but obviously includes an additional string (https://) that makes it an invalid reference. |
|
Some thoughts post QWG. For anything purl related there's an npm package maintained by the purl spec folk that should be easy to integrate. For a base case we probably do want to trim down the number of schemes; I don't think anyone wants telephone numbers or emails as references. There is also a system of reference tags Eg. We set some baseline like |
|
Other references that have been pointed out. These should be flagged using the validation library.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Purpose:
This will be one of multiple discussions to query the QWG and others on how best to use the upcoming CVE Services Validation Library for performing additional or more accurate CVE Record Format JSON schema validation during record ingest. The Validation Library will allow the CVE Program to perform programmatic validations beyond what the current JSON schema validation can provide. A simple example might be where we want to validate that a provided CWE ID actually exists by referencing the current CWE List. This is not possible using JSON schema validation, but would be possible with the Validation Library.
Discussion:
The uriType definition is used referenced and used by multiple properties within the CVE Record Format schema. The most common use is for references of a CVE record and these will almost entirely be http, https, and possibly some ftp types. References can also be used in the product/collectionURL, product/repo, and problemTypes/descriptions/references properties of the schema (see the Schema Locations section for all locations). Last, the recently added product/packageURL property also references and uses the uriType. From my understanding, PURLs should always start with pkg:. PURL syntax is already being validated by CVE Services and this will be something included within the initial release of the validation library. However, we could also include a simple pattern match in the schema to make sure that this property value starts with pkg:.
The uri type in the JSON schema is meant to validate the value provided and ensure that it conforms to RFC 3986. Beyond the usual http:, https:, and ftp: references, RFC 3986 provides a number of examples such as ldap:, urn:, telnet:, mailto:, etc. It's not likely that we would want or need all of these types within CVE references and other properties in the CVE Record Format schema. In simple terms, any value that has one or more alphanumeric characters followed by a colon, then followed by one or more alphanumeric characters (e.g., x:y) will pass the JSON uri type check. One interesting thing to note here, Vulnogram appears to do some client validation of references and will not allow values that do not start with "http://", "https://", or "ftp://" (it may allow more but i didn't check everything). It will fail and not allow publishing even with a missing forward slash. If we agree that only http, https, and ftp should be used in references, we could include a simple pattern match in the schema to make sure that only those uri types are allowed.
Separate from the syntax, we may also want to consider checks to ensure that the reference being provided exists. For references, it might be useful to verify that the reference is live, especially when a record is initially submitted. There may be some technical limitations to this and some sites might not allow this kind of automated checking, but it's worth investigating to see if it is possible.
Examples from RFC 3986:
The following example URIs illustrate several URI schemes and variations in their common syntax components:
Schema Location(s):
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L7
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L19
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L138
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L278
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L367
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L923
https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json#L936
Question(s):
Examples:
All reactions