Skip to content

Commit 9bcabec

Browse files
authored
Minimalist Selection Object (#821)
2 parents 054e175 + 215da4e commit 9bcabec

30 files changed

+2155
-93
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../v1/Decision_Point_Value_Selection-1-0-1.schema.json
1+
../v2/Decision_Point_Value_Selection-2-0-0.schema.json
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://certcc.github.io/SSVC/data/schema/v2/Decision_Point_Value_Selection-2-0-0.schema.json",
4+
"title": "Decision Point Value Selection List",
5+
"description": "This schema defines the structure for representing selected values from SSVC Decision Points. Each selection list can have multiple selection objects, each representing a decision point, and each selection object can have multiple selected values when full certainty (i.e., a singular value selection) is not available.",
6+
"type": "object",
7+
"properties": {
8+
"timestamp": {
9+
"description": "Timestamp of the selections, in RFC 3339 format.",
10+
"examples": [
11+
"2025-01-01T12:00:00Z",
12+
"2025-01-02T15:30:45-04:00"
13+
],
14+
"format": "date-time",
15+
"title": "Timestamp",
16+
"type": "string"
17+
},
18+
"schemaVersion": {
19+
"const": "2.0.0",
20+
"description": "The schema version of this selection list.",
21+
"title": "Schemaversion",
22+
"type": "string"
23+
},
24+
"target_ids": {
25+
"description": "Optional list of identifiers for the item or items (vulnerabilities, reports, advisories, systems, assets, etc.) being evaluated by these selections.",
26+
"examples": [
27+
[
28+
"CVE-1900-0000"
29+
],
30+
[
31+
"VU#999999",
32+
"GHSA-0123-4567-89ab"
33+
]
34+
],
35+
"items": {
36+
"type": "string"
37+
},
38+
"minItems": 1,
39+
"title": "Target Ids",
40+
"type": "array"
41+
},
42+
"selections": {
43+
"description": "List of selections made from decision points. Each selection item corresponds to value keys contained in a specific decision point identified by its namespace, key, and version. Note that selection objects are deliberately minimal objects and do not contain the full decision point details.",
44+
"items": {
45+
"$ref": "#/$defs/Selection"
46+
},
47+
"minItems": 1,
48+
"title": "Selections",
49+
"type": "array"
50+
},
51+
"resources": {
52+
"description": "A list of references to resources that provide additional context about the decision points found in this selection.",
53+
"examples": [
54+
[
55+
{
56+
"description": "Documentation for a set of decision points",
57+
"uri": "https://example.com/decision_points"
58+
},
59+
{
60+
"description": "JSON representation of decision point 2",
61+
"uri": "https://example.org/definitions/dp2.json"
62+
},
63+
{
64+
"description": "A JSON file containing extension decision points in the x_com.example namespace",
65+
"uri": "https://example.com/ssvc/x_com.example/decision_points.json"
66+
}
67+
]
68+
],
69+
"items": {
70+
"$ref": "#/$defs/Reference"
71+
},
72+
"minItems": 1,
73+
"title": "Resources",
74+
"type": "array"
75+
},
76+
"references": {
77+
"description": "A list of references to resources that provide additional context about the specific values selected.",
78+
"examples": [
79+
[
80+
{
81+
"description": "A report on which the selections were based",
82+
"uri": "https://example.com/report"
83+
}
84+
],
85+
[
86+
{
87+
"description": "A code section on which the selections were based",
88+
"uri": "https://git.example.com/some-relevant-path/code#L21-42"
89+
},
90+
{
91+
"description": "A code section on which calls the vulnerable function",
92+
"uri": "https://git.example.com/some-relevant-path/callingcode#L91-16"
93+
}
94+
]
95+
],
96+
"items": {
97+
"$ref": "#/$defs/Reference"
98+
},
99+
"minItems": 1,
100+
"title": "References",
101+
"type": "array"
102+
}
103+
},
104+
"required": [
105+
"timestamp",
106+
"schemaVersion",
107+
"selections"
108+
],
109+
"additionalProperties": false,
110+
"$defs": {
111+
"MinimalDecisionPointValue": {
112+
"description": "A minimal representation of a decision point value.\nIntended to parallel the DecisionPointValue object, but with fewer required fields.\nA decision point value is uniquely identified within a decision point by its key.\nGlobally, the combination of Decision Point namespace, key, and version coupled with the value key\nuniquely identifies a value across all decision points and values.\nOther required fields in the DecisionPointValue object, such as name and description, are optional here.",
113+
"properties": {
114+
"key": {
115+
"title": "Key",
116+
"type": "string"
117+
},
118+
"name": {
119+
"title": "Name",
120+
"type": "string"
121+
},
122+
"description": {
123+
"title": "Description",
124+
"type": "string"
125+
}
126+
},
127+
"required": [
128+
"key"
129+
],
130+
"title": "MinimalDecisionPointValue",
131+
"type": "object"
132+
},
133+
"Reference": {
134+
"additionalProperties": false,
135+
"description": "A reference to a resource that provides additional context about the decision points or selections.\nThis object is intentionally minimal and contains only the URL and an optional description.",
136+
"properties": {
137+
"uri": {
138+
"format": "uri",
139+
"minLength": 1,
140+
"title": "Uri",
141+
"type": "string"
142+
},
143+
"description": {
144+
"title": "Description",
145+
"type": "string"
146+
}
147+
},
148+
"required": [
149+
"uri"
150+
],
151+
"title": "Reference",
152+
"type": "object"
153+
},
154+
"Selection": {
155+
"additionalProperties": false,
156+
"description": "A minimal selection object that contains the decision point ID and the selected values.\nWhile the Selection object parallels the DecisionPoint object, it is intentionally minimal, with\nfewer required fields and no additional metadata, as it is meant to represent a selection made from a\npreviously defined decision point. The expectation is that a Selection object will usually have\nfewer values than the original decision point, as it represents a specific evaluation\nat a specific time and may therefore rule out some values that were previously considered.\nOther fields like name and description may be copied from the decision point, but are not required.",
157+
"properties": {
158+
"name": {
159+
"title": "Name",
160+
"type": "string"
161+
},
162+
"description": {
163+
"title": "Description",
164+
"type": "string"
165+
},
166+
"namespace": {
167+
"description": "The namespace of the SSVC object.",
168+
"examples": [
169+
"ssvc",
170+
"cisa",
171+
"x_com.example//com.example#private",
172+
"ssvc/de-DE/example.organization#reference-arch-1"
173+
],
174+
"maxLength": 1000,
175+
"minLength": 3,
176+
"pattern": "^(?=.{3,1000}$)(?:x_(?!.*[.-]{2,})[a-z][a-z0-9]+(?:[.-][a-z0-9]+)*|(?!.*[.-]{2,})[a-z][a-z0-9]+(?:[.-][a-z0-9]+)*)(?:(?:/(([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3}){0,2})?|[A-Za-z]{4,8})(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-[A-WY-Za-wy-z0-9](-[A-Za-z0-9]{2,8})+)*(-[Xx](-[A-Za-z0-9]{1,8})+)?|[Xx](-[A-Za-z0-9]{1,8})+|[Ii]-[Dd][Ee][Ff][Aa][Uu][Ll][Tt]|[Ii]-[Mm][Ii][Nn][Gg][Oo])/|//)(?!.*[.-]{2,})[a-zA-Z][a-zA-Z0-9]*(?:[.-][a-zA-Z0-9]+)*(?:#[a-zA-Z0-9]+(?:[.-][a-zA-Z0-9]+)*)?(?:/(?!.*[.-]{2,})[a-zA-Z][a-zA-Z0-9]*(?:[.-][a-zA-Z0-9]+)*(?:#[a-zA-Z0-9]+(?:[.-][a-zA-Z0-9]+)*)?)*)?$",
177+
"title": "Namespace",
178+
"type": "string"
179+
},
180+
"key": {
181+
"title": "Key",
182+
"type": "string"
183+
},
184+
"version": {
185+
"description": "The version of the SSVC object. This must be a valid semantic version string.",
186+
"examples": [
187+
"1.0.0",
188+
"2.1.3"
189+
],
190+
"minLength": 5,
191+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
192+
"title": "Version",
193+
"type": "string"
194+
},
195+
"values": {
196+
"description": "A list of selected value keys from the decision point values.",
197+
"examples": [
198+
[
199+
{
200+
"key": "N"
201+
},
202+
{
203+
"key": "Y"
204+
}
205+
],
206+
[
207+
{
208+
"key": "A"
209+
},
210+
{
211+
"key": "B"
212+
},
213+
{
214+
"key": "C"
215+
}
216+
]
217+
],
218+
"items": {
219+
"$ref": "#/$defs/MinimalDecisionPointValue"
220+
},
221+
"minItems": 1,
222+
"title": "Values",
223+
"type": "array"
224+
}
225+
},
226+
"required": [
227+
"namespace",
228+
"key",
229+
"version",
230+
"values"
231+
],
232+
"title": "Selection",
233+
"type": "object"
234+
}
235+
}
236+
}

docs/adr/0012-ssvc-namespaces.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
status: "accepted"
3+
date: 2025-07-22
4+
deciders: @ahouseholer @sei-vsarvepalli
5+
consulted: @tschmidtb51
6+
---
7+
# Use of Namespaces in SSVC objects
8+
9+
## Context and Problem Statement
10+
11+
We need to include decision points and other objects that are not directly
12+
defined by the SSVC project team. For example, CVSS vector elements are a
13+
rich source of structured data that can be used to inform SSVC decisions and
14+
modeled as SSVC decision point objects. However, the
15+
[FIRST CVSS SIG](https://www.first.org/cvss) owns the definition of CVSS vector
16+
elements. So we need a way to describe these objects in SSVC format
17+
without making them part of the SSVC specification.
18+
19+
20+
## Decision Drivers
21+
22+
- Need to include decision points based on data, objects, standards, and other
23+
definitions that are not part of the SSVC specification.
24+
- Need to clearly distinguish between objects managed by the SSVC project and
25+
objects provided for convenience by the SSVC project, but whose semantics are
26+
defined by other projects or standards.
27+
28+
## Considered Options
29+
30+
- One big pile of objects (effectively no namespaces)
31+
- Use namespaces to distinguish between SSVC project objects and other objects
32+
33+
## Decision Outcome
34+
35+
Chosen option: "Use namespaces", because
36+
37+
- Clearly distinguishes between SSVC project objects and objects derived from other sources
38+
- Allows for extension of SSVC objects with additional data from other sources
39+
- Allows for extensions for langauages, translation, localization, etc.
40+
41+
Specifically, we intend to use:
42+
43+
**Registered namespaces** for objects that we create and maintain (even if they are
44+
based on other sources).
45+
46+
!!! example
47+
48+
We use the `ssvc` namespace for all SSVC objects that are part of the
49+
main project. We use the `cvss` namespace to contain CVSS vector elements.
50+
51+
**Unregistered namespaces** for objects that we do not create or maintain, but
52+
that others may want for their own use. Unregistered namespaces must start with
53+
an `x_` prefix followed by a reverse domain name, such as `x_org.example`.
54+
Unregistered namespaces are intended for experimental or private use.
55+
56+
!!! example
57+
58+
A government agency might create a set of decision points for internal use
59+
using the `x_example.agency` namespace. This allows them to use SSVC objects
60+
of their own design alongside existig SSVC objects without needing to
61+
register their namespace with the SSVC project.
62+
63+
**Namespace extensions** for objects that are derived from other objects in an
64+
registered or unregistered namespace. Extensions are not intended to be used to
65+
introduce new objects, but rather to refine existing objects with additional data
66+
or semantics.
67+
Namespace extensions can be used for refining the meaning of decision point
68+
values for a specific constituency, or adding additional nuance to
69+
interpretation of a decision point in a specific context.
70+
71+
!!! example
72+
73+
An ISAO (Information Sharing and Analyzing Organization) might want to refine the meaning of decision point values for their
74+
constituency, and could use `ssvc//example.isao` as the namespace for their
75+
collection of extensions.
76+
77+
### Consequences
78+
79+
#### Positive Consequences
80+
81+
- SSVC users can customize SSVC objects with additional refinements using extensions
82+
- SSVC users can create their own SSVC objects in an unregistered namespace for
83+
their own use, and share them with others
84+
- Facilitates language translation and localization of SSVC objects to specific
85+
constituencies
86+
87+
88+
#### Negative Consequences
89+
90+
- Registered namespaces must be managed and maintained
91+
- Potential for confusion if unregistered namespaces are used without care or
92+
violating the naming conventions
93+
94+
<!-- This is an optional element. Feel free to remove. -->
95+
### Confirmation
96+
97+
- Regular expressions are used in the SSVC specification in both python objects
98+
and JSON schema to validate the namespace format.
99+
- Object validators can be used to ensure that namespaces are correctly formatted
100+
and that registered namespaces are used for objects that are part of the SSVC
101+
specification.
102+
103+
<!-- This is an optional element. Feel free to remove. -->
104+
## Pros and Cons of the Options
105+
106+
### One big pile of objects
107+
108+
We started out with all objects having no namespaces, which meant that
109+
all objects were effectively part of the SSVC specification. This was problematic
110+
because it made it difficult to distinguish between objects that were part of the
111+
SSVC specification under our control and objects that were derived from other sources.
112+
113+
- Good, because it was simple and easy to understand
114+
- Bad, because it made it difficult to distinguish between SSVC project objects and
115+
objects based on specifications we neither created nor maintained
116+
117+
118+
<!-- This is an optional element. Feel free to remove. -->
119+
## More Information
120+
121+
- [SSVC Namespace Documentation](../reference/code/namespaces.md)

docs/adr/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ the decision records that have been made.
2323
- [0009 - Outcomes are Ordered Sets](0009-outcomes-are-ordered-sets.md)
2424
- [0010 - Outcome Sets are separate from Decision Point Groups](0010-outcome-sets-are-separate-from-decision-point-groups.md)
2525
- [0011 - Correspondence between Automatable v2.0.0, Value Density v1.0.0, and CVSS v4](0011-automatable-and-value-density-and-CVSSv4.md)
26+
- [0012 - SSVC Namespaces](0012-ssvc-namespaces.md)
2627

2728
## Rejected Records
2829

0 commit comments

Comments
 (0)