644 lines
16 KiB
JSON
644 lines
16 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Reportist structured report version 1",
|
|
"type": "object",
|
|
"properties": {
|
|
"schema_version": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"subtitle": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$(?![\\s\\S])"
|
|
},
|
|
"report_type": {
|
|
"enum": [
|
|
"technical",
|
|
"briefing"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"severity": {
|
|
"enum": [
|
|
"info",
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"critical",
|
|
"warning",
|
|
"ok",
|
|
"success",
|
|
"unanalysed"
|
|
]
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Date": {
|
|
"type": "string",
|
|
"format": "date"
|
|
},
|
|
"Author": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"Date",
|
|
"Author"
|
|
],
|
|
"additionalProperties": {
|
|
"type": [
|
|
"string",
|
|
"number",
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"branding": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\:\\x00-\\x1f]+$(?![\\s\\S])"
|
|
},
|
|
"theme": {
|
|
"oneOf": [
|
|
{"type": "string", "enum": ["default", "teal"]},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"font": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"mono_font": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"ink": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"muted": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"line": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"paper_soft": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"accent": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"info": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"warning": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"critical": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
},
|
|
"success": {
|
|
"type": "string",
|
|
"pattern": "^#[0-9a-fA-F]{6}$(?![\\s\\S])"
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false
|
|
},
|
|
"summary": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"metrics": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"label": { "type": "string", "pattern": "\\S" },
|
|
"value": { "type": ["string", "number" ] },
|
|
"tone": {
|
|
"enum": ["info", "low", "medium", "high", "critical", "warning", "ok", "success", "unanalysed"]
|
|
}
|
|
},
|
|
"required": ["label", "value"],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 4
|
|
},
|
|
"closing": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"timeline": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"time": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"event": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"notes": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"time",
|
|
"event"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"findings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$(?![\\s\\S])"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"severity": {
|
|
"enum": [
|
|
"info",
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"critical",
|
|
"warning",
|
|
"ok",
|
|
"success",
|
|
"unanalysed"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"evidence": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"assessment": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 100
|
|
},
|
|
"resolution_steps": {
|
|
"type": "array",
|
|
"items": {"type": "string", "pattern": "\\S"}
|
|
},
|
|
"reference_url": {
|
|
"type": "string",
|
|
"pattern": "^https://"
|
|
},
|
|
"reference_label": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"evidence_refs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artifact": {
|
|
"type": "string",
|
|
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\:\\x00-\\x1f]+$(?![\\s\\S])"
|
|
},
|
|
"pointer": {
|
|
"type": "string",
|
|
"pattern": "^(?:/(?:[^~/]|~[01])*)*$(?![\\s\\S])"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"artifact",
|
|
"pointer"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"required": [
|
|
"title"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"sections": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/section"
|
|
}
|
|
},
|
|
"appendices": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/section"
|
|
}
|
|
},
|
|
"actions_title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"actions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"commands": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"title"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"provenance": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sources": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artifact": {
|
|
"type": "string",
|
|
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\:\\x00-\\x1f]+$(?![\\s\\S])"
|
|
},
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{64}$(?![\\s\\S])"
|
|
},
|
|
"schema_version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"producer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"version"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": [
|
|
"artifact"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"rendered_by": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"version"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": [
|
|
"schema_version",
|
|
"title",
|
|
"metadata"
|
|
],
|
|
"additionalProperties": false,
|
|
"$defs": {
|
|
"section": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/block"
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"page_break_before": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"content"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"block": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "text"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "bullets"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"items"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "steps"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"items"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "callout"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"kind": {
|
|
"enum": [
|
|
"info",
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"critical",
|
|
"warning",
|
|
"ok",
|
|
"success",
|
|
"unanalysed"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "code"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "card"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"tone": {
|
|
"enum": ["info", "low", "medium", "high", "critical", "warning", "ok", "success", "unanalysed"]
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/block"
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"title",
|
|
"content"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"const": "subsection"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"pattern": "\\S"
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/block"
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"title",
|
|
"content"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {"const": "table"},
|
|
"columns": {"type": "array", "items": {"type": "string", "pattern": "\\S"}, "minItems": 2, "maxItems": 5},
|
|
"rows": {"type": "array", "items": {"type": "array", "items": {"type": "string"}, "minItems": 2, "maxItems": 5}, "minItems": 1},
|
|
"note": {"type": "string", "pattern": "\\S"}
|
|
},
|
|
"required": ["type", "columns", "rows"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {"const": "progress"},
|
|
"label": {"type": "string", "pattern": "\\S"},
|
|
"value": {"type": "number", "minimum": 0, "maximum": 100},
|
|
"tone": {"enum": ["info", "low", "medium", "high", "critical", "warning", "ok", "success", "unanalysed"]},
|
|
"note": {"type": "string", "pattern": "\\S"}
|
|
},
|
|
"required": ["type", "label", "value"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {"const": "finding_list"},
|
|
"items": {"type": "array", "items": {"$ref": "#/properties/findings/items"}},
|
|
"compact": {"type": "boolean"}
|
|
},
|
|
"required": ["type", "items"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {"const": "references"},
|
|
"items": {"type": "array", "minItems": 1, "items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"label": {"type": "string", "pattern": "\\S"},
|
|
"url": {"type": "string", "pattern": "^https://"}
|
|
},
|
|
"required": ["label", "url"],
|
|
"additionalProperties": false
|
|
}}
|
|
},
|
|
"required": ["type", "items"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|