49 lines
1.6 KiB
JSON
49 lines
1.6 KiB
JSON
{
|
|
"title": "Empirical security finding validation",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"finding_id": {"type": "string", "minLength": 1},
|
|
"verdict": {"type": "string", "enum": ["confirmed", "refuted", "inconclusive", "blocked"]},
|
|
"commands": {
|
|
"type": "array",
|
|
"maxItems": 30,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"command": {"type": "string", "minLength": 1},
|
|
"exit_code": {"type": "integer"},
|
|
"observation": {"type": "string", "minLength": 1}
|
|
},
|
|
"required": ["command", "exit_code", "observation"]
|
|
}
|
|
},
|
|
"artifacts": {
|
|
"type": "array",
|
|
"maxItems": 30,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"relative_path": {"type": "string", "minLength": 1},
|
|
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
|
},
|
|
"required": ["relative_path", "sha256"]
|
|
}
|
|
},
|
|
"limitations": {"type": "array", "items": {"type": "string"}, "maxItems": 30}
|
|
},
|
|
"required": ["finding_id", "verdict", "commands", "artifacts", "limitations"],
|
|
"allOf": [
|
|
{
|
|
"if": {"properties": {"verdict": {"enum": ["confirmed", "refuted"]}}, "required": ["verdict"]},
|
|
"then": {"properties": {"commands": {"minItems": 1}}}
|
|
},
|
|
{
|
|
"if": {"properties": {"verdict": {"const": "blocked"}}, "required": ["verdict"]},
|
|
"then": {"properties": {"limitations": {"minItems": 1}}}
|
|
}
|
|
]
|
|
}
|