Add reproducible evaluation and provenance research
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://dtechtechresearch.com/schemas/aaisa-corpus-1.0.0.json",
|
||||
"title": "AAISA Evaluation Corpus Manifest",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "name", "cases"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "1.0.0"},
|
||||
"name": {"type": "string", "minLength": 1},
|
||||
"cases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "artifact", "expected_findings"],
|
||||
"properties": {
|
||||
"id": {"type": "string", "minLength": 1},
|
||||
"artifact": {"type": "string", "minLength": 1},
|
||||
"expected_findings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["rule_id"],
|
||||
"properties": {
|
||||
"rule_id": {"type": "string", "pattern": "^AAISA-[A-Z]+-[0-9]{3}$"},
|
||||
"count": {"type": "integer", "minimum": 1}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://dtechtechresearch.com/schemas/aaisa-evaluation-1.0.0.json",
|
||||
"title": "AAISA Evaluation Result",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "tool", "corpus", "summary", "metrics", "cases"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "1.0.0"},
|
||||
"tool": {
|
||||
"type": "object",
|
||||
"required": ["name", "version"],
|
||||
"properties": {"name": {"const": "AAISA"}, "version": {"type": "string"}},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"corpus": {
|
||||
"type": "object",
|
||||
"required": ["name", "digest", "case_count"],
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
|
||||
"case_count": {"type": "integer", "minimum": 1}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"summary": {
|
||||
"type": "object",
|
||||
"required": ["passed", "failed"],
|
||||
"properties": {
|
||||
"passed": {"type": "integer", "minimum": 0},
|
||||
"failed": {"type": "integer", "minimum": 0}
|
||||
}
|
||||
},
|
||||
"metrics": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#/$defs/metric"}
|
||||
},
|
||||
"cases": {"type": "array", "items": {"$ref": "#/$defs/case"}}
|
||||
},
|
||||
"$defs": {
|
||||
"metric": {
|
||||
"type": "object",
|
||||
"required": ["true_positive", "false_positive", "false_negative", "precision", "recall"],
|
||||
"properties": {
|
||||
"true_positive": {"type": "integer", "minimum": 0},
|
||||
"false_positive": {"type": "integer", "minimum": 0},
|
||||
"false_negative": {"type": "integer", "minimum": 0},
|
||||
"precision": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
|
||||
"recall": {"type": ["number", "null"], "minimum": 0, "maximum": 1}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"case": {
|
||||
"type": "object",
|
||||
"required": ["id", "artifact", "artifact_sha256", "expected", "actual", "errors", "passed"],
|
||||
"properties": {
|
||||
"id": {"type": "string"},
|
||||
"artifact": {"type": "string"},
|
||||
"artifact_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
||||
"expected": {"type": "object", "additionalProperties": {"type": "integer", "minimum": 1}},
|
||||
"actual": {"type": "object", "additionalProperties": {"type": "integer", "minimum": 1}},
|
||||
"errors": {"type": "array"},
|
||||
"passed": {"type": "boolean"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://dtechtechresearch.com/schemas/aaisa-report-1.0.0.json",
|
||||
"title": "AAISA Scan Report",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "tool", "started_at", "completed_at", "root", "summary", "artifacts", "findings", "errors"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "1.0.0"},
|
||||
"tool": {
|
||||
"type": "object",
|
||||
"required": ["name", "version"],
|
||||
"properties": {"name": {"const": "AAISA"}, "version": {"type": "string"}},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"started_at": {"type": "string", "format": "date-time"},
|
||||
"completed_at": {"type": "string", "format": "date-time"},
|
||||
"root": {"type": "string"},
|
||||
"summary": {
|
||||
"type": "object",
|
||||
"required": ["artifact_count", "finding_count", "error_count", "by_severity"],
|
||||
"properties": {
|
||||
"artifact_count": {"type": "integer", "minimum": 0},
|
||||
"finding_count": {"type": "integer", "minimum": 0},
|
||||
"error_count": {"type": "integer", "minimum": 0},
|
||||
"by_severity": {"type": "object"}
|
||||
}
|
||||
},
|
||||
"artifacts": {"type": "array", "items": {"$ref": "#/$defs/artifact"}},
|
||||
"findings": {"type": "array", "items": {"$ref": "#/$defs/finding"}},
|
||||
"errors": {"type": "array", "items": {"$ref": "#/$defs/error"}}
|
||||
},
|
||||
"$defs": {
|
||||
"artifact": {
|
||||
"type": "object",
|
||||
"required": ["path", "kind", "media_type", "size_bytes", "sha256"],
|
||||
"properties": {
|
||||
"path": {"type": "string"},
|
||||
"kind": {"type": "string"},
|
||||
"media_type": {"type": "string"},
|
||||
"size_bytes": {"type": "integer", "minimum": 0},
|
||||
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"finding": {
|
||||
"type": "object",
|
||||
"required": ["rule_id", "title", "severity", "message", "artifact_path", "fingerprint", "tags"],
|
||||
"properties": {
|
||||
"rule_id": {"type": "string", "pattern": "^AAISA-[A-Z]+-[0-9]{3}$"},
|
||||
"title": {"type": "string"},
|
||||
"severity": {"enum": ["info", "low", "medium", "high", "critical"]},
|
||||
"message": {"type": "string"},
|
||||
"artifact_path": {"type": "string"},
|
||||
"line": {"type": ["integer", "null"], "minimum": 1},
|
||||
"column": {"type": ["integer", "null"], "minimum": 1},
|
||||
"evidence": {"type": ["string", "null"]},
|
||||
"remediation": {"type": ["string", "null"]},
|
||||
"tags": {"type": "array", "items": {"type": "string"}},
|
||||
"fingerprint": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": ["path", "error"],
|
||||
"properties": {"path": {"type": "string"}, "error": {"type": "string"}},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://dtechtechresearch.com/schemas/aaisa-rule-catalog-1.0.0.json",
|
||||
"title": "AAISA Rule Catalog",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "rules"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "1.0.0"},
|
||||
"rules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["rule_id", "title", "description", "default_severity", "artifact_kinds", "standards", "references"],
|
||||
"properties": {
|
||||
"rule_id": {"type": "string", "pattern": "^AAISA-[A-Z]+-[0-9]{3}$"},
|
||||
"title": {"type": "string"},
|
||||
"description": {"type": "string"},
|
||||
"default_severity": {"enum": ["info", "low", "medium", "high", "critical"]},
|
||||
"artifact_kinds": {"type": "array", "items": {"type": "string"}},
|
||||
"standards": {"type": "array", "items": {"type": "string"}},
|
||||
"references": {"type": "array", "items": {"type": "string", "format": "uri"}}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user