fix(hololake): anchor foundation evidence schema

This commit is contained in:
冰朔 2026-09-10 01:06:59 +08:00
commit 8c93c6d705

View file

@ -5,7 +5,7 @@
"$defs":{ "$defs":{
"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}, "sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},
"timestamp":{"type":"string","format":"date-time"}, "timestamp":{"type":"string","format":"date-time"},
"evidenceRef":{"type":"object","additionalProperties":false,"required":["evidence_id","uri","sha256","captured_at","availability","privacy","redaction"],"properties":{"evidence_id":{"type":"string","minLength":1},"uri":{"type":"string","minLength":1},"sha256":{"$ref":"#/$defs/sha256"},"captured_at":{"$ref":"#/$defs/timestamp"},"availability":{"enum":["AVAILABLE","MISSING","REVOKED"]},"privacy":{"enum":["PUBLIC","SYSTEM","PRIVATE"]},"redaction":{"enum":["NONE","METADATA_ONLY","SANITIZED"]}}}, "evidenceRef":{"$anchor":"evidenceRef","type":"object","additionalProperties":false,"required":["evidence_id","uri","sha256","captured_at","availability","privacy","redaction"],"properties":{"evidence_id":{"type":"string","minLength":1},"uri":{"type":"string","minLength":1},"sha256":{"$ref":"#/$defs/sha256"},"captured_at":{"$ref":"#/$defs/timestamp"},"availability":{"enum":["AVAILABLE","MISSING","REVOKED"]},"privacy":{"enum":["PUBLIC","SYSTEM","PRIVATE"]},"redaction":{"enum":["NONE","METADATA_ONLY","SANITIZED"]}}},
"privateCheckpoint":{"$anchor":"privateCheckpoint","type":"object","additionalProperties":false,"required":["schema","persona_subject_id","private_commit_sha","tree_sha256","public_snapshot_sha256","checkpoint_label","created_at","authority_granted"],"properties":{"schema":{"const":"hololake.private-checkpoint/v1"},"persona_subject_id":{"type":"string","minLength":1},"private_commit_sha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"tree_sha256":{"$ref":"#/$defs/sha256"},"public_snapshot_sha256":{"$ref":"#/$defs/sha256"},"checkpoint_label":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"},"created_at":{"$ref":"#/$defs/timestamp"},"authority_granted":{"const":false}}}, "privateCheckpoint":{"$anchor":"privateCheckpoint","type":"object","additionalProperties":false,"required":["schema","persona_subject_id","private_commit_sha","tree_sha256","public_snapshot_sha256","checkpoint_label","created_at","authority_granted"],"properties":{"schema":{"const":"hololake.private-checkpoint/v1"},"persona_subject_id":{"type":"string","minLength":1},"private_commit_sha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"tree_sha256":{"$ref":"#/$defs/sha256"},"public_snapshot_sha256":{"$ref":"#/$defs/sha256"},"checkpoint_label":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"},"created_at":{"$ref":"#/$defs/timestamp"},"authority_granted":{"const":false}}},
"moduleCandidate":{"$anchor":"moduleCandidate","type":"object","additionalProperties":false,"required":["schema","module_id","version","manifest_uri","manifest_sha256","source_uri","source_sha256","artifact_uri","artifact_sha256","submitted_at","authority_granted"],"properties":{"schema":{"const":"hololake.module-candidate/v1"},"module_id":{"type":"string"},"version":{"type":"string"},"manifest_uri":{"type":"string"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"source_uri":{"type":"string"},"source_sha256":{"$ref":"#/$defs/sha256"},"artifact_uri":{"type":"string"},"artifact_sha256":{"$ref":"#/$defs/sha256"},"submitted_at":{"$ref":"#/$defs/timestamp"},"authority_granted":{"const":false}}}, "moduleCandidate":{"$anchor":"moduleCandidate","type":"object","additionalProperties":false,"required":["schema","module_id","version","manifest_uri","manifest_sha256","source_uri","source_sha256","artifact_uri","artifact_sha256","submitted_at","authority_granted"],"properties":{"schema":{"const":"hololake.module-candidate/v1"},"module_id":{"type":"string"},"version":{"type":"string"},"manifest_uri":{"type":"string"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"source_uri":{"type":"string"},"source_sha256":{"$ref":"#/$defs/sha256"},"artifact_uri":{"type":"string"},"artifact_sha256":{"$ref":"#/$defs/sha256"},"submitted_at":{"$ref":"#/$defs/timestamp"},"authority_granted":{"const":false}}},
"moduleValidationReceipt":{"$anchor":"moduleValidationReceipt","type":"object","additionalProperties":false,"required":["schema","receipt_id","module_id","version","manifest_sha256","source_sha256","artifact_sha256","policy_sha256","test_receipt_sha256","outcome","errors","validated_at","receipt_sha256","authority_granted"],"properties":{"schema":{"const":"hololake.module-validation-receipt/v1"},"receipt_id":{"type":"string"},"module_id":{"type":"string"},"version":{"type":"string"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"source_sha256":{"$ref":"#/$defs/sha256"},"artifact_sha256":{"$ref":"#/$defs/sha256"},"policy_sha256":{"$ref":"#/$defs/sha256"},"test_receipt_sha256":{"$ref":"#/$defs/sha256"},"outcome":{"enum":["PASS","REJECT"]},"errors":{"type":"array","items":{"type":"string"}},"validated_at":{"$ref":"#/$defs/timestamp"},"receipt_sha256":{"$ref":"#/$defs/sha256"},"authority_granted":{"const":false}}}, "moduleValidationReceipt":{"$anchor":"moduleValidationReceipt","type":"object","additionalProperties":false,"required":["schema","receipt_id","module_id","version","manifest_sha256","source_sha256","artifact_sha256","policy_sha256","test_receipt_sha256","outcome","errors","validated_at","receipt_sha256","authority_granted"],"properties":{"schema":{"const":"hololake.module-validation-receipt/v1"},"receipt_id":{"type":"string"},"module_id":{"type":"string"},"version":{"type":"string"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"source_sha256":{"$ref":"#/$defs/sha256"},"artifact_sha256":{"$ref":"#/$defs/sha256"},"policy_sha256":{"$ref":"#/$defs/sha256"},"test_receipt_sha256":{"$ref":"#/$defs/sha256"},"outcome":{"enum":["PASS","REJECT"]},"errors":{"type":"array","items":{"type":"string"}},"validated_at":{"$ref":"#/$defs/timestamp"},"receipt_sha256":{"$ref":"#/$defs/sha256"},"authority_granted":{"const":false}}},