Skip to content

Commit 2876c34

Browse files
puercoluhring
andcommitted
Updated specx draft to reflect @luhring's review
Updated the spec to address @luhrings review comments Co-authored-by: Dan Luhring <[email protected]> Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
1 parent 120a0ec commit 2876c34

File tree

1 file changed

+94
-54
lines changed

1 file changed

+94
-54
lines changed

OPENVEX-SPEC.md

Lines changed: 94 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,79 +11,83 @@ Security Agency](https://www.cisa.gov/) (CISA).
1111

1212
## About VEX
1313

14-
Vulnerability Exploitability eXchange is a vulnerability document designed to complement a Software Bill of Materials (SBOM) that informs users of a software product of the status of the impact of a vulnerability.
14+
Vulnerability Exploitability eXchange is a vulnerability document designed to
15+
complement a Software Bill of Materials (SBOM) that informs users of a software
16+
product about the applicability of one or more vulnerability findings.
1517

16-
Security scanners often will detect and flag components in software that have
18+
Security scanners will detect and flag components in software that have
1719
been identified as being vulnerable. Often, software is not necessarily affected
18-
as signaled by security scanners for many reasons: the vulnerable component may
19-
have been already patched, not present, or is simply never executed. To turn off
20+
as signaled by security scanners for many reasons such as: the vulnerable component may
21+
have been already patched, may not be present, or may not be able to be executed. To turn off
2022
false alerts like these, a scanner may consume VEX data from the software supplier.
2123

2224
The extreme transparency brought by SBOMs into how software is composed will
2325
most likely increase the number of these kind of false positives, requiring an
24-
automated solution to avoid an explosion in the signal-to-noise ratio of
25-
security scans. Hence VEX.
26+
automated solution to avoid an explosion in the false positive rate of security
27+
scans. Hence VEX.
2628

27-
## The VEX Impact Statement
29+
## The VEX Statement
2830

29-
VEX centers on the notion of an _impact statement_. In short, an impact statement
30-
can be summarized as the sum of a product, a vulnerability, and a status:
31+
VEX centers on the notion of a _statement_. In short, a statement can be defined
32+
as an assertion intersecting product, a vulnerability, and an impact status:
3133

3234
```
33-
impact_statement = product(s) + vulnerability + status
34-
│ │ │
35-
└ The software product └ Typically a CVE related └ One of the impact
36-
we are talking about to one of the product's statuses as identified
37-
components by the VEX working group.
35+
statement = product(s) + vulnerability + status
36+
│ │ │
37+
└ The software product └ Typically a CVE related └ One of the impact
38+
we are talking about to one of the product's statuses as identified
39+
components by the VEX working group.
3840
```
3941

4042
The `product` is a piece of software that can be correlated to an entry in an
4143
SBOM (see [Product](#Product) below). `vulnerability` is the ID of a security
42-
vulnerability as understood by scanners and that can be looked up in a vulnerability
44+
vulnerability as understood by scanners, which can be looked up in a vulnerability
4345
tracking system. `status` is one of the impact status labels defined by VEX
4446
(see [Status](#Status)).
4547

4648
Another key part of VEX is time. It matters _when_ statements are made. VEX is
4749
designed to be a sequence of statements, each overriding, but also enriching
48-
the previous ones with new information. Each impact statement has a timestamp
49-
associated with it.
50+
the previous ones with new information. Each statement has a timestamp
51+
associated with it, either exlicitly in the markup or derived from containint
52+
structures (see [Inheritance Flow](#Inheritance Flow)).
5053

5154
## VEX Documents
5255

53-
A VEX document is a data structure grouping one or more impact statements.
56+
A VEX document is a data structure grouping one or more VEX statements.
5457
Documents also have timestamps, which may cascade down to statements (see
55-
[inheritance](#Inheritance)) and can also be versioned.
58+
[Inheritance Flow](#Inheritance Flow)). Documents can also be versioned.
5659

5760
### A Sample Scenario
5861

5962
As an example, consider the following evolution of a hypothetical impact analysis:
6063

61-
1. A software author becomes aware of a new CVE related to its product. Immediately,
62-
the author starts to check if it affects them.
64+
1. A software author becomes aware of a new CVE related to their product.
65+
Immediately, the author starts to check if it affects them.
6366
2. The investigation determines the product is affected.
6467
3. To protect their users, the author mitigates the CVE impact via a patch or
6568
other method before the vulnerable component issues a patch.
6669

67-
During these three steps, users scanning the author's software will simply get
68-
a thirds party alert with no details on how the status is evolving. Most critically,
69-
when (in #3) the software is patched, the alert becomes a false positive.
70+
Without VEX data, users scanning the author's software will simply get
71+
a third party alert with no details on how the status is evolving. Most critically,
72+
when the product is patched (in #3), the alert becomes a false positive.
7073

71-
With VEX, the author can issue a VEX document when the CVE is published to
72-
inform their users it is under investigation. In #2, when the product is known
73-
to be affected, the author can ship a new VEX document, stating the product
74-
is affected and possibly some additional advice. Finally, when patched
75-
the product's SBOM can be complemented with a VEX document informing it is no
76-
longer affected by the CVE. Scanners could consume this document and stop
77-
alerting about the CVE as it no longer impacts the product.
74+
To inform consumers downstream of the vulnerability evolution, the author can
75+
issue a VEX document (in #1) when the CVE is published to let their users
76+
know it is under investigation. In #2, when the product is known to be affected,
77+
the author can ship a new VEX document, stating the product is affected and
78+
possibly some additional advice, like temporary mitigation instructions. Finally
79+
when the product is patched, its SBOM can be complemented with a new VEX document
80+
informing it is no longer affected by the CVE. Scanners could consume this
81+
document and stop alerting about the CVE as it no longer impacts the product.
7882

7983
## OpenVEX Specification
8084

8185
### Definitions
8286

8387
#### Document
8488

85-
A data structure that groups together one or more impact statements. A document
86-
MUST define a timestamp to express when its statements were known to be true.
89+
A data structure that groups together one or more VEX statements. A document
90+
MUST define a timestamp to express when it was issued.
8791

8892
#### Encapsulating Document
8993

@@ -101,7 +105,7 @@ as a product.
101105

102106
#### Status
103107

104-
The known relationship a vulnerability has with a software product. The status
108+
The known relationship a vulnerability has to a software product. The status
105109
expresses if the product is impacted by the vulnerability or not, if the authors
106110
are investigating it, or if it has already been fixed.
107111

@@ -117,15 +121,15 @@ expected to flow.
117121

118122
#### Subcomponent
119123

120-
Any components possibly included in the product where the vulnerability origintes.
124+
Any components possibly included in the product where the vulnerability originates.
121125
The subcomponents SHOULD also be software identifiers and they SHOULD also be
122126
listed in the product SBOM. subcomponents will most often be one or more of the
123127
product's dependencies.
124128

125129
### Document
126130

127131
A VEX document consists of two parts: The document metadata and a collection
128-
of impact statements. Some fields in the document metadata are required.
132+
of statements. Some fields in the document metadata are required.
129133

130134
OpenVEX documents are serialized in json-ld structs. File encoding MUST be UTF8.
131135

@@ -167,22 +171,31 @@ The following table lists the fields in the document struct
167171
| tooling || Tooling expresses how the VEX document and contained VEX statements were generated. It's optional. It may specify tools or automated processes used in the document or statement generation. |
168172
| supplier || An optional field specifying who is providing the VEX document. |
169173

170-
### Impact Statement
174+
### Statement
171175

172-
An impact statement is an assertion made by the document's author about the impact
173-
a vulnerability has on one or more software "products". The impact statement has
176+
A statement is an assertion made by the document's author about the impact
177+
a vulnerability has on one or more software "products". The statement has
174178
three key components that are valid at a point in time: `status`, a `vulnerability`,
175179
and the `product` to which these apply (see diagram above).
176180

177-
An impact statement in an OpenVEX document looks like the following snippet:
181+
A statement in an OpenVEX document looks like the following snippet:
178182

179-
```
180-
TBD
183+
```json
184+
"statements": [
185+
{
186+
"vulnerability": "CVE-2023-12345",
187+
"products": [
188+
"pkg:apk/wolfi/[email protected]?arch=armv7",
189+
"pkg:apk/wolfi/[email protected]?arch=x86_64"
190+
],
191+
"status": "fixed"
192+
}
193+
]
181194
```
182195

183-
#### Impact Statement Fields
196+
#### Statement Fields
184197

185-
The following table lists the fields of the impact statement struct.
198+
The following table lists the fields of the OpenVEX statement struct.
186199

187200
| Field | Required | Description |
188201
| --- | --- | --- |
@@ -193,11 +206,36 @@ The following table lists the fields of the impact statement struct.
193206
| subcomponents || Identifiers of components where the vulnerability originates. While the statement asserts about the impact on the software product, listing `subcomponents` let scanners find identifiers to match their findings. |
194207
| status || A VEX statement MUST provide the status of the vulnerabilities with respect to the products and components listed in the statement. `status` MUST be one of the labels defined by VEX (see [Status](#Status)), some of which have further options and requirements. |
195208
| status_notes || A statement MAY convey information about how `status` was determined and MAY reference other VEX information. |
196-
| justification || For statements conveying a `not_affected` status, a VEX statement MUST include a status justification informing why the product is not affected by the vulnerability. Justifications are fixed labels defined by VEX. See [Status Justifications](#Status Justifications) below for valid values. |
197-
| impact_statement || When a product is `not_affected`, the VEX document author MAY include a statement that contains a description of why the vulnerability cannot be exploited. |
198-
| action_statement || For a statement with "affected" status, a VEX statement MAY include a statement that SHOULD describe actions to remediate or mitigate the vulnerability. |
209+
| justification | ✓/| 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. Justifications are fixed labels defined by VEX. See [Status Justifications](#Status Justifications) below for valid values. |
210+
| impact_statement | ✓/| 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. An impact statement is a free form text containing a description of why the vulnerability cannot be exploited. This field is not intended to be machine readable so its use is highly discouraged for automated systems. |
211+
| action_statement || For a statement with "affected" status, a VEX statement MUST include a statement that SHOULD describe actions to remediate or mitigate the vulnerability. |
199212
| action_statement_timestamp || The timestamp when the action statement was issued. |
200213

214+
##### Note on `justification` and `impact_statement`
215+
216+
The Minimal Requirements for VEX document states that a `not_affected` statement
217+
MUST provide either a machine readable `justification` label or a free form
218+
text `impact_statement`. OpenVEX defines both required fields but highly discourages
219+
the use of the impact statement textual form as it breaks VEX automation and
220+
interoperability.
221+
222+
The recommended pattern from OpenVEX is that issuers SHOULD use the machine
223+
readable justification labels and optionally enrich the statement with an
224+
`impact_statement`:
225+
226+
```json
227+
{
228+
"vulnerability": "CVE-2023-12345",
229+
"products": [
230+
"pkg:apk/wolfi/[email protected]?arch=armv7",
231+
],
232+
"status": "not_affected",
233+
"justification": "component_not_present",
234+
"impact_statement": "The vulnerable code was removed with a custom patch"
235+
}
236+
237+
```
238+
201239
### Status Labels
202240

203241
Status labels inform the impact of a vulnerability in the products listed
@@ -208,20 +246,20 @@ with contextual data about the evolution of the vulnerability impact.
208246

209247
| Label | Description |
210248
| --- | --- |
211-
| `not_affected` | No remediation is required regarding this vulnerability. A `not_affected` status required the addition of a `justification` to the impact statement. |
249+
| `not_affected` | No remediation is required regarding this vulnerability. A `not_affected` status required the addition of a `justification` to the statement. |
212250
| `affected` | Actions are recommended to remediate or address this vulnerability. |
213251
| `fixed` | These product versions contain a fix for the vulnerability. |
214252
| `under_investigation` | It is not yet known whether these product versions are affected by the vulnerability. Updates should be provided in further VEX documents as knowledge evolves. |
215253

216-
Any of these key data points are required to form a valid impact statement but
254+
Any of these key data points are required to form a valid statement but
217255
they are not necessarily required to be defined in the statement's data struct.
218256
Consider the following scenarios:
219257

220258
### Status Justifications
221259

222260
When assessing risk, consumers of a `not_affected` software product can know
223261
why the vulnerability is not affected by reading the justification label
224-
associated with the impact statement. These labels are predefined and machine-readable
262+
associated with the VEX statement. These labels are predefined and machine-readable
225263
to enable automated uses such as deployment policies. The current label catalog
226264
was defined by the VEX Working Group and published in the
227265
[Status Justifications](status-doc) document on July 2022.
@@ -240,7 +278,7 @@ was defined by the VEX Working Group and published in the
240278
VEX statements can inherit values from their document and/or, when embedded or
241279
incorporated into another format, from its [encapsulating document](#encaspu).
242280

243-
A valid impact statement needs to have four key data points which act as
281+
A valid VEX statement needs to have four key data points which act as
244282
the grammatical parts of a sentence:
245283

246284
- One or more products. These are the direct objects of the statement.
@@ -252,12 +290,12 @@ In OpenVEX, timestamps and product identifiers can be defined outside the
252290
statements to avoid defining redundant info or to leverage external features.
253291

254292
__Note:__ While this specification lists these data fields as optional in the
255-
statement data struct, the data MUST be defined to have complete
256-
impact statements. A document with incomplete impact statements is not valid.
293+
statement data struct, the data MUST be defined to have complete statements. A
294+
document with incomplete statements is not valid.
257295

258296
#### Data Economy
259297

260-
A document defining four impact statements, all issued at the same time can be
298+
A document defining multiple statements, all issued at the same time can be
261299
made less verbose by just inferring the statement timestamps from the date the
262300
document was issued.
263301

@@ -355,6 +393,8 @@ to avoid duplication:
355393
| Date | Revision |
356394
| --- | --- |
357395
| 2023-01-08 | First Draft of the OpenVEX Specification |
396+
| 2023-01-16 | Updated to reflect @luhring's review |
397+
358398

359399
## Sources
360400

0 commit comments

Comments
 (0)