144 lines
6.1 KiB
JSON
144 lines
6.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://crank.local/schemas/capability-baseline.schema.json",
|
|
"title": "Crank Community Capability Baseline Manifest",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"baseline_version",
|
|
"artifacts"
|
|
],
|
|
"properties": {
|
|
"schema_version": {
|
|
"const": 1
|
|
},
|
|
"baseline_version": {
|
|
"type": "string",
|
|
"pattern": "^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[1-9][0-9]*$"
|
|
},
|
|
"artifacts": {
|
|
"type": "array",
|
|
"minItems": 5,
|
|
"maxItems": 5,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"$ref": "#/$defs/artifact"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"artifact": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"kind",
|
|
"path",
|
|
"sha256"
|
|
],
|
|
"properties": {
|
|
"kind": {
|
|
"enum": [
|
|
"inventory",
|
|
"required_surfaces",
|
|
"taxonomy",
|
|
"checklist",
|
|
"results"
|
|
]
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 1024,
|
|
"pattern": "^(?!/)(?!.*//)(?!.*(?:^|/)\\.\\.?($|/))(?!.*\\\\).+$"
|
|
},
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
}
|
|
}
|
|
},
|
|
"taxonomy": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["baseline_version", "implementation_statuses", "execution_verdicts", "evidence_modes", "full_pass"],
|
|
"properties": {
|
|
"baseline_version": {"type": "string", "pattern": "^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[1-9][0-9]*$"},
|
|
"implementation_statuses": {"type": "array", "minItems": 4, "maxItems": 4, "uniqueItems": true, "items": {"enum": ["implemented", "planned", "gap", "blocked"]}},
|
|
"execution_verdicts": {"type": "array", "minItems": 6, "maxItems": 6, "uniqueItems": true, "items": {"enum": ["pass", "fail", "blocked", "skipped", "flaky", "not_run"]}},
|
|
"evidence_modes": {"type": "array", "minItems": 2, "maxItems": 2, "uniqueItems": true, "items": {"enum": ["automated", "manual_only"]}},
|
|
"manual_only_rule": {"type": "string", "minLength": 1, "maxLength": 2048},
|
|
"non_pass_rule": {"type": "string", "minLength": 1, "maxLength": 2048},
|
|
"full_pass": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["implementation_status", "execution_verdict", "evidence_mode"],
|
|
"properties": {
|
|
"implementation_status": {"const": "implemented"},
|
|
"execution_verdict": {"const": "pass"},
|
|
"evidence_mode": {"const": "automated"}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"run": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "command_id", "flow_ids", "execution_verdict", "evidence_mode", "accepted", "source_report_sha256", "source_revision", "environment_class", "collector"],
|
|
"properties": {
|
|
"id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
"command_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
"flow_ids": {"type": "array", "minItems": 1, "maxItems": 1000, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 128}},
|
|
"execution_verdict": {"enum": ["pass", "fail", "blocked", "skipped", "flaky", "not_run"]},
|
|
"evidence_mode": {"enum": ["automated", "manual_only"]},
|
|
"accepted": {"type": "boolean"},
|
|
"source_report_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"source_revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
|
|
"environment_class": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"collector": {"const": "capability-baseline-collector-v1"},
|
|
"summary": {"type": "object", "maxProperties": 16},
|
|
"safe_outcome": {"type": "object", "maxProperties": 16}
|
|
}
|
|
},
|
|
"defect": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "severity", "steps", "contract", "owner", "flow_ids", "next_action"],
|
|
"properties": {
|
|
"id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
"severity": {"enum": ["Critical", "High", "Medium", "Low"]},
|
|
"steps": {"type": "array", "minItems": 1, "maxItems": 20, "items": {"type": "string", "minLength": 1, "maxLength": 1024}},
|
|
"contract": {"type": "string", "minLength": 1, "maxLength": 2048},
|
|
"owner": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
"flow_ids": {"type": "array", "minItems": 1, "maxItems": 1000, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 128}},
|
|
"next_action": {"type": "string", "minLength": 1, "maxLength": 2048}
|
|
}
|
|
},
|
|
"manual_result": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["check_id", "evidence_mode", "execution_verdict", "flow_ids", "next_evidence"],
|
|
"properties": {
|
|
"check_id": {"type": "string", "pattern": "^UI-[0-9]{2}$"},
|
|
"evidence_mode": {"const": "manual_only"},
|
|
"execution_verdict": {"enum": ["pass", "fail", "blocked", "skipped", "flaky", "not_run"]},
|
|
"flow_ids": {"type": "array", "minItems": 1, "maxItems": 1000, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 128}},
|
|
"next_evidence": {"type": "string", "minLength": 1, "maxLength": 2048}
|
|
}
|
|
},
|
|
"results": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["baseline_version", "source_revision", "environment_class", "runs", "manual_results", "defects"],
|
|
"properties": {
|
|
"baseline_version": {"type": "string", "maxLength": 32},
|
|
"source_revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
|
|
"environment_class": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"runs": {"type": "array", "maxItems": 1000, "items": {"$ref": "#/$defs/run"}},
|
|
"manual_results": {"type": "array", "maxItems": 1000, "items": {"$ref": "#/$defs/manual_result"}},
|
|
"defects": {"type": "array", "maxItems": 1000, "items": {"$ref": "#/$defs/defect"}}
|
|
}
|
|
}
|
|
}
|
|
}
|