Skip to content

Commit 0f9befe

Browse files
authored
Merge pull request #350 from sei-vsarvepalli/feature-144-SSVC
Related to #348 SSVC1.0.1 additions.
2 parents 30f59c7 + 23f88a7 commit 0f9befe

21 files changed

+2714
-70
lines changed

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
# Current Version of CVE Record Format
22

3-
Major changes to cve-schema repo architecture!! if you have integrations that rely on the cve-schema repo structure, please review the changes here. The latest version of the CVE JSON record format is 5.1.0. A single schema file with bundled dependencies is available [here](https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json).
3+
Update to cve-schema to provide better support for CPE!! if you have integrations that rely on the cve-schema repo structure, please review the changes here. The latest version of the CVE JSON Record Format is 5.1.1. A single schema file with bundled dependencies is available [here](https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json).
44

5-
Note: The ADP functionality in the current schema is not yet deployed in CVE Services. The ADP functionality is currently under development and is for future use.
5+
Note: The CVE Record Format now supports Authorized Data Publisher (ADP) containers there is one active ADP currently. The CVE Program uses a separate ADP container to provide additional CVE information (e.g., references) for some records. Access this README.md page [here](
6+
https://github.com/CVEProject/cvelistV5/blob/main/README.md)
7+
for more information about the CVE Program Container.
68

79
Note: Please refer to the CVE Services page [here](https://www.cve.org/AllResources/CveServices) for known issues with the schema.
810

911
# CVE Record Format Overview
1012

11-
cve-schema specifies the CVE record format. This is the blueprint for a rich set of JSON data that can be submitted by CVE Numbering Authorities (CNAs) and Authorized Data Publishers (ADPs) to describe a CVE record. Some examples of CVE record data include CVE ID number, affected product(s), affected version(s), and public references. While those specific items are required when assigning a CVE, there are many other optional data in the schema that can be used to enrich CVE records for community benefit.
13+
cve-schema specifies the CVE Record Format. This is the blueprint for a rich set of JSON data that can be submitted by CVE Numbering Authorities (CNAs) and Authorized Data Publishers (ADPs) to describe a CVE Record. Some examples of CVE Record data include CVE ID number, affected product(s), affected version(s), and public references. While those specific items are required when assigning a CVE, there are many other optional data in the schema that can be used to enrich CVE Records for community benefit.
1214

1315
### Learn
1416

1517
Learn more about the CVE program at: https://www.cve.org/
1618

17-
This CVE record format is defined using JSON Schema. Learn more about JSON Schema at: https://json-schema.org/ .
19+
This CVE Record Format is defined using JSON Schema. Learn more about JSON Schema at: https://json-schema.org/ .
1820

1921
### Latest
2022

21-
The latest version of the record format is 5.1.0. It is specified in the JSON schema at https://github.com/CVEProject/cve-schema/blob/master/schema/CVE_Record_Format.json
23+
The latest version of the CVE Record Format is 5.1.1. It is specified in the JSON schema at https://github.com/CVEProject/cve-schema/blob/master/schema/CVE_Record_Format.json
2224

2325
A single schema file with bundled dependencies is at https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json
2426

2527
### Documentation and Guidance
2628

2729
Documentation about this format is available at https://cveproject.github.io/cve-schema/schema/docs/
2830

29-
A mindmap version of the CVE record structure is at https://cveproject.github.io/cve-schema/schema/docs/mindmap.html
31+
A mindmap version of the CVE Record structure is at https://cveproject.github.io/cve-schema/schema/docs/mindmap.html
3032

31-
More details about Product and Version Encodings in CVE JSON 5.1.0 record is at https://github.com/CVEProject/cve-schema/blob/master/schema/docs/versions.md
33+
More details about Product and Version Encodings in the CVE Record Format are at https://github.com/CVEProject/cve-schema/blob/master/schema/docs/versions.md
3234

3335
### Examples
3436

35-
A basic example of a full record in 5.1.0 format with minimally required fields is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-basic-example.json
37+
A basic example of a full record in the 5.1.1 format with minimally required fields is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-basic-example.json
3638

37-
An advanced example of a full record in 5.1.0 format is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-advanced-example.json
39+
An advanced example of a full record in the 5.1.1 format is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-advanced-example.json
3840

3941
A basic example of a cnaContainer, to be used with CVE Services, is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/cnaContainer-basic-example.json
4042

41-
An advanced example of a cnaContainer, to be used with CVE Services, is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/cnaContainer-advanced-example.json
43+
An advanced example of a cnaContainer, to be used with CVE Services, is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/cnaContainer-advanced-example.json
44+
45+
### Running Tests
46+
47+
Before submitting a Pull Request (PR) with your proposed schema changes, it is recommended to run the tools/cve-schema-test.sh script (written in Bash) to ensure there are no errors. This helps prevent your PR from being rejected due to formatting issues when GitHub's workflow tools are executed.
48+
49+
Please note that any files created by this script will be overwritten when GitHub's workflow runs on the PR. This step is mandatory before the CVE Schema Working Group can review your suggestions.
50+

schema/CVE_Record_Format.json

+114-6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@
5353
"type": "string",
5454
"pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$"
5555
},
56+
"cpe22and23": {
57+
"type": "string",
58+
"description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format",
59+
"pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})",
60+
"minLength": 1,
61+
"maxLength": 2048
62+
},
63+
"cpe23": {
64+
"type": "string",
65+
"description":"Common Platform Enumeration (CPE) Name in 2.3 format",
66+
"pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})",
67+
"minLength": 1,
68+
"maxLength": 2048
69+
},
5670
"orgId": {
5771
"description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.",
5872
"$ref": "#/definitions/uuidType"
@@ -196,15 +210,12 @@
196210
},
197211
"cpes": {
198212
"type": "array",
199-
"description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.",
213+
"description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.",
200214
"uniqueItems": true,
201215
"items": {
202216
"title": "CPE Name",
203-
"type": "string",
204217
"description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format",
205-
"pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})",
206-
"minLength": 1,
207-
"maxLength": 2048
218+
"$ref": "#/definitions/cpe22and23"
208219
}
209220
},
210221
"modules": {
@@ -364,7 +375,7 @@
364375
"description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.",
365376
"type": "string",
366377
"pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$",
367-
"default": "5.1.0"
378+
"default": "5.1.1"
368379
},
369380
"cveMetadataPublished": {
370381
"description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.",
@@ -487,6 +498,87 @@
487498
"required": ["orgId"],
488499
"additionalProperties": false
489500
},
501+
"cpeApplicabilityElement": {
502+
"description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.",
503+
"properties": {
504+
"operator": {
505+
"type": "string",
506+
"enum": [
507+
"AND",
508+
"OR"
509+
]
510+
},
511+
"negate": {
512+
"type": "boolean"
513+
},
514+
"nodes": {
515+
"type": "array",
516+
"items": {
517+
"$ref": "#/definitions/cpe_node"
518+
}
519+
}
520+
},
521+
"required": [
522+
"nodes"
523+
]
524+
},
525+
"cpe_node": {
526+
"description": "Defines a CPE configuration node in an applicability statement.",
527+
"properties": {
528+
"operator": {
529+
"type": "string",
530+
"enum": [
531+
"AND",
532+
"OR"
533+
]
534+
},
535+
"negate": {
536+
"type": "boolean"
537+
},
538+
"cpeMatch": {
539+
"type": "array",
540+
"items": {
541+
"$ref": "#/definitions/cpe_match"
542+
}
543+
}
544+
},
545+
"required": [
546+
"operator",
547+
"cpeMatch"
548+
]
549+
},
550+
"cpe_match": {
551+
"description": "CPE match string or range",
552+
"type": "object",
553+
"properties": {
554+
"vulnerable": {
555+
"type": "boolean"
556+
},
557+
"criteria": {
558+
"$ref": "#/definitions/cpe23"
559+
},
560+
"matchCriteriaId": {
561+
"$ref": "#/definitions/uuidType"
562+
},
563+
"versionStartExcluding": {
564+
"$ref": "#/definitions/version"
565+
},
566+
"versionStartIncluding": {
567+
"$ref": "#/definitions/version"
568+
},
569+
"versionEndExcluding": {
570+
"$ref": "#/definitions/version"
571+
},
572+
"versionEndIncluding": {
573+
"$ref": "#/definitions/version"
574+
}
575+
},
576+
"required": [
577+
"vulnerable",
578+
"criteria"
579+
],
580+
"additionalProperties": false
581+
},
490582
"cnaPublishedContainer": {
491583
"description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.",
492584
"type": "object",
@@ -514,6 +606,12 @@
514606
"affected": {
515607
"$ref": "#/definitions/affected"
516608
},
609+
"cpeApplicability": {
610+
"type": "array",
611+
"items": {
612+
"$ref": "#/definitions/cpeApplicabilityElement"
613+
}
614+
},
517615
"problemTypes": {
518616
"$ref": "#/definitions/problemTypes"
519617
},
@@ -620,6 +718,12 @@
620718
"affected": {
621719
"$ref": "#/definitions/affected"
622720
},
721+
"cpeApplicability": {
722+
"type": "array",
723+
"items": {
724+
"$ref": "#/definitions/cpeApplicabilityElement"
725+
}
726+
},
623727
"problemTypes": {
624728
"$ref": "#/definitions/problemTypes"
625729
},
@@ -859,6 +963,9 @@
859963
{
860964
"required": ["cvssV2_0"]
861965
},
966+
{
967+
"required": ["ssvcV1_0_1"]
968+
},
862969
{
863970
"required": ["other"]
864971
}
@@ -898,6 +1005,7 @@
8981005
"cvssV3_1": {"$ref": "file:imports/cvss/cvss-v3.1.json"},
8991006
"cvssV3_0": {"$ref": "file:imports/cvss/cvss-v3.0.json"},
9001007
"cvssV2_0": {"$ref": "file:imports/cvss/cvss-v2.0.json"},
1008+
"ssvcV1_0_1": {"$ref": "file:imports/ssvc/ssvc-v1.0.1.json"},
9011009
"other": {
9021010
"type": "object",
9031011
"description": "A non-standard impact description, may be prose or JSON block.",

schema/archive/v5.0/docs/cnaContainer-advanced-example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
],
242242
"references": [
243243
{
244-
"url": "https://example.org/ESA-22-11-CVE-1337-1234",
244+
"url": "https://example.org/ESA-22-11-CVE-1900-1234",
245245
"name": "ESA-22-11",
246246
"tags": [
247247
"vendor-advisory"

schema/archive/v5.0/docs/cnaContainer-basic-example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
],
3434
"references": [
3535
{
36-
"url": "https://example.org/ESA-22-11-CVE-1337-1234"
36+
"url": "https://example.org/ESA-22-11-CVE-1900-1234"
3737
}
3838
]
3939
}

schema/archive/v5.0/docs/full-record-advanced-example.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dataType": "CVE_RECORD",
33
"dataVersion": "5.0",
44
"cveMetadata": {
5-
"cveId": "CVE-1337-1234",
5+
"cveId": "CVE-1900-1234",
66
"assignerOrgId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6",
77
"assignerShortName": "example",
88
"requesterUserId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6",
@@ -257,7 +257,7 @@
257257
],
258258
"references": [
259259
{
260-
"url": "https://example.org/ESA-22-11-CVE-1337-1234",
260+
"url": "https://example.org/ESA-22-11-CVE-1900-1234",
261261
"name": "ESA-22-11",
262262
"tags": [
263263
"vendor-advisory"
@@ -307,4 +307,4 @@
307307
]
308308
}
309309
}
310-
}
310+
}

schema/archive/v5.0/docs/full-record-basic-example.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dataType": "CVE_RECORD",
33
"dataVersion": "5.0",
44
"cveMetadata": {
5-
"cveId": "CVE-1337-1234",
5+
"cveId": "CVE-1900-1234",
66
"assignerOrgId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6",
77
"state": "PUBLISHED"
88
},
@@ -44,9 +44,9 @@
4444
],
4545
"references": [
4646
{
47-
"url": "https://example.org/ESA-22-11-CVE-1337-1234"
47+
"url": "https://example.org/ESA-22-11-CVE-1900-1234"
4848
}
4949
]
5050
}
5151
}
52-
}
52+
}

0 commit comments

Comments
 (0)