Files
git.stella-ops.org/bench/reachability-benchmark/benchmark/schemas/benchmark-manifest.schema.json

146 lines
4.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://stellaops.local/reachability/benchmark-manifest.schema.json",
"title": "Reachability Benchmark Kit Manifest",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"kitId",
"version",
"createdAt",
"sourceDateEpoch",
"cases",
"artifacts",
"tools"
],
"properties": {
"schemaVersion": { "type": "string", "pattern": "^1\\.0\\.\\d+$" },
"kitId": { "type": "string", "pattern": "^reachability-benchmark:[A-Za-z0-9._:-]+$" },
"version": { "type": "string" },
"createdAt": { "type": "string", "format": "date-time" },
"sourceDateEpoch": { "type": "integer", "minimum": 0 },
"resourceLimits": {
"type": "object",
"additionalProperties": false,
"properties": {
"cpu": { "type": "string" },
"memory": { "type": "string" }
}
},
"cases": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "language", "hashes", "truth", "sandbox", "redaction"],
"properties": {
"id": { "type": "string" },
"language": { "type": "string" },
"size": { "type": "string", "enum": ["small", "medium", "large"] },
"hashes": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": { "$ref": "#/definitions/hashedPath" },
"binary": { "$ref": "#/definitions/hashedPath" },
"sbom": { "$ref": "#/definitions/hashedPath" },
"entrypoints": { "$ref": "#/definitions/hashedPath" },
"case": { "$ref": "#/definitions/hashedPath" },
"truth": { "$ref": "#/definitions/hashedPath" },
"coverage": { "$ref": "#/definitions/hashedPath" },
"traces": { "$ref": "#/definitions/hashedPath" },
"attestation": { "$ref": "#/definitions/hashedPath" }
},
"required": ["case", "entrypoints", "binary", "sbom", "truth"]
},
"truth": {
"type": "object",
"required": ["label", "confidence"],
"properties": {
"label": { "type": "string", "enum": ["reachable", "unreachable", "unknown"] },
"confidence": { "type": "string", "enum": ["high", "medium", "low"] },
"rationale": { "type": "string" }
}
},
"sandbox": {
"type": "object",
"additionalProperties": false,
"properties": {
"network": { "type": "string", "enum": ["none", "loopback", "local"] },
"privileges": { "type": "string", "enum": ["rootless", "root"] }
}
},
"redaction": {
"type": "object",
"additionalProperties": false,
"properties": {
"pii": { "type": "boolean" },
"policy": { "type": "string" }
}
}
}
}
},
"artifacts": {
"type": "object",
"additionalProperties": false,
"required": ["submissionSchema", "scorer"],
"properties": {
"submissionSchema": { "$ref": "#/definitions/hashedPath" },
"scorer": { "$ref": "#/definitions/hashedPath" },
"baselineSubmissions": {
"type": "array",
"items": {
"type": "object",
"required": ["tool", "version", "submission"],
"additionalProperties": false,
"properties": {
"tool": { "type": "string" },
"version": { "type": "string" },
"submission": { "$ref": "#/definitions/hashedPath" },
"dsse": { "$ref": "#/definitions/hashedPath" }
}
}
}
}
},
"tools": {
"type": "object",
"additionalProperties": false,
"required": ["builder", "validator"],
"properties": {
"builder": { "$ref": "#/definitions/hashedPath" },
"validator": { "$ref": "#/definitions/hashedPath" }
}
},
"signatures": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["type", "keyId", "signature"],
"properties": {
"type": { "type": "string", "enum": ["dsse", "jws-detached"] },
"keyId": { "type": "string" },
"signature": { "type": "string" },
"envelopeDigest": { "type": "string", "pattern": "^[A-Fa-f0-9]{64}$" }
}
}
}
},
"definitions": {
"hashedPath": {
"type": "object",
"additionalProperties": false,
"required": ["path", "sha256"],
"properties": {
"path": { "type": "string" },
"sha256": { "type": "string", "pattern": "^[A-Fa-f0-9]{64}$" },
"dsse": { "type": "string" }
}
}
}
}