refactor: validate generated evidence artifacts
This commit is contained in:
@@ -1,51 +1,27 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "number",
|
||||
"const": 1
|
||||
},
|
||||
"buildId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"commitSha": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"releaseId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"moduleInventoryHash": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"generatedAt": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"buildContext": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"nodeVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"packageManagerVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"runnerImage": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"sourceDateEpoch": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
@@ -59,37 +35,53 @@
|
||||
"runnerImage",
|
||||
"sourceDateEpoch"
|
||||
],
|
||||
"additionalProperties": false
|
||||
"type": "object"
|
||||
},
|
||||
"buildId": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"commitSha": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"generatedAt": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"moduleInventoryHash": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"outputs": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"directory": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"viteManifest": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"moduleInventory": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"routeChunks": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"propertyNames": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"runtimeConfigSchema": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"viteManifest": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -99,7 +91,15 @@
|
||||
"routeChunks",
|
||||
"runtimeConfigSchema"
|
||||
],
|
||||
"additionalProperties": false
|
||||
"type": "object"
|
||||
},
|
||||
"releaseId": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"schemaVersion": {
|
||||
"const": 1,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -112,5 +112,5 @@
|
||||
"buildContext",
|
||||
"outputs"
|
||||
],
|
||||
"additionalProperties": false
|
||||
"type": "object"
|
||||
}
|
||||
|
||||
@@ -1,31 +1,49 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://clean-architecture-frontend.local/schemas/dependency-inventory.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"packageManager",
|
||||
"lockfileSha256",
|
||||
"dependencyCount",
|
||||
"directDependencyCount",
|
||||
"dependencies"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": 2 },
|
||||
"packageManager": { "type": "string", "minLength": 1 },
|
||||
"lockfileSha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"dependencyCount": { "type": "integer", "minimum": 1 },
|
||||
"directDependencyCount": { "type": "integer", "minimum": 1 },
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"dependencies": {
|
||||
"items": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"direct": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"integrity": {
|
||||
"pattern": "^sha512-",
|
||||
"type": "string"
|
||||
},
|
||||
"license": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"optional": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"scope": {
|
||||
"enum": [
|
||||
"production",
|
||||
"development"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version",
|
||||
@@ -36,25 +54,40 @@
|
||||
"integrity",
|
||||
"dependencies"
|
||||
],
|
||||
"properties": {
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"version": { "type": "string", "minLength": 1 },
|
||||
"direct": { "type": "boolean" },
|
||||
"scope": {
|
||||
"enum": ["production", "development"]
|
||||
},
|
||||
"optional": { "type": "boolean" },
|
||||
"license": { "type": "string", "minLength": 1 },
|
||||
"integrity": {
|
||||
"type": "string",
|
||||
"pattern": "^sha512-"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"dependencyCount": {
|
||||
"maximum": 9007199254740991,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"directDependencyCount": {
|
||||
"maximum": 9007199254740991,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"lockfileSha256": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"packageManager": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"schemaVersion": {
|
||||
"const": 2,
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"packageManager",
|
||||
"lockfileSha256",
|
||||
"dependencyCount",
|
||||
"directDependencyCount",
|
||||
"dependencies"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,257 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"$defs": {
|
||||
"__schema0": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/$defs/__schema0"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/__schema0"
|
||||
},
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"__schema1": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/$defs/__schema1"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/__schema1"
|
||||
},
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"__schema2": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/$defs/__schema2"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/__schema2"
|
||||
},
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"baselineDigest": {
|
||||
"anyOf": [
|
||||
{
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"compatibility": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"changes": {
|
||||
"items": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"after": {
|
||||
"$ref": "#/$defs/__schema1"
|
||||
},
|
||||
"before": {
|
||||
"$ref": "#/$defs/__schema0"
|
||||
},
|
||||
"changeId": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"impact": {
|
||||
"enum": [
|
||||
"none",
|
||||
"additive",
|
||||
"behavior-change",
|
||||
"breaking"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"registryId": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"rowName": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"changeId",
|
||||
"registryId",
|
||||
"rowName",
|
||||
"field",
|
||||
"kind",
|
||||
"impact"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"impact": {
|
||||
"enum": [
|
||||
"not-evaluated",
|
||||
"none",
|
||||
"additive",
|
||||
"behavior-change",
|
||||
"breaking"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"impact",
|
||||
"changes"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"currentDigest": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"failures": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"generatedAt": {
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"type": "string"
|
||||
},
|
||||
"registries": {
|
||||
"items": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"contract": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/__schema2"
|
||||
},
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"owner": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"registryId": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"rowCount": {
|
||||
"maximum": 9007199254740991,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"rows": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/__schema2"
|
||||
},
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"source": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"registryId",
|
||||
"owner",
|
||||
"source",
|
||||
"rowCount",
|
||||
"contract",
|
||||
"rows"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"schemaVersion": {
|
||||
"const": 2,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"generatedAt",
|
||||
@@ -10,45 +261,5 @@
|
||||
"failures",
|
||||
"registries"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": 2 },
|
||||
"generatedAt": { "type": "string", "format": "date-time" },
|
||||
"baselineDigest": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"currentDigest": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"compatibility": {
|
||||
"type": "object",
|
||||
"required": ["impact", "changes"],
|
||||
"properties": {
|
||||
"impact": {
|
||||
"enum": ["none", "additive", "behavior-change", "breaking"]
|
||||
},
|
||||
"changes": { "type": "array" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"failures": { "type": "array", "maxItems": 0 },
|
||||
"registries": {
|
||||
"type": "array",
|
||||
"minItems": 11,
|
||||
"maxItems": 11,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"registryId",
|
||||
"owner",
|
||||
"source",
|
||||
"rowCount",
|
||||
"contract",
|
||||
"rows"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"type": "object"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,130 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://clean-architecture-frontend.local/schemas/supply-chain-verification.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"dependencyDiff": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"added": {
|
||||
"items": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"changed": {
|
||||
"items": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"removed": {
|
||||
"items": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"upgrades": {
|
||||
"items": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"from": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"from",
|
||||
"to"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"added",
|
||||
"removed",
|
||||
"changed",
|
||||
"upgrades"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"distSha256": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"failures": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"highRiskReview": {
|
||||
"items": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"localStatus": {
|
||||
"enum": [
|
||||
"PASS",
|
||||
"FAIL"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"lockfileSha256": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"promotionStatus": {
|
||||
"enum": [
|
||||
"PASS",
|
||||
"FAIL_UNVERIFIED"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"provenanceAttestationStatus": {
|
||||
"enum": [
|
||||
"PASS",
|
||||
"FAIL_UNVERIFIED"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"sbomSha256": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"schemaVersion": {
|
||||
"const": 1,
|
||||
"type": "number"
|
||||
},
|
||||
"sourceSetSha256": {
|
||||
"pattern": "^[a-f0-9]{64}$",
|
||||
"type": "string"
|
||||
},
|
||||
"vulnerabilityStatus": {
|
||||
"enum": [
|
||||
"PASS",
|
||||
"FAIL",
|
||||
"FAIL_UNVERIFIED"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"localStatus",
|
||||
@@ -17,39 +139,5 @@
|
||||
"provenanceAttestationStatus",
|
||||
"failures"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": 1 },
|
||||
"localStatus": { "enum": ["PASS", "FAIL"] },
|
||||
"promotionStatus": {
|
||||
"enum": ["PASS", "FAIL_UNVERIFIED"]
|
||||
},
|
||||
"lockfileSha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"sourceSetSha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"distSha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"sbomSha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"dependencyDiff": { "type": "object" },
|
||||
"highRiskReview": { "type": "array" },
|
||||
"vulnerabilityStatus": {
|
||||
"enum": ["PASS", "FAIL", "FAIL_UNVERIFIED"]
|
||||
},
|
||||
"provenanceAttestationStatus": {
|
||||
"enum": ["PASS", "FAIL_UNVERIFIED"]
|
||||
},
|
||||
"failures": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
}
|
||||
"type": "object"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user