up
This commit is contained in:
189
datasets/reachability/schema/ground-truth.schema.json
Normal file
189
datasets/reachability/schema/ground-truth.schema.json
Normal file
@@ -0,0 +1,189 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://stellaops.io/schemas/reachability/ground-truth.schema.json",
|
||||
"title": "Reachability Ground Truth",
|
||||
"description": "Ground truth annotations for reachability test samples",
|
||||
"type": "object",
|
||||
"required": ["schema", "sampleId", "generatedAt", "generator", "targets", "entryPoints"],
|
||||
"properties": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"const": "ground-truth-v1"
|
||||
},
|
||||
"sampleId": {
|
||||
"type": "string",
|
||||
"pattern": "^sample:[a-z]+:[a-z0-9-]+:[0-9]+$"
|
||||
},
|
||||
"generatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"generator": {
|
||||
"type": "object",
|
||||
"required": ["name", "version"],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"annotator": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"targets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/target"
|
||||
}
|
||||
},
|
||||
"entryPoints": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/entryPoint"
|
||||
}
|
||||
},
|
||||
"expectedUncertainty": {
|
||||
"$ref": "#/definitions/uncertainty"
|
||||
},
|
||||
"expectedGateDecisions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gateDecision"
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"target": {
|
||||
"type": "object",
|
||||
"required": ["symbolId", "expected", "reasoning"],
|
||||
"properties": {
|
||||
"symbolId": {
|
||||
"type": "string",
|
||||
"pattern": "^sym:[a-z]+:.+"
|
||||
},
|
||||
"display": {
|
||||
"type": "string"
|
||||
},
|
||||
"purl": {
|
||||
"type": "string"
|
||||
},
|
||||
"expected": {
|
||||
"type": "object",
|
||||
"required": ["latticeState", "bucket", "reachable", "confidence"],
|
||||
"properties": {
|
||||
"latticeState": {
|
||||
"type": "string",
|
||||
"enum": ["U", "SR", "SU", "RO", "RU", "CR", "CU", "X"]
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
"enum": ["unknown", "direct", "runtime", "unreachable", "entrypoint"]
|
||||
},
|
||||
"reachable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
},
|
||||
"pathLength": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"path": {
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"reasoning": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"entryPoint": {
|
||||
"type": "object",
|
||||
"required": ["symbolId", "phase", "source"],
|
||||
"properties": {
|
||||
"symbolId": {
|
||||
"type": "string"
|
||||
},
|
||||
"display": {
|
||||
"type": "string"
|
||||
},
|
||||
"phase": {
|
||||
"type": "string",
|
||||
"enum": ["load", "init", "runtime", "main", "fini"]
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"uncertainty": {
|
||||
"type": "object",
|
||||
"required": ["aggregateTier"],
|
||||
"properties": {
|
||||
"states": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["code", "entropy"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": ["U1", "U2", "U3", "U4"]
|
||||
},
|
||||
"entropy": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggregateTier": {
|
||||
"type": "string",
|
||||
"enum": ["T1", "T2", "T3", "T4"]
|
||||
},
|
||||
"riskScore": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"gateDecision": {
|
||||
"type": "object",
|
||||
"required": ["vulnId", "targetSymbol", "requestedStatus", "expectedDecision"],
|
||||
"properties": {
|
||||
"vulnId": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetSymbol": {
|
||||
"type": "string"
|
||||
},
|
||||
"requestedStatus": {
|
||||
"type": "string",
|
||||
"enum": ["affected", "not_affected", "under_investigation", "fixed"]
|
||||
},
|
||||
"expectedDecision": {
|
||||
"type": "string",
|
||||
"enum": ["allow", "block", "warn"]
|
||||
},
|
||||
"expectedBlockedBy": {
|
||||
"type": "string"
|
||||
},
|
||||
"expectedReason": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
94
datasets/reachability/schema/manifest.schema.json
Normal file
94
datasets/reachability/schema/manifest.schema.json
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://stellaops.io/schemas/reachability/manifest.schema.json",
|
||||
"title": "Reachability Sample Manifest",
|
||||
"description": "Metadata for a reachability test sample",
|
||||
"type": "object",
|
||||
"required": ["sampleId", "version", "createdAt", "language", "category", "description"],
|
||||
"properties": {
|
||||
"sampleId": {
|
||||
"type": "string",
|
||||
"pattern": "^sample:[a-z]+:[a-z0-9-]+:[0-9]+$",
|
||||
"description": "Unique sample identifier"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
|
||||
"description": "Sample version (SemVer)"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Creation timestamp (UTC ISO-8601)"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"enum": ["java", "csharp", "javascript", "php", "python", "native", "polyglot"],
|
||||
"description": "Primary language of the sample"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": ["positive", "negative", "contested"],
|
||||
"description": "Ground truth category"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Human-readable description"
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"buildToolchain": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"vulnerabilities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["vulnId", "purl", "affectedSymbol"],
|
||||
"properties": {
|
||||
"vulnId": {
|
||||
"type": "string",
|
||||
"description": "CVE or advisory ID"
|
||||
},
|
||||
"purl": {
|
||||
"type": "string",
|
||||
"description": "Package URL of vulnerable package"
|
||||
},
|
||||
"affectedSymbol": {
|
||||
"type": "string",
|
||||
"description": "Symbol name that is vulnerable"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["path", "hash", "type"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"hash": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user