Refactor code structure for improved readability and maintainability; optimize performance in key functions.
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://stellaops.io/schemas/evidence-index/v1",
|
||||
"title": "StellaOps Evidence Index",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"indexId",
|
||||
"schemaVersion",
|
||||
"verdict",
|
||||
"sboms",
|
||||
"attestations",
|
||||
"toolChain",
|
||||
"runManifestDigest",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"indexId": { "type": "string" },
|
||||
"schemaVersion": { "type": "string" },
|
||||
"verdict": { "$ref": "#/$defs/verdictReference" },
|
||||
"sboms": { "type": "array", "items": { "$ref": "#/$defs/sbomEvidence" } },
|
||||
"attestations": { "type": "array", "items": { "$ref": "#/$defs/attestationEvidence" } },
|
||||
"vexDocuments": { "type": "array", "items": { "$ref": "#/$defs/vexEvidence" } },
|
||||
"reachabilityProofs": { "type": "array", "items": { "$ref": "#/$defs/reachabilityEvidence" } },
|
||||
"unknowns": { "type": "array", "items": { "$ref": "#/$defs/unknownEvidence" } },
|
||||
"toolChain": { "$ref": "#/$defs/toolChainEvidence" },
|
||||
"runManifestDigest": { "type": "string" },
|
||||
"createdAt": { "type": "string", "format": "date-time" },
|
||||
"indexDigest": { "type": ["string", "null"] }
|
||||
},
|
||||
"$defs": {
|
||||
"verdictReference": {
|
||||
"type": "object",
|
||||
"required": ["verdictId", "digest", "outcome"],
|
||||
"properties": {
|
||||
"verdictId": { "type": "string" },
|
||||
"digest": { "type": "string" },
|
||||
"outcome": { "enum": ["Pass", "Fail", "Warn", "Unknown"] },
|
||||
"policyVersion": { "type": ["string", "null"] }
|
||||
}
|
||||
},
|
||||
"sbomEvidence": {
|
||||
"type": "object",
|
||||
"required": ["sbomId", "format", "digest", "componentCount", "generatedAt"],
|
||||
"properties": {
|
||||
"sbomId": { "type": "string" },
|
||||
"format": { "type": "string" },
|
||||
"digest": { "type": "string" },
|
||||
"uri": { "type": ["string", "null"] },
|
||||
"componentCount": { "type": "integer" },
|
||||
"generatedAt": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"attestationEvidence": {
|
||||
"type": "object",
|
||||
"required": ["attestationId", "type", "digest", "signerKeyId", "signatureValid", "signedAt"],
|
||||
"properties": {
|
||||
"attestationId": { "type": "string" },
|
||||
"type": { "type": "string" },
|
||||
"digest": { "type": "string" },
|
||||
"signerKeyId": { "type": "string" },
|
||||
"signatureValid": { "type": "boolean" },
|
||||
"signedAt": { "type": "string", "format": "date-time" },
|
||||
"rekorLogIndex": { "type": ["string", "null"] }
|
||||
}
|
||||
},
|
||||
"vexEvidence": {
|
||||
"type": "object",
|
||||
"required": ["vexId", "format", "digest", "source", "statementCount", "affectedVulnerabilities"],
|
||||
"properties": {
|
||||
"vexId": { "type": "string" },
|
||||
"format": { "type": "string" },
|
||||
"digest": { "type": "string" },
|
||||
"source": { "type": "string" },
|
||||
"statementCount": { "type": "integer" },
|
||||
"affectedVulnerabilities": { "type": "array", "items": { "type": "string" } }
|
||||
}
|
||||
},
|
||||
"reachabilityEvidence": {
|
||||
"type": "object",
|
||||
"required": ["proofId", "vulnerabilityId", "componentPurl", "status", "callPath", "digest"],
|
||||
"properties": {
|
||||
"proofId": { "type": "string" },
|
||||
"vulnerabilityId": { "type": "string" },
|
||||
"componentPurl": { "type": "string" },
|
||||
"status": { "enum": ["Reachable", "NotReachable", "Inconclusive", "NotAnalyzed"] },
|
||||
"entryPoint": { "type": ["string", "null"] },
|
||||
"callPath": { "type": "array", "items": { "type": "string" } },
|
||||
"digest": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"unknownEvidence": {
|
||||
"type": "object",
|
||||
"required": ["unknownId", "reasonCode", "description", "severity"],
|
||||
"properties": {
|
||||
"unknownId": { "type": "string" },
|
||||
"reasonCode": { "type": "string" },
|
||||
"description": { "type": "string" },
|
||||
"componentPurl": { "type": ["string", "null"] },
|
||||
"vulnerabilityId": { "type": ["string", "null"] },
|
||||
"severity": { "enum": ["Low", "Medium", "High", "Critical"] }
|
||||
}
|
||||
},
|
||||
"toolChainEvidence": {
|
||||
"type": "object",
|
||||
"required": ["scannerVersion", "sbomGeneratorVersion", "reachabilityEngineVersion", "attestorVersion", "policyEngineVersion", "additionalTools"],
|
||||
"properties": {
|
||||
"scannerVersion": { "type": "string" },
|
||||
"sbomGeneratorVersion": { "type": "string" },
|
||||
"reachabilityEngineVersion": { "type": "string" },
|
||||
"attestorVersion": { "type": "string" },
|
||||
"policyEngineVersion": { "type": "string" },
|
||||
"additionalTools": { "type": "object" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user