-
Notifications
You must be signed in to change notification settings - Fork 19
/
openvex_json_schema.json
316 lines (316 loc) · 12.3 KB
/
openvex_json_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/openvex/spec/openvex_json_schema_0.2.0.json",
"title": "OpenVEX",
"description": "OpenVEX is an implementation of the Vulnerability Exploitability Exchange (VEX for short) that is designed to be minimal, compliant, interoperable, and embeddable.",
"type": "object",
"$defs": {
"vulnerability": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "iri",
"description": "An Internationalized Resource Identifier (IRI) identifying the struct."
},
"name": {
"type": "string",
"description": "A string with the main identifier used to name the vulnerability."
},
"description": {
"type": "string",
"description": "Optional free form text describing the vulnerability."
},
"aliases": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"description": "A list of strings enumerating other names under which the vulnerability may be known."
}
},
"required": [
"name"
],
"additionalProperties": false
},
"identifiers": {
"type": "object",
"properties": {
"purl": {
"type": "string",
"description": "Package URL"
},
"cpe22": {
"type": "string",
"description": "Common Platform Enumeration v2.2"
},
"cpe23": {
"type": "string",
"description": "Common Platform Enumeration v2.3"
}
},
"additionalProperties": false,
"anyOf": [
{ "required": ["purl"] },
{ "required": ["cpe22"] },
{ "required": ["cpe23"] }
]
},
"hashes": {
"type": "object",
"properties": {
"md5": {
"type": "string"
},
"sha1": {
"type": "string"
},
"sha-256": {
"type": "string"
},
"sha-384": {
"type": "string"
},
"sha-512": {
"type": "string"
},
"sha3-224": {
"type": "string"
},
"sha3-256": {
"type": "string"
},
"sha3-384": {
"type": "string"
},
"sha3-512": {
"type": "string"
},
"blake2s-256": {
"type": "string"
},
"blake2b-256": {
"type": "string"
},
"blake2b-512": {
"type": "string"
}
},
"additionalProperties": false
},
"subcomponent": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "iri",
"description": "Optional IRI identifying the component to make it externally referenceable."
},
"identifiers": {
"$ref": "#/$defs/identifiers",
"description": "Optional IRI identifying the component to make it externally referenceable."
},
"hashes": {
"$ref": "#/$defs/hashes",
"description": "Map of cryptographic hashes of the component."
}
},
"additionalProperties": false,
"anyOf": [
{ "required": ["@id"] },
{ "required": ["identifiers"] }
]
},
"component": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "iri",
"description": "Optional IRI identifying the component to make it externally referenceable."
},
"identifiers": {
"$ref": "#/$defs/identifiers",
"description": "A map of software identifiers where the key is the type and the value the identifier."
},
"hashes": {
"$ref": "#/$defs/hashes",
"description": "Map of cryptographic hashes of the component."
},
"subcomponents": {
"type": "array",
"uniqueItems": true,
"description": "List of subcomponent structs describing the subcomponents subject of the VEX statement.",
"items": {
"$ref": "#/$defs/subcomponent"
}
}
},
"additionalProperties": false,
"anyOf": [
{ "required": ["@id"] },
{ "required": ["identifiers"] }
]
}
},
"properties": {
"@context": {
"type": "string",
"format": "uri",
"description": "The URL linking to the OpenVEX context definition."
},
"@id": {
"type": "string",
"format": "iri",
"description": "The IRI identifying the VEX document."
},
"author": {
"type": "string",
"description": "Author is the identifier for the author of the VEX statement."
},
"role": {
"type": "string",
"description": "Role describes the role of the document author."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp defines the time at which the document was issued."
},
"last_updated": {
"type": "string",
"format": "date-time",
"description": "Date of last modification to the document."
},
"version": {
"type": "integer",
"minimum": 1,
"description": "Version is the document version."
},
"tooling": {
"type": "string",
"description": "Tooling expresses how the VEX document and contained VEX statements were generated."
},
"statements": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"description": "A statement is an assertion made by the document's author about the impact a vulnerability has on one or more software 'products'.",
"items": {
"properties": {
"@id": {
"type": "string",
"format": "iri",
"description": "Optional IRI identifying the statement to make it externally referenceable."
},
"version": {
"type": "integer",
"minimum": 1,
"description": "Optional integer representing the statement's version number."
},
"vulnerability": {
"$ref": "#/$defs/vulnerability",
"description": "A struct identifying the vulnerability."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp is the time at which the information expressed in the statement was known to be true."
},
"last_updated": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the statement was last updated."
},
"products": {
"type": "array",
"uniqueItems": true,
"description": "List of product structs that the statement applies to.",
"items": {
"$ref": "#/$defs/component"
}
},
"status": {
"type": "string",
"enum": [
"not_affected",
"affected",
"fixed",
"under_investigation"
],
"description": "A VEX statement MUST provide the status of the vulnerabilities with respect to the products and components listed in the statement."
},
"supplier": {
"type": "string",
"description": "Supplier of the product or subcomponent."
},
"status_notes": {
"type": "string",
"description": "A statement MAY convey information about how status was determined and MAY reference other VEX information."
},
"justification": {
"type": "string",
"enum": [
"component_not_present",
"vulnerable_code_not_present",
"vulnerable_code_not_in_execute_path",
"vulnerable_code_cannot_be_controlled_by_adversary",
"inline_mitigations_already_exist"
],
"description": "For statements conveying a not_affected status, a VEX statement MUST include either a status justification or an impact_statement informing why the product is not affected by the vulnerability."
},
"impact_statement": {
"type": "string",
"description": "For statements conveying a not_affected status, a VEX statement MUST include either a status justification or an impact_statement informing why the product is not affected by the vulnerability."
},
"action_statement": {
"type": "string",
"description": "For a statement with affected status, a VEX statement MUST include a statement that SHOULD describe actions to remediate or mitigate the vulnerability."
},
"action_statement_timestamp": {
"type": "string",
"format": "date-time",
"description": "The timestamp when the action statement was issued."
}
},
"required": [
"vulnerability",
"status"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": { "status": { "const": "not_affected" }}
},
"then": {
"anyOf": [
{ "required": ["justification"]},
{ "required": ["impact_statement"]}
]
}
},
{
"if": {
"properties": { "status": { "const": "affected" }}
},
"then": {
"required": ["action_statement"]
}
}
]
}
}
},
"required": [
"@context",
"@id",
"author",
"timestamp",
"version",
"statements"
],
"additionalProperties": false
}