Debian Codegraph @

tests/data/openvex_json_schema_0.2.0.json

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