-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
vulnerability-1.0.xsd
291 lines (281 loc) · 13.9 KB
/
vulnerability-1.0.xsd
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
CycloneDX Vulnerability Extension
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:vuln="http://cyclonedx.org/schema/ext/vulnerability/1.0"
elementFormDefault="qualified"
targetNamespace="http://cyclonedx.org/schema/ext/vulnerability/1.0"
vc:minVersion="1.0"
vc:maxVersion="1.1"
version="1.0.0">
<xs:annotation>
<xs:documentation>
<name>CycloneDX Vulnerability Extension</name>
<url>https://cyclonedx.org/ext/vulnerability</url>
<license uri="http://www.apache.org/licenses/LICENSE-2.0"
version="2.0">Apache License, Version 2.0</license>
</xs:documentation>
</xs:annotation>
<xs:simpleType name="severityType" final="restriction">
<xs:annotation>
<xs:documentation xml:lang="en">
Textual representation of the severity of the vulnerability adopted by the risk analysis method.
If an other risk analysis method is used other than whats defined in scoreSourceType,
the user is expected to translate appropriately to match with an element value below.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="None"/>
<xs:enumeration value="Low"/>
<xs:enumeration value="Medium"/>
<xs:enumeration value="High"/>
<xs:enumeration value="Critical"/>
<xs:enumeration value="Unknown"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="scoreValueType">
<xs:annotation>
<xs:documentation xml:lang="en">
Numerical representation of the vulnerability score.
Must be a number between 0 - 10 (maps to lowest severity - highest severity)
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="1"/>
<xs:maxInclusive value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="scoreSourceType" final="restriction">
<xs:annotation>
<xs:documentation xml:lang="en">
Specifies the risk scoring methodology/standard used.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="CVSSv2">
<xs:annotation>
<xs:documentation xml:lang="en">
The rating is based on CVSS v2 standard
https://www.first.org/cvss/v2/guide
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CVSSv3">
<xs:annotation>
<xs:documentation xml:lang="en">
The rating is based on CVSS v3 standard
https://www.first.org/cvss/v3.1/specification-document
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OWASP Risk">
<xs:annotation>
<xs:documentation xml:lang="en">
The rating is based on OWASP Risk Rating
https://www.owasp.org/index.php/OWASP_Risk_Rating_Methodology
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Open FAIR">
<xs:annotation>
<xs:documentation xml:lang="en">
The rating is based on Open FAIR specification
http://www.opengroup.org/subjectareas/security/risk
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Other">
<xs:annotation>
<xs:documentation xml:lang="en">
Use this if the risk scoring methodology is not based on any of the options above
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="scoreType">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines the numerical risk score of a vulnerability
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="score" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="base" type="vuln:scoreValueType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
The base score of the security vulnerability (Refer CVSS standard for example)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="impact" type="vuln:scoreValueType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
The impact subscore of the security vulnerability (Refer CVSS standard for example)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="exploitability" type="vuln:scoreValueType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
The exploitability subscore of the security vulnerability (Refer CVSS standard for
example)
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="severity" type="vuln:severityType" minOccurs="0" maxOccurs="1"/>
<xs:element name="method" type="vuln:scoreSourceType" minOccurs="0" maxOccurs="1"/>
<xs:element name="vector" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
Textual representation of the metric values used to score the vulnerability
see attack vector in https://www.first.org/cvss/v3.1/specification-document
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="vulnerability">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines the structure of a vulnerability.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="id" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
The id of the vulnerability as defined by the risk scoring methodology
For example CVE-2019-15842 (of https://nvd.nist.gov/vuln/detail/CVE-2019-15842)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="source" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:annotation>
<xs:documentation xml:lang="en">
The source of the vulnerability where it is documented.
Usually the name of the organization publishing vulnerability information
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="url" minOccurs="0" type="xs:anyURI" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
The url of the vulnerability documentation as provided by the source
For example https://nvd.nist.gov/vuln/detail/CVE-2019-15842
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:normalizedString" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
The name of the source. For example "National Vulnerability Database"
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="ratings" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
List of the vulnerability ratings as defined by various risk rating methodologies.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="rating" type="vuln:scoreType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="cwes" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:annotation>
<xs:documentation xml:lang="en">
List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability.
For example 399 (of https://cwe.mitre.org/data/definitions/399.html)
</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="cwe" type="xs:integer" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en">
Description of the vulnerability as provided by the source organization
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="recommendations" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:annotation>
<xs:documentation xml:lang="en">
The remediation options for the vulnerability if available
</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="recommendation" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
A recommendation of how the particular vulnerability can be avoided/mitigated.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="advisories" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:annotation>
<xs:documentation xml:lang="en">
Published advisories of the vulnerability if provided
</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="advisory" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ref" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>References a component by the components bom-ref attribute</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="vulnerabilities">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines a list of vulnerabilities.
Vulnerabilities are intended to be used inside the BOM component element.
Extending a component ability to declare associated vulnerability information.
Each component element optionally can add a vulnerabilities element.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="vulnerability" type="vuln:vulnerability"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>