Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,9 @@
"description": "When the blueprint expires."
},
"reviewFrequency": {
"type": "string",
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/duration",
"title": "Review Frequency",
"pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?$",
"description": "ISO 8601 duration for review frequency (e.g., `\"P3M\"` for quarterly).",
"examples": ["P1Y", "P3M", "P5W", "P23D"]
"description": "How often the blueprint is reviewed, as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration, for example `\"P3M\"` for quarterly."
}
}
},
Expand Down
15 changes: 15 additions & 0 deletions schema/2.0/modules/cyclonedx-common-2.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,21 @@
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
"description": "An RFC 3339-compliant UTC timestamp using Zulu time (i.e., ending with `\"Z\"`). The format shall be `YYYY-MM-DDTHH:MM:SSZ` or include optional fractional seconds, e.g., `YYYY-MM-DDTHH:MM:SS.sssZ`. Offsets such as `\"+00:00\"` are not allowed."
},
"duration": {
"type": "string",
"title": "Duration",
"$comment": "The pattern only checks the leading designator on purpose. ISO 8601 already defines the full duration syntax, and repeating it as a complex regex here would duplicate the standard. Producers and consumers are expected to follow ISO 8601 in full.",
"pattern": "^P",
"minLength": 3,
"description": "[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration.",
"examples": [
"P1Y",
"P3M",
"P2W",
"P1DT12H",
"PT30M"
]
},
"ordinalVersion": {
"title": "Ordinal Version",
"description": "An ordinal version is a dot-delimited, purely numeric identifier where each segment represents an ordered level in the hierarchy. The segments have no prescribed meaning beyond numeric ordering, allowing straightforward comparison and sorting.",
Expand Down
16 changes: 6 additions & 10 deletions schema/2.0/modules/cyclonedx-risk-2.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,9 @@
"description": "The expected number of events within the timeframe, for frequency-based methods such as the [FAIR](https://www.fairinstitute.org/) loss event frequency. Unlike a probability, a frequency may exceed `1`."
},
"timeframe": {
"type": "string",
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/duration",
"title": "Timeframe",
"description": "The period over which the probability or frequency is assessed, expressed as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration, for example `\"P1Y\"` for one year.",
"examples": ["P1Y", "P1M", "P23DT23H", "PT1M"]
"description": "The period over which the probability or frequency is assessed, expressed as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration, for example `\"P1Y\"` for one year."
},
"range": {
"$ref": "#/$defs/estimateRange",
Expand Down Expand Up @@ -893,17 +892,15 @@
"description": "The number of affected users."
},
"downtime": {
"type": "string",
"pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$",
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/duration",
"description": "The expected downtime, as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration."
},
"dataRecords": {
"type": "integer",
"description": "The number of data records affected."
},
"recovery": {
"type": "string",
"pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$",
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/duration",
"description": "The recovery time, as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration."
},
"financialLossRange": {
Expand Down Expand Up @@ -1602,9 +1599,8 @@
"description": "The party accountable for setting and approving this appetite, such as a board or risk committee. May be an inline party object or a reference to a previously declared party."
},
"horizon": {
"type": "string",
"description": "The time horizon over which this appetite applies, expressed as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration, for example `\"P1Y\"` for one year.",
"examples": ["P1Y", "P1M", "P23DT23H", "PT1M"]
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/duration",
"description": "The time horizon over which this appetite applies, expressed as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) duration, for example `\"P1Y\"` for one year."
},
"nextReview": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"specFormat": "CycloneDX",
"specVersion": "2.0",
"serialNumber": "urn:uuid:4c2a7d3f-9e5b-4f8c-8b21-7d6e5f4a3b2c",
"version": 1,
"blueprints": [
{
"refId": "bp-review-frequency-bare",
"name": "A bare designator is not a duration",
"modelTypes": [
"data-flow"
],
"metadata": {
"validityPeriod": {
"start": "2026-01-01T00:00:00Z",
"reviewFrequency": "P"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"specFormat": "CycloneDX",
"specVersion": "2.0",
"serialNumber": "urn:uuid:5d3b8e4a-1f6c-4a9d-9c32-8e7f6a5b4c3d",
"version": 1,
"risks": {
"risks": [
{
"refId": "risk-timeframe",
"name": "Timeframe that is not a duration",
"statement": "The likelihood timeframe is free text instead of an ISO 8601 duration.",
"inherentRisk": {
"likelihood": { "level": "high", "timeframe": "one year" }
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"specFormat": "CycloneDX",
"specVersion": "2.0",
"serialNumber": "urn:uuid:3b1f6c2e-8d4a-4e7b-9a10-6c5d4e3f2a1b",
"version": 1,
"blueprints": [
{
"refId": "bp-review-frequency",
"name": "Blueprint with a review frequency that has a time part",
"modelTypes": [
"data-flow"
],
"metadata": {
"validityPeriod": {
"start": "2026-01-01T00:00:00Z",
"reviewFrequency": "P1DT12H"
}
}
}
]
}