From 009796d457e7f3f2694b04a1ce972bd41f102085 Mon Sep 17 00:00:00 2001 From: chaosinthecrd Date: Fri, 10 May 2024 09:26:27 +0100 Subject: [PATCH] adding indentation for the schemas Signed-off-by: chaosinthecrd --- schemagen/aws.json | 97 ++++- schemagen/command-run.json | 87 +++- schemagen/environment.json | 33 +- schemagen/gcp-iit.json | 66 ++- schemagen/git.json | 132 +++++- schemagen/github.json | 58 ++- schemagen/gitlab.json | 70 +++- schemagen/jwt.json | 485 +++++++++++++++++++++- schemagen/link.json | 88 +++- schemagen/material.json | 12 +- schemagen/maven.json | 62 ++- schemagen/oci.json | 85 +++- schemagen/policyverify.json | 73 +++- schemagen/product.json | 12 +- schemagen/sarif.json | 786 +++++++++++++++++++++++++++++++++++- schemagen/schema.go | 13 +- schemagen/slsa.json | 160 +++++++- 17 files changed, 2301 insertions(+), 18 deletions(-) diff --git a/schemagen/aws.json b/schemagen/aws.json index 80b1eadf..6872c348 100644 --- a/schemagen/aws.json +++ b/schemagen/aws.json @@ -1 +1,96 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"devpayProductCodes":{"items":{"type":"string"},"type":"array"},"marketplaceProductCodes":{"items":{"type":"string"},"type":"array"},"availabilityZone":{"type":"string"},"privateIp":{"type":"string"},"version":{"type":"string"},"region":{"type":"string"},"instanceId":{"type":"string"},"billingProducts":{"items":{"type":"string"},"type":"array"},"instanceType":{"type":"string"},"accountId":{"type":"string"},"pendingTime":{"type":"string","format":"date-time"},"imageId":{"type":"string"},"kernelId":{"type":"string"},"ramdiskId":{"type":"string"},"architecture":{"type":"string"},"rawiid":{"type":"string"},"rawsig":{"type":"string"},"publickey":{"type":"string"}},"additionalProperties":false,"type":"object","required":["devpayProductCodes","marketplaceProductCodes","availabilityZone","privateIp","version","region","instanceId","billingProducts","instanceType","accountId","pendingTime","imageId","kernelId","ramdiskId","architecture","rawiid","rawsig","publickey"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "devpayProductCodes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "marketplaceProductCodes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "availabilityZone": { + "type": "string" + }, + "privateIp": { + "type": "string" + }, + "version": { + "type": "string" + }, + "region": { + "type": "string" + }, + "instanceId": { + "type": "string" + }, + "billingProducts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "instanceType": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "pendingTime": { + "type": "string", + "format": "date-time" + }, + "imageId": { + "type": "string" + }, + "kernelId": { + "type": "string" + }, + "ramdiskId": { + "type": "string" + }, + "architecture": { + "type": "string" + }, + "rawiid": { + "type": "string" + }, + "rawsig": { + "type": "string" + }, + "publickey": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "devpayProductCodes", + "marketplaceProductCodes", + "availabilityZone", + "privateIp", + "version", + "region", + "instanceId", + "billingProducts", + "instanceType", + "accountId", + "pendingTime", + "imageId", + "kernelId", + "ramdiskId", + "architecture", + "rawiid", + "rawsig", + "publickey" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/command-run.json b/schemagen/command-run.json index 8e414405..d4269f7b 100644 --- a/schemagen/command-run.json +++ b/schemagen/command-run.json @@ -1 +1,86 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/CommandRun","$defs":{"CommandRun":{"properties":{"cmd":{"items":{"type":"string"},"type":"array"},"stdout":{"type":"string"},"stderr":{"type":"string"},"exitcode":{"type":"integer"},"processes":{"items":{"$ref":"#/$defs/ProcessInfo"},"type":"array"}},"additionalProperties":false,"type":"object","required":["cmd","exitcode"]},"DigestSet":{"additionalProperties":{"type":"string"},"type":"object"},"ProcessInfo":{"properties":{"program":{"type":"string"},"processid":{"type":"integer"},"parentpid":{"type":"integer"},"programdigest":{"$ref":"#/$defs/DigestSet"},"comm":{"type":"string"},"cmdline":{"type":"string"},"exedigest":{"$ref":"#/$defs/DigestSet"},"openedfiles":{"additionalProperties":{"$ref":"#/$defs/DigestSet"},"type":"object"},"environ":{"type":"string"},"specbypassisvuln":{"type":"boolean"}},"additionalProperties":false,"type":"object","required":["processid","parentpid"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/CommandRun", + "$defs": { + "CommandRun": { + "properties": { + "cmd": { + "items": { + "type": "string" + }, + "type": "array" + }, + "stdout": { + "type": "string" + }, + "stderr": { + "type": "string" + }, + "exitcode": { + "type": "integer" + }, + "processes": { + "items": { + "$ref": "#/$defs/ProcessInfo" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "cmd", + "exitcode" + ] + }, + "DigestSet": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "ProcessInfo": { + "properties": { + "program": { + "type": "string" + }, + "processid": { + "type": "integer" + }, + "parentpid": { + "type": "integer" + }, + "programdigest": { + "$ref": "#/$defs/DigestSet" + }, + "comm": { + "type": "string" + }, + "cmdline": { + "type": "string" + }, + "exedigest": { + "$ref": "#/$defs/DigestSet" + }, + "openedfiles": { + "additionalProperties": { + "$ref": "#/$defs/DigestSet" + }, + "type": "object" + }, + "environ": { + "type": "string" + }, + "specbypassisvuln": { + "type": "boolean" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "processid", + "parentpid" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/environment.json b/schemagen/environment.json index 0728c6bb..cab7a68c 100644 --- a/schemagen/environment.json +++ b/schemagen/environment.json @@ -1 +1,32 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"os":{"type":"string"},"hostname":{"type":"string"},"username":{"type":"string"},"variables":{"additionalProperties":{"type":"string"},"type":"object"}},"additionalProperties":false,"type":"object","required":["os","hostname","username"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "os": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "variables": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "os", + "hostname", + "username" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/gcp-iit.json b/schemagen/gcp-iit.json index eb50b608..c8848ae9 100644 --- a/schemagen/gcp-iit.json +++ b/schemagen/gcp-iit.json @@ -1 +1,65 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"jwt":{"$ref":"#/$defs/Attestor"},"project_id":{"type":"string"},"project_number":{"type":"string"},"zone":{"type":"string"},"instance_id":{"type":"string"},"instance_hostname":{"type":"string"},"instance_creation_timestamp":{"type":"string"},"instance_confidentiality":{"type":"string"},"licence_id":{"items":{"type":"string"},"type":"array"},"cluster_name":{"type":"string"},"cluster_uid":{"type":"string"},"cluster_location":{"type":"string"}},"additionalProperties":false,"type":"object","required":["jwt","project_id","project_number","zone","instance_id","instance_hostname","instance_creation_timestamp","instance_confidentiality","licence_id","cluster_name","cluster_uid","cluster_location"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "jwt": { + "$ref": "#/$defs/Attestor" + }, + "project_id": { + "type": "string" + }, + "project_number": { + "type": "string" + }, + "zone": { + "type": "string" + }, + "instance_id": { + "type": "string" + }, + "instance_hostname": { + "type": "string" + }, + "instance_creation_timestamp": { + "type": "string" + }, + "instance_confidentiality": { + "type": "string" + }, + "licence_id": { + "items": { + "type": "string" + }, + "type": "array" + }, + "cluster_name": { + "type": "string" + }, + "cluster_uid": { + "type": "string" + }, + "cluster_location": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "jwt", + "project_id", + "project_number", + "zone", + "instance_id", + "instance_hostname", + "instance_creation_timestamp", + "instance_confidentiality", + "licence_id", + "cluster_name", + "cluster_uid", + "cluster_location" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/git.json b/schemagen/git.json index 81919f70..49b89a6c 100644 --- a/schemagen/git.json +++ b/schemagen/git.json @@ -1 +1,131 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"commithash":{"type":"string"},"author":{"type":"string"},"authoremail":{"type":"string"},"committername":{"type":"string"},"committeremail":{"type":"string"},"commitdate":{"type":"string"},"commitmessage":{"type":"string"},"status":{"additionalProperties":{"$ref":"#/$defs/Status"},"type":"object"},"commitdigest":{"$ref":"#/$defs/DigestSet"},"signature":{"type":"string"},"parenthashes":{"items":{"type":"string"},"type":"array"},"treehash":{"type":"string"},"refs":{"items":{"type":"string"},"type":"array"},"remotes":{"items":{"type":"string"},"type":"array"},"tags":{"items":{"$ref":"#/$defs/Tag"},"type":"array"}},"additionalProperties":false,"type":"object","required":["commithash","author","authoremail","committername","committeremail","commitdate","commitmessage"]},"DigestSet":{"additionalProperties":{"type":"string"},"type":"object"},"Status":{"properties":{"staging":{"type":"string"},"worktree":{"type":"string"}},"additionalProperties":false,"type":"object"},"Tag":{"properties":{"name":{"type":"string"},"taggername":{"type":"string"},"taggeremail":{"type":"string"},"when":{"type":"string"},"pgpsignature":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"type":"object","required":["name","taggername","taggeremail","when","pgpsignature","message"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "commithash": { + "type": "string" + }, + "author": { + "type": "string" + }, + "authoremail": { + "type": "string" + }, + "committername": { + "type": "string" + }, + "committeremail": { + "type": "string" + }, + "commitdate": { + "type": "string" + }, + "commitmessage": { + "type": "string" + }, + "status": { + "additionalProperties": { + "$ref": "#/$defs/Status" + }, + "type": "object" + }, + "commitdigest": { + "$ref": "#/$defs/DigestSet" + }, + "signature": { + "type": "string" + }, + "parenthashes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "treehash": { + "type": "string" + }, + "refs": { + "items": { + "type": "string" + }, + "type": "array" + }, + "remotes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tags": { + "items": { + "$ref": "#/$defs/Tag" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "commithash", + "author", + "authoremail", + "committername", + "committeremail", + "commitdate", + "commitmessage" + ] + }, + "DigestSet": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "Status": { + "properties": { + "staging": { + "type": "string" + }, + "worktree": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Tag": { + "properties": { + "name": { + "type": "string" + }, + "taggername": { + "type": "string" + }, + "taggeremail": { + "type": "string" + }, + "when": { + "type": "string" + }, + "pgpsignature": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name", + "taggername", + "taggeremail", + "when", + "pgpsignature", + "message" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/github.json b/schemagen/github.json index 7dd61891..71479cb8 100644 --- a/schemagen/github.json +++ b/schemagen/github.json @@ -1 +1,57 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"jwt":{"$ref":"#/$defs/Attestor"},"ciconfigpath":{"type":"string"},"pipelineid":{"type":"string"},"pipelinename":{"type":"string"},"pipelineurl":{"type":"string"},"projecturl":{"type":"string"},"runnerid":{"type":"string"},"cihost":{"type":"string"},"ciserverurl":{"type":"string"},"runnerarch":{"type":"string"},"runneros":{"type":"string"}},"additionalProperties":false,"type":"object","required":["ciconfigpath","pipelineid","pipelinename","pipelineurl","projecturl","runnerid","cihost","ciserverurl","runnerarch","runneros"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "jwt": { + "$ref": "#/$defs/Attestor" + }, + "ciconfigpath": { + "type": "string" + }, + "pipelineid": { + "type": "string" + }, + "pipelinename": { + "type": "string" + }, + "pipelineurl": { + "type": "string" + }, + "projecturl": { + "type": "string" + }, + "runnerid": { + "type": "string" + }, + "cihost": { + "type": "string" + }, + "ciserverurl": { + "type": "string" + }, + "runnerarch": { + "type": "string" + }, + "runneros": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "ciconfigpath", + "pipelineid", + "pipelinename", + "pipelineurl", + "projecturl", + "runnerid", + "cihost", + "ciserverurl", + "runnerarch", + "runneros" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/gitlab.json b/schemagen/gitlab.json index 29e95d3d..1272fc6a 100644 --- a/schemagen/gitlab.json +++ b/schemagen/gitlab.json @@ -1 +1,69 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"jwt":{"$ref":"#/$defs/Attestor"},"ciconfigpath":{"type":"string"},"jobid":{"type":"string"},"jobimage":{"type":"string"},"jobname":{"type":"string"},"jobstage":{"type":"string"},"joburl":{"type":"string"},"pipelineid":{"type":"string"},"pipelineurl":{"type":"string"},"projectid":{"type":"string"},"projecturl":{"type":"string"},"runnerid":{"type":"string"},"cihost":{"type":"string"},"ciserverurl":{"type":"string"}},"additionalProperties":false,"type":"object","required":["ciconfigpath","jobid","jobimage","jobname","jobstage","joburl","pipelineid","pipelineurl","projectid","projecturl","runnerid","cihost","ciserverurl"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "jwt": { + "$ref": "#/$defs/Attestor" + }, + "ciconfigpath": { + "type": "string" + }, + "jobid": { + "type": "string" + }, + "jobimage": { + "type": "string" + }, + "jobname": { + "type": "string" + }, + "jobstage": { + "type": "string" + }, + "joburl": { + "type": "string" + }, + "pipelineid": { + "type": "string" + }, + "pipelineurl": { + "type": "string" + }, + "projectid": { + "type": "string" + }, + "projecturl": { + "type": "string" + }, + "runnerid": { + "type": "string" + }, + "cihost": { + "type": "string" + }, + "ciserverurl": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "ciconfigpath", + "jobid", + "jobimage", + "jobname", + "jobstage", + "joburl", + "pipelineid", + "pipelineurl", + "projectid", + "projecturl", + "runnerid", + "cihost", + "ciserverurl" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/jwt.json b/schemagen/jwt.json index 1eff1094..9d72efc6 100644 --- a/schemagen/jwt.json +++ b/schemagen/jwt.json @@ -1 +1,484 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"claims":{"type":"object"},"verifiedBy":{"$ref":"#/$defs/VerificationInfo"}},"additionalProperties":false,"type":"object","required":["claims"]},"AttributeTypeAndValue":{"properties":{"Type":{"$ref":"#/$defs/ObjectIdentifier"},"Value":true},"additionalProperties":false,"type":"object","required":["Type","Value"]},"Certificate":{"properties":{"Raw":{"type":"string","contentEncoding":"base64"},"RawTBSCertificate":{"type":"string","contentEncoding":"base64"},"RawSubjectPublicKeyInfo":{"type":"string","contentEncoding":"base64"},"RawSubject":{"type":"string","contentEncoding":"base64"},"RawIssuer":{"type":"string","contentEncoding":"base64"},"Signature":{"type":"string","contentEncoding":"base64"},"SignatureAlgorithm":{"type":"integer"},"PublicKeyAlgorithm":{"type":"integer"},"PublicKey":true,"Version":{"type":"integer"},"SerialNumber":{"$ref":"#/$defs/Int"},"Issuer":{"$ref":"#/$defs/Name"},"Subject":{"$ref":"#/$defs/Name"},"NotBefore":{"type":"string","format":"date-time"},"NotAfter":{"type":"string","format":"date-time"},"KeyUsage":{"type":"integer"},"Extensions":{"items":{"$ref":"#/$defs/Extension"},"type":"array"},"ExtraExtensions":{"items":{"$ref":"#/$defs/Extension"},"type":"array"},"UnhandledCriticalExtensions":{"items":{"$ref":"#/$defs/ObjectIdentifier"},"type":"array"},"ExtKeyUsage":{"items":{"type":"integer"},"type":"array"},"UnknownExtKeyUsage":{"items":{"$ref":"#/$defs/ObjectIdentifier"},"type":"array"},"BasicConstraintsValid":{"type":"boolean"},"IsCA":{"type":"boolean"},"MaxPathLen":{"type":"integer"},"MaxPathLenZero":{"type":"boolean"},"SubjectKeyId":{"type":"string","contentEncoding":"base64"},"AuthorityKeyId":{"type":"string","contentEncoding":"base64"},"OCSPServer":{"items":{"type":"string"},"type":"array"},"IssuingCertificateURL":{"items":{"type":"string"},"type":"array"},"DNSNames":{"items":{"type":"string"},"type":"array"},"EmailAddresses":{"items":{"type":"string"},"type":"array"},"IPAddresses":{"items":{"type":"string","format":"ipv4"},"type":"array"},"URIs":{"items":{"type":"string","format":"uri"},"type":"array"},"PermittedDNSDomainsCritical":{"type":"boolean"},"PermittedDNSDomains":{"items":{"type":"string"},"type":"array"},"ExcludedDNSDomains":{"items":{"type":"string"},"type":"array"},"PermittedIPRanges":{"items":{"$ref":"#/$defs/IPNet"},"type":"array"},"ExcludedIPRanges":{"items":{"$ref":"#/$defs/IPNet"},"type":"array"},"PermittedEmailAddresses":{"items":{"type":"string"},"type":"array"},"ExcludedEmailAddresses":{"items":{"type":"string"},"type":"array"},"PermittedURIDomains":{"items":{"type":"string"},"type":"array"},"ExcludedURIDomains":{"items":{"type":"string"},"type":"array"},"CRLDistributionPoints":{"items":{"type":"string"},"type":"array"},"PolicyIdentifiers":{"items":{"$ref":"#/$defs/ObjectIdentifier"},"type":"array"}},"additionalProperties":false,"type":"object","required":["Raw","RawTBSCertificate","RawSubjectPublicKeyInfo","RawSubject","RawIssuer","Signature","SignatureAlgorithm","PublicKeyAlgorithm","PublicKey","Version","SerialNumber","Issuer","Subject","NotBefore","NotAfter","KeyUsage","Extensions","ExtraExtensions","UnhandledCriticalExtensions","ExtKeyUsage","UnknownExtKeyUsage","BasicConstraintsValid","IsCA","MaxPathLen","MaxPathLenZero","SubjectKeyId","AuthorityKeyId","OCSPServer","IssuingCertificateURL","DNSNames","EmailAddresses","IPAddresses","URIs","PermittedDNSDomainsCritical","PermittedDNSDomains","ExcludedDNSDomains","PermittedIPRanges","ExcludedIPRanges","PermittedEmailAddresses","ExcludedEmailAddresses","PermittedURIDomains","ExcludedURIDomains","CRLDistributionPoints","PolicyIdentifiers"]},"Extension":{"properties":{"Id":{"$ref":"#/$defs/ObjectIdentifier"},"Critical":{"type":"boolean"},"Value":{"type":"string","contentEncoding":"base64"}},"additionalProperties":false,"type":"object","required":["Id","Critical","Value"]},"IPMask":{"type":"string","contentEncoding":"base64"},"IPNet":{"properties":{"IP":{"type":"string","format":"ipv4"},"Mask":{"$ref":"#/$defs/IPMask"}},"additionalProperties":false,"type":"object","required":["IP","Mask"]},"Int":{"properties":{},"additionalProperties":false,"type":"object"},"JSONWebKey":{"properties":{"Key":true,"KeyID":{"type":"string"},"Algorithm":{"type":"string"},"Use":{"type":"string"},"Certificates":{"items":{"$ref":"#/$defs/Certificate"},"type":"array"},"CertificatesURL":{"type":"string","format":"uri"},"CertificateThumbprintSHA1":{"type":"string","contentEncoding":"base64"},"CertificateThumbprintSHA256":{"type":"string","contentEncoding":"base64"}},"additionalProperties":false,"type":"object","required":["Key","KeyID","Algorithm","Use","Certificates","CertificatesURL","CertificateThumbprintSHA1","CertificateThumbprintSHA256"]},"Name":{"properties":{"Country":{"items":{"type":"string"},"type":"array"},"Organization":{"items":{"type":"string"},"type":"array"},"OrganizationalUnit":{"items":{"type":"string"},"type":"array"},"Locality":{"items":{"type":"string"},"type":"array"},"Province":{"items":{"type":"string"},"type":"array"},"StreetAddress":{"items":{"type":"string"},"type":"array"},"PostalCode":{"items":{"type":"string"},"type":"array"},"SerialNumber":{"type":"string"},"CommonName":{"type":"string"},"Names":{"items":{"$ref":"#/$defs/AttributeTypeAndValue"},"type":"array"},"ExtraNames":{"items":{"$ref":"#/$defs/AttributeTypeAndValue"},"type":"array"}},"additionalProperties":false,"type":"object","required":["Country","Organization","OrganizationalUnit","Locality","Province","StreetAddress","PostalCode","SerialNumber","CommonName","Names","ExtraNames"]},"ObjectIdentifier":{"items":{"type":"integer"},"type":"array"},"VerificationInfo":{"properties":{"jwksUrl":{"type":"string"},"jwk":{"$ref":"#/$defs/JSONWebKey"}},"additionalProperties":false,"type":"object","required":["jwksUrl","jwk"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "claims": { + "type": "object" + }, + "verifiedBy": { + "$ref": "#/$defs/VerificationInfo" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "claims" + ] + }, + "AttributeTypeAndValue": { + "properties": { + "Type": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "Value": true + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Type", + "Value" + ] + }, + "Certificate": { + "properties": { + "Raw": { + "type": "string", + "contentEncoding": "base64" + }, + "RawTBSCertificate": { + "type": "string", + "contentEncoding": "base64" + }, + "RawSubjectPublicKeyInfo": { + "type": "string", + "contentEncoding": "base64" + }, + "RawSubject": { + "type": "string", + "contentEncoding": "base64" + }, + "RawIssuer": { + "type": "string", + "contentEncoding": "base64" + }, + "Signature": { + "type": "string", + "contentEncoding": "base64" + }, + "SignatureAlgorithm": { + "type": "integer" + }, + "PublicKeyAlgorithm": { + "type": "integer" + }, + "PublicKey": true, + "Version": { + "type": "integer" + }, + "SerialNumber": { + "$ref": "#/$defs/Int" + }, + "Issuer": { + "$ref": "#/$defs/Name" + }, + "Subject": { + "$ref": "#/$defs/Name" + }, + "NotBefore": { + "type": "string", + "format": "date-time" + }, + "NotAfter": { + "type": "string", + "format": "date-time" + }, + "KeyUsage": { + "type": "integer" + }, + "Extensions": { + "items": { + "$ref": "#/$defs/Extension" + }, + "type": "array" + }, + "ExtraExtensions": { + "items": { + "$ref": "#/$defs/Extension" + }, + "type": "array" + }, + "UnhandledCriticalExtensions": { + "items": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "type": "array" + }, + "ExtKeyUsage": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "UnknownExtKeyUsage": { + "items": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "type": "array" + }, + "BasicConstraintsValid": { + "type": "boolean" + }, + "IsCA": { + "type": "boolean" + }, + "MaxPathLen": { + "type": "integer" + }, + "MaxPathLenZero": { + "type": "boolean" + }, + "SubjectKeyId": { + "type": "string", + "contentEncoding": "base64" + }, + "AuthorityKeyId": { + "type": "string", + "contentEncoding": "base64" + }, + "OCSPServer": { + "items": { + "type": "string" + }, + "type": "array" + }, + "IssuingCertificateURL": { + "items": { + "type": "string" + }, + "type": "array" + }, + "DNSNames": { + "items": { + "type": "string" + }, + "type": "array" + }, + "EmailAddresses": { + "items": { + "type": "string" + }, + "type": "array" + }, + "IPAddresses": { + "items": { + "type": "string", + "format": "ipv4" + }, + "type": "array" + }, + "URIs": { + "items": { + "type": "string", + "format": "uri" + }, + "type": "array" + }, + "PermittedDNSDomainsCritical": { + "type": "boolean" + }, + "PermittedDNSDomains": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ExcludedDNSDomains": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PermittedIPRanges": { + "items": { + "$ref": "#/$defs/IPNet" + }, + "type": "array" + }, + "ExcludedIPRanges": { + "items": { + "$ref": "#/$defs/IPNet" + }, + "type": "array" + }, + "PermittedEmailAddresses": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ExcludedEmailAddresses": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PermittedURIDomains": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ExcludedURIDomains": { + "items": { + "type": "string" + }, + "type": "array" + }, + "CRLDistributionPoints": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PolicyIdentifiers": { + "items": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Raw", + "RawTBSCertificate", + "RawSubjectPublicKeyInfo", + "RawSubject", + "RawIssuer", + "Signature", + "SignatureAlgorithm", + "PublicKeyAlgorithm", + "PublicKey", + "Version", + "SerialNumber", + "Issuer", + "Subject", + "NotBefore", + "NotAfter", + "KeyUsage", + "Extensions", + "ExtraExtensions", + "UnhandledCriticalExtensions", + "ExtKeyUsage", + "UnknownExtKeyUsage", + "BasicConstraintsValid", + "IsCA", + "MaxPathLen", + "MaxPathLenZero", + "SubjectKeyId", + "AuthorityKeyId", + "OCSPServer", + "IssuingCertificateURL", + "DNSNames", + "EmailAddresses", + "IPAddresses", + "URIs", + "PermittedDNSDomainsCritical", + "PermittedDNSDomains", + "ExcludedDNSDomains", + "PermittedIPRanges", + "ExcludedIPRanges", + "PermittedEmailAddresses", + "ExcludedEmailAddresses", + "PermittedURIDomains", + "ExcludedURIDomains", + "CRLDistributionPoints", + "PolicyIdentifiers" + ] + }, + "Extension": { + "properties": { + "Id": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "Critical": { + "type": "boolean" + }, + "Value": { + "type": "string", + "contentEncoding": "base64" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Id", + "Critical", + "Value" + ] + }, + "IPMask": { + "type": "string", + "contentEncoding": "base64" + }, + "IPNet": { + "properties": { + "IP": { + "type": "string", + "format": "ipv4" + }, + "Mask": { + "$ref": "#/$defs/IPMask" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "IP", + "Mask" + ] + }, + "Int": { + "properties": {}, + "additionalProperties": false, + "type": "object" + }, + "JSONWebKey": { + "properties": { + "Key": true, + "KeyID": { + "type": "string" + }, + "Algorithm": { + "type": "string" + }, + "Use": { + "type": "string" + }, + "Certificates": { + "items": { + "$ref": "#/$defs/Certificate" + }, + "type": "array" + }, + "CertificatesURL": { + "type": "string", + "format": "uri" + }, + "CertificateThumbprintSHA1": { + "type": "string", + "contentEncoding": "base64" + }, + "CertificateThumbprintSHA256": { + "type": "string", + "contentEncoding": "base64" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Key", + "KeyID", + "Algorithm", + "Use", + "Certificates", + "CertificatesURL", + "CertificateThumbprintSHA1", + "CertificateThumbprintSHA256" + ] + }, + "Name": { + "properties": { + "Country": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Organization": { + "items": { + "type": "string" + }, + "type": "array" + }, + "OrganizationalUnit": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Locality": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Province": { + "items": { + "type": "string" + }, + "type": "array" + }, + "StreetAddress": { + "items": { + "type": "string" + }, + "type": "array" + }, + "PostalCode": { + "items": { + "type": "string" + }, + "type": "array" + }, + "SerialNumber": { + "type": "string" + }, + "CommonName": { + "type": "string" + }, + "Names": { + "items": { + "$ref": "#/$defs/AttributeTypeAndValue" + }, + "type": "array" + }, + "ExtraNames": { + "items": { + "$ref": "#/$defs/AttributeTypeAndValue" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Country", + "Organization", + "OrganizationalUnit", + "Locality", + "Province", + "StreetAddress", + "PostalCode", + "SerialNumber", + "CommonName", + "Names", + "ExtraNames" + ] + }, + "ObjectIdentifier": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "VerificationInfo": { + "properties": { + "jwksUrl": { + "type": "string" + }, + "jwk": { + "$ref": "#/$defs/JSONWebKey" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "jwksUrl", + "jwk" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/link.json b/schemagen/link.json index d8dc21e2..a3725db1 100644 --- a/schemagen/link.json +++ b/schemagen/link.json @@ -1 +1,87 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/in-toto/attestation/go/predicates/link/v0/link","$ref":"#/$defs/Link","$defs":{"Link":{"properties":{"name":{"type":"string"},"command":{"items":{"type":"string"},"type":"array"},"materials":{"items":{"$ref":"#/$defs/ResourceDescriptor"},"type":"array"},"byproducts":{"$ref":"#/$defs/Struct"},"environment":{"$ref":"#/$defs/Struct"}},"additionalProperties":false,"type":"object"},"ResourceDescriptor":{"properties":{"name":{"type":"string"},"uri":{"type":"string"},"digest":{"additionalProperties":{"type":"string"},"type":"object"},"content":{"type":"string","contentEncoding":"base64"},"download_location":{"type":"string"},"media_type":{"type":"string"},"annotations":{"$ref":"#/$defs/Struct"}},"additionalProperties":false,"type":"object"},"Struct":{"properties":{"fields":{"additionalProperties":{"$ref":"#/$defs/Value"},"type":"object"}},"additionalProperties":false,"type":"object"},"Value":{"properties":{"Kind":true},"additionalProperties":false,"type":"object","required":["Kind"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/in-toto/attestation/go/predicates/link/v0/link", + "$ref": "#/$defs/Link", + "$defs": { + "Link": { + "properties": { + "name": { + "type": "string" + }, + "command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "materials": { + "items": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "type": "array" + }, + "byproducts": { + "$ref": "#/$defs/Struct" + }, + "environment": { + "$ref": "#/$defs/Struct" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ResourceDescriptor": { + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "digest": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "content": { + "type": "string", + "contentEncoding": "base64" + }, + "download_location": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "annotations": { + "$ref": "#/$defs/Struct" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Struct": { + "properties": { + "fields": { + "additionalProperties": { + "$ref": "#/$defs/Value" + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Value": { + "properties": { + "Kind": true + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Kind" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/material.json b/schemagen/material.json index b4e9bf55..e9c2ba43 100644 --- a/schemagen/material.json +++ b/schemagen/material.json @@ -1 +1,11 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{},"additionalProperties":false,"type":"object"}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": {}, + "additionalProperties": false, + "type": "object" + } + } +} \ No newline at end of file diff --git a/schemagen/maven.json b/schemagen/maven.json index 1fe6319e..f2e9b854 100644 --- a/schemagen/maven.json +++ b/schemagen/maven.json @@ -1 +1,61 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"groupid":{"type":"string"},"artifactid":{"type":"string"},"version":{"type":"string"},"projectname":{"type":"string"},"dependencies":{"items":{"$ref":"#/$defs/MavenDependency"},"type":"array"}},"additionalProperties":false,"type":"object","required":["groupid","artifactid","version","projectname","dependencies"]},"MavenDependency":{"properties":{"groupid":{"type":"string"},"artifactid":{"type":"string"},"version":{"type":"string"},"scope":{"type":"string"}},"additionalProperties":false,"type":"object","required":["groupid","artifactid","version","scope"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "groupid": { + "type": "string" + }, + "artifactid": { + "type": "string" + }, + "version": { + "type": "string" + }, + "projectname": { + "type": "string" + }, + "dependencies": { + "items": { + "$ref": "#/$defs/MavenDependency" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "groupid", + "artifactid", + "version", + "projectname", + "dependencies" + ] + }, + "MavenDependency": { + "properties": { + "groupid": { + "type": "string" + }, + "artifactid": { + "type": "string" + }, + "version": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "groupid", + "artifactid", + "version", + "scope" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/oci.json b/schemagen/oci.json index e5b5f076..e1b946f5 100644 --- a/schemagen/oci.json +++ b/schemagen/oci.json @@ -1 +1,84 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"tardigest":{"$ref":"#/$defs/DigestSet"},"manifest":{"items":{"$ref":"#/$defs/Manifest"},"type":"array"},"imagetags":{"items":{"type":"string"},"type":"array"},"diffids":{"items":{"$ref":"#/$defs/DigestSet"},"type":"array"},"imageid":{"$ref":"#/$defs/DigestSet"},"manifestraw":{"type":"string","contentEncoding":"base64"},"manifestdigest":{"$ref":"#/$defs/DigestSet"}},"additionalProperties":false,"type":"object","required":["tardigest","manifest","imagetags","diffids","imageid","manifestraw","manifestdigest"]},"DigestSet":{"additionalProperties":{"type":"string"},"type":"object"},"Manifest":{"properties":{"Config":{"type":"string"},"RepoTags":{"items":{"type":"string"},"type":"array"},"Layers":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object","required":["Config","RepoTags","Layers"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "tardigest": { + "$ref": "#/$defs/DigestSet" + }, + "manifest": { + "items": { + "$ref": "#/$defs/Manifest" + }, + "type": "array" + }, + "imagetags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "diffids": { + "items": { + "$ref": "#/$defs/DigestSet" + }, + "type": "array" + }, + "imageid": { + "$ref": "#/$defs/DigestSet" + }, + "manifestraw": { + "type": "string", + "contentEncoding": "base64" + }, + "manifestdigest": { + "$ref": "#/$defs/DigestSet" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tardigest", + "manifest", + "imagetags", + "diffids", + "imageid", + "manifestraw", + "manifestdigest" + ] + }, + "DigestSet": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "Manifest": { + "properties": { + "Config": { + "type": "string" + }, + "RepoTags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Layers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Config", + "RepoTags", + "Layers" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/policyverify.json b/schemagen/policyverify.json index 6004c3db..942f1aea 100644 --- a/schemagen/policyverify.json +++ b/schemagen/policyverify.json @@ -1 +1,72 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{"verifier":{"$ref":"#/$defs/Verifier"},"timeVerified":{"type":"string","format":"date-time"},"policy":{"$ref":"#/$defs/ResourceDescriptor"},"inputAttestations":{"items":{"$ref":"#/$defs/ResourceDescriptor"},"type":"array"},"verificationResult":{"type":"string"}},"additionalProperties":false,"type":"object","required":["verifier","timeVerified","policy","inputAttestations","verificationResult"]},"DigestSet":{"additionalProperties":{"type":"string"},"type":"object"},"ResourceDescriptor":{"properties":{"uri":{"type":"string"},"digest":{"$ref":"#/$defs/DigestSet"}},"additionalProperties":false,"type":"object","required":["uri","digest"]},"Verifier":{"properties":{"id":{"type":"string"}},"additionalProperties":false,"type":"object","required":["id"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": { + "verifier": { + "$ref": "#/$defs/Verifier" + }, + "timeVerified": { + "type": "string", + "format": "date-time" + }, + "policy": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "inputAttestations": { + "items": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "type": "array" + }, + "verificationResult": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "verifier", + "timeVerified", + "policy", + "inputAttestations", + "verificationResult" + ] + }, + "DigestSet": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "ResourceDescriptor": { + "properties": { + "uri": { + "type": "string" + }, + "digest": { + "$ref": "#/$defs/DigestSet" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "uri", + "digest" + ] + }, + "Verifier": { + "properties": { + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/product.json b/schemagen/product.json index b4e9bf55..e9c2ba43 100644 --- a/schemagen/product.json +++ b/schemagen/product.json @@ -1 +1,11 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Attestor":{"properties":{},"additionalProperties":false,"type":"object"}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Attestor": { + "properties": {}, + "additionalProperties": false, + "type": "object" + } + } +} \ No newline at end of file diff --git a/schemagen/sarif.json b/schemagen/sarif.json index 9edcd586..8d5ba037 100644 --- a/schemagen/sarif.json +++ b/schemagen/sarif.json @@ -1 +1,785 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Attestor","$defs":{"Address":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"index":{"type":"integer"},"absoluteAddress":{"type":"integer"},"relativeAddress":{"type":"integer"},"offsetFromParent":{"type":"integer"},"length":{"type":"integer"},"name":{"type":"string"},"fullyQualifiedName":{"type":"string"},"kind":{"type":"string"},"parentIndex":{"type":"integer"}},"additionalProperties":false,"type":"object"},"Artifact":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"location":{"$ref":"#/$defs/ArtifactLocation"},"parentIndex":{"type":"integer"},"offset":{"type":"integer"},"length":{"type":"integer"},"roles":{"items":{"type":"string"},"type":"array"},"mimeType":{"type":"string"},"contents":{"$ref":"#/$defs/ArtifactContent"},"encoding":{"type":"string"},"sourceLanguage":{"type":"string"},"hashes":{"additionalProperties":{"type":"string"},"type":"object"},"lastModifiedTimeUtc":{"type":"string"},"description":{"$ref":"#/$defs/Message"}},"additionalProperties":false,"type":"object","required":["length"]},"ArtifactChange":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"artifactLocation":{"$ref":"#/$defs/ArtifactLocation"},"replacements":{"items":{"$ref":"#/$defs/Replacement"},"type":"array"}},"additionalProperties":false,"type":"object","required":["artifactLocation","replacements"]},"ArtifactContent":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"text":{"type":"string"},"binary":{"type":"string"},"rendered":{"$ref":"#/$defs/MultiformatMessageString"}},"additionalProperties":false,"type":"object"},"ArtifactLocation":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"uri":{"type":"string"},"uriBaseId":{"type":"string"},"index":{"type":"integer"},"description":{"$ref":"#/$defs/Message"}},"additionalProperties":false,"type":"object"},"Attestor":{"properties":{"report":{"$ref":"#/$defs/Report"},"reportFileName":{"type":"string"},"reportDigestSet":{"$ref":"#/$defs/DigestSet"}},"additionalProperties":false,"type":"object","required":["report","reportFileName","reportDigestSet"]},"DigestSet":{"additionalProperties":{"type":"string"},"type":"object"},"Fix":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"description":{"$ref":"#/$defs/Message"},"artifactChanges":{"items":{"$ref":"#/$defs/ArtifactChange"},"type":"array"}},"additionalProperties":false,"type":"object","required":["artifactChanges"]},"Invocation":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"startTimeUtc":{"type":"string","format":"date-time"},"endTimeUtc":{"type":"string","format":"date-time"},"executionSuccessful":{"type":"boolean"},"workingDirectory":{"$ref":"#/$defs/ArtifactLocation"}},"additionalProperties":false,"type":"object","required":["executionSuccessful"]},"Location":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"id":{"type":"integer"},"physicalLocation":{"$ref":"#/$defs/PhysicalLocation"},"logicalLocations":{"items":{"$ref":"#/$defs/LogicalLocation"},"type":"array"},"message":{"$ref":"#/$defs/Message"},"annotations":{"items":{"$ref":"#/$defs/Region"},"type":"array"},"relationships":{"items":{"$ref":"#/$defs/LocationRelationship"},"type":"array"}},"additionalProperties":false,"type":"object"},"LocationRelationship":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"target":{"type":"integer"},"kinds":{"items":{"type":"string"},"type":"array"},"description":{"$ref":"#/$defs/Message"}},"additionalProperties":false,"type":"object","required":["target"]},"LogicalLocation":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"index":{"type":"integer"},"name":{"type":"string"},"fullyQualifiedName":{"type":"string"},"decoratedName":{"type":"string"},"kind":{"type":"string"},"parentIndex":{"type":"integer"}},"additionalProperties":false,"type":"object"},"Message":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"text":{"type":"string"},"markdown":{"type":"string"},"id":{"type":"string"},"arguments":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"MultiformatMessageString":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"text":{"type":"string"},"markdown":{"type":"string"}},"additionalProperties":false,"type":"object"},"PhysicalLocation":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"artifactLocation":{"$ref":"#/$defs/ArtifactLocation"},"region":{"$ref":"#/$defs/Region"},"contextRegion":{"$ref":"#/$defs/Region"},"address":{"$ref":"#/$defs/Address"}},"additionalProperties":false,"type":"object"},"Properties":{"type":"object"},"PropertyBag":{"properties":{"properties":{"$ref":"#/$defs/Properties"}},"additionalProperties":false,"type":"object"},"Region":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"startLine":{"type":"integer"},"startColumn":{"type":"integer"},"endLine":{"type":"integer"},"endColumn":{"type":"integer"},"charOffset":{"type":"integer"},"charLength":{"type":"integer"},"byteOffset":{"type":"integer"},"byteLength":{"type":"integer"},"snippet":{"$ref":"#/$defs/ArtifactContent"},"message":{"$ref":"#/$defs/Message"},"sourceLanguage":{"type":"string"}},"additionalProperties":false,"type":"object"},"Replacement":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"deletedRegion":{"$ref":"#/$defs/Region"},"insertedContent":{"$ref":"#/$defs/ArtifactContent"}},"additionalProperties":false,"type":"object","required":["deletedRegion"]},"Report":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"version":{"type":"string"},"$schema":{"type":"string"},"runs":{"items":{"$ref":"#/$defs/Run"},"type":"array"}},"additionalProperties":false,"type":"object","required":["version","$schema","runs"]},"ReportingConfiguration":{"properties":{"enabled":{"type":"boolean"},"level":true,"parameters":{"$ref":"#/$defs/PropertyBag"},"properties":{"$ref":"#/$defs/PropertyBag"},"rank":{"type":"number"}},"additionalProperties":false,"type":"object"},"ReportingDescriptor":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"id":{"type":"string"},"name":{"type":"string"},"shortDescription":{"$ref":"#/$defs/MultiformatMessageString"},"fullDescription":{"$ref":"#/$defs/MultiformatMessageString"},"defaultConfiguration":{"$ref":"#/$defs/ReportingConfiguration"},"helpUri":{"type":"string"},"help":{"$ref":"#/$defs/MultiformatMessageString"}},"additionalProperties":false,"type":"object","required":["id","shortDescription"]},"ReportingDescriptorReference":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"id":{"type":"string"},"index":{"type":"integer"},"guid":{"type":"string"},"toolComponent":{"$ref":"#/$defs/ToolComponentReference"}},"additionalProperties":false,"type":"object"},"Result":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"guid":{"type":"string"},"correlationGuid":{"type":"string"},"ruleId":{"type":"string"},"ruleIndex":{"type":"integer"},"rule":{"$ref":"#/$defs/ReportingDescriptorReference"},"taxa":{"items":{"$ref":"#/$defs/ReportingDescriptorReference"},"type":"array"},"kind":{"type":"string"},"level":{"type":"string"},"message":{"$ref":"#/$defs/Message"},"locations":{"items":{"$ref":"#/$defs/Location"},"type":"array"},"analysisTarget":{"$ref":"#/$defs/ArtifactLocation"},"fingerprints":{"type":"object"},"partialFingerprints":{"type":"object"},"relatedLocations":{"items":{"$ref":"#/$defs/Location"},"type":"array"},"suppressions":{"items":{"$ref":"#/$defs/Suppression"},"type":"array"},"baselineState":{"type":"string"},"rank":{"type":"number"},"workItemUris":{"items":{"type":"string"},"type":"array"},"hostedViewerUri":{"type":"string"},"fixes":{"items":{"$ref":"#/$defs/Fix"},"type":"array"},"occurrenceCount":{"type":"integer"}},"additionalProperties":false,"type":"object","required":["message"]},"Run":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"tool":{"$ref":"#/$defs/Tool"},"invocations":{"items":{"$ref":"#/$defs/Invocation"},"type":"array"},"artifacts":{"items":{"$ref":"#/$defs/Artifact"},"type":"array"},"results":{"items":{"$ref":"#/$defs/Result"},"type":"array"}},"additionalProperties":false,"type":"object","required":["tool","results"]},"Suppression":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"kind":{"type":"string"},"status":{"type":"string"},"location":{"$ref":"#/$defs/Location"},"guid":{"type":"string"},"justification":{"type":"string"}},"additionalProperties":false,"type":"object","required":["kind","status","location","guid","justification"]},"Tool":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"driver":{"$ref":"#/$defs/ToolComponent"}},"additionalProperties":false,"type":"object","required":["driver"]},"ToolComponent":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"name":{"type":"string"},"version":{"type":"string"},"informationUri":{"type":"string"},"notifications":{"items":{"$ref":"#/$defs/ReportingDescriptor"},"type":"array"},"rules":{"items":{"$ref":"#/$defs/ReportingDescriptor"},"type":"array"},"taxa":{"items":{"$ref":"#/$defs/ReportingDescriptor"},"type":"array"}},"additionalProperties":false,"type":"object","required":["name","informationUri"]},"ToolComponentReference":{"properties":{"properties":{"$ref":"#/$defs/Properties"},"name":{"type":"string"},"index":{"type":"integer"},"guid":{"type":"string"}},"additionalProperties":false,"type":"object","required":["name","index","guid"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/Attestor", + "$defs": { + "Address": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "index": { + "type": "integer" + }, + "absoluteAddress": { + "type": "integer" + }, + "relativeAddress": { + "type": "integer" + }, + "offsetFromParent": { + "type": "integer" + }, + "length": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "fullyQualifiedName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "parentIndex": { + "type": "integer" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Artifact": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "location": { + "$ref": "#/$defs/ArtifactLocation" + }, + "parentIndex": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "length": { + "type": "integer" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mimeType": { + "type": "string" + }, + "contents": { + "$ref": "#/$defs/ArtifactContent" + }, + "encoding": { + "type": "string" + }, + "sourceLanguage": { + "type": "string" + }, + "hashes": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "lastModifiedTimeUtc": { + "type": "string" + }, + "description": { + "$ref": "#/$defs/Message" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "length" + ] + }, + "ArtifactChange": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "artifactLocation": { + "$ref": "#/$defs/ArtifactLocation" + }, + "replacements": { + "items": { + "$ref": "#/$defs/Replacement" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "artifactLocation", + "replacements" + ] + }, + "ArtifactContent": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "text": { + "type": "string" + }, + "binary": { + "type": "string" + }, + "rendered": { + "$ref": "#/$defs/MultiformatMessageString" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ArtifactLocation": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "uri": { + "type": "string" + }, + "uriBaseId": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "description": { + "$ref": "#/$defs/Message" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Attestor": { + "properties": { + "report": { + "$ref": "#/$defs/Report" + }, + "reportFileName": { + "type": "string" + }, + "reportDigestSet": { + "$ref": "#/$defs/DigestSet" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "report", + "reportFileName", + "reportDigestSet" + ] + }, + "DigestSet": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "Fix": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "description": { + "$ref": "#/$defs/Message" + }, + "artifactChanges": { + "items": { + "$ref": "#/$defs/ArtifactChange" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "artifactChanges" + ] + }, + "Invocation": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "startTimeUtc": { + "type": "string", + "format": "date-time" + }, + "endTimeUtc": { + "type": "string", + "format": "date-time" + }, + "executionSuccessful": { + "type": "boolean" + }, + "workingDirectory": { + "$ref": "#/$defs/ArtifactLocation" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "executionSuccessful" + ] + }, + "Location": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "id": { + "type": "integer" + }, + "physicalLocation": { + "$ref": "#/$defs/PhysicalLocation" + }, + "logicalLocations": { + "items": { + "$ref": "#/$defs/LogicalLocation" + }, + "type": "array" + }, + "message": { + "$ref": "#/$defs/Message" + }, + "annotations": { + "items": { + "$ref": "#/$defs/Region" + }, + "type": "array" + }, + "relationships": { + "items": { + "$ref": "#/$defs/LocationRelationship" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object" + }, + "LocationRelationship": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "target": { + "type": "integer" + }, + "kinds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "$ref": "#/$defs/Message" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "target" + ] + }, + "LogicalLocation": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "index": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "fullyQualifiedName": { + "type": "string" + }, + "decoratedName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "parentIndex": { + "type": "integer" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Message": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "text": { + "type": "string" + }, + "markdown": { + "type": "string" + }, + "id": { + "type": "string" + }, + "arguments": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object" + }, + "MultiformatMessageString": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "text": { + "type": "string" + }, + "markdown": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, + "PhysicalLocation": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "artifactLocation": { + "$ref": "#/$defs/ArtifactLocation" + }, + "region": { + "$ref": "#/$defs/Region" + }, + "contextRegion": { + "$ref": "#/$defs/Region" + }, + "address": { + "$ref": "#/$defs/Address" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Properties": { + "type": "object" + }, + "PropertyBag": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Region": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "startLine": { + "type": "integer" + }, + "startColumn": { + "type": "integer" + }, + "endLine": { + "type": "integer" + }, + "endColumn": { + "type": "integer" + }, + "charOffset": { + "type": "integer" + }, + "charLength": { + "type": "integer" + }, + "byteOffset": { + "type": "integer" + }, + "byteLength": { + "type": "integer" + }, + "snippet": { + "$ref": "#/$defs/ArtifactContent" + }, + "message": { + "$ref": "#/$defs/Message" + }, + "sourceLanguage": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Replacement": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "deletedRegion": { + "$ref": "#/$defs/Region" + }, + "insertedContent": { + "$ref": "#/$defs/ArtifactContent" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "deletedRegion" + ] + }, + "Report": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "version": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "runs": { + "items": { + "$ref": "#/$defs/Run" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "version", + "$schema", + "runs" + ] + }, + "ReportingConfiguration": { + "properties": { + "enabled": { + "type": "boolean" + }, + "level": true, + "parameters": { + "$ref": "#/$defs/PropertyBag" + }, + "properties": { + "$ref": "#/$defs/PropertyBag" + }, + "rank": { + "type": "number" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ReportingDescriptor": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "shortDescription": { + "$ref": "#/$defs/MultiformatMessageString" + }, + "fullDescription": { + "$ref": "#/$defs/MultiformatMessageString" + }, + "defaultConfiguration": { + "$ref": "#/$defs/ReportingConfiguration" + }, + "helpUri": { + "type": "string" + }, + "help": { + "$ref": "#/$defs/MultiformatMessageString" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id", + "shortDescription" + ] + }, + "ReportingDescriptorReference": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "id": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "guid": { + "type": "string" + }, + "toolComponent": { + "$ref": "#/$defs/ToolComponentReference" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Result": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "guid": { + "type": "string" + }, + "correlationGuid": { + "type": "string" + }, + "ruleId": { + "type": "string" + }, + "ruleIndex": { + "type": "integer" + }, + "rule": { + "$ref": "#/$defs/ReportingDescriptorReference" + }, + "taxa": { + "items": { + "$ref": "#/$defs/ReportingDescriptorReference" + }, + "type": "array" + }, + "kind": { + "type": "string" + }, + "level": { + "type": "string" + }, + "message": { + "$ref": "#/$defs/Message" + }, + "locations": { + "items": { + "$ref": "#/$defs/Location" + }, + "type": "array" + }, + "analysisTarget": { + "$ref": "#/$defs/ArtifactLocation" + }, + "fingerprints": { + "type": "object" + }, + "partialFingerprints": { + "type": "object" + }, + "relatedLocations": { + "items": { + "$ref": "#/$defs/Location" + }, + "type": "array" + }, + "suppressions": { + "items": { + "$ref": "#/$defs/Suppression" + }, + "type": "array" + }, + "baselineState": { + "type": "string" + }, + "rank": { + "type": "number" + }, + "workItemUris": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hostedViewerUri": { + "type": "string" + }, + "fixes": { + "items": { + "$ref": "#/$defs/Fix" + }, + "type": "array" + }, + "occurrenceCount": { + "type": "integer" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "message" + ] + }, + "Run": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "tool": { + "$ref": "#/$defs/Tool" + }, + "invocations": { + "items": { + "$ref": "#/$defs/Invocation" + }, + "type": "array" + }, + "artifacts": { + "items": { + "$ref": "#/$defs/Artifact" + }, + "type": "array" + }, + "results": { + "items": { + "$ref": "#/$defs/Result" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool", + "results" + ] + }, + "Suppression": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "kind": { + "type": "string" + }, + "status": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/Location" + }, + "guid": { + "type": "string" + }, + "justification": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind", + "status", + "location", + "guid", + "justification" + ] + }, + "Tool": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "driver": { + "$ref": "#/$defs/ToolComponent" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "driver" + ] + }, + "ToolComponent": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "informationUri": { + "type": "string" + }, + "notifications": { + "items": { + "$ref": "#/$defs/ReportingDescriptor" + }, + "type": "array" + }, + "rules": { + "items": { + "$ref": "#/$defs/ReportingDescriptor" + }, + "type": "array" + }, + "taxa": { + "items": { + "$ref": "#/$defs/ReportingDescriptor" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name", + "informationUri" + ] + }, + "ToolComponentReference": { + "properties": { + "properties": { + "$ref": "#/$defs/Properties" + }, + "name": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "guid": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name", + "index", + "guid" + ] + } + } +} \ No newline at end of file diff --git a/schemagen/schema.go b/schemagen/schema.go index 6533db82..574b0a06 100644 --- a/schemagen/schema.go +++ b/schemagen/schema.go @@ -15,6 +15,8 @@ package main import ( + "bytes" + "encoding/json" "flag" "fmt" "log" @@ -37,13 +39,20 @@ func main() { for _, entry := range entries { att := entry.Factory() schema := att.Schema() - json, err := schema.MarshalJSON() + schemaJson, err := schema.MarshalJSON() if err != nil { log.Fatal(err) } + var indented bytes.Buffer + err = json.Indent(&indented, schemaJson, "", " ") + if err != nil { + fmt.Println("Error marshalling JSON schema:", err) + os.Exit(1) + } + log.Printf("Writing schema for attestor %s to %s/%s.json", att.Name(), directory, att.Name()) - err = os.WriteFile(fmt.Sprintf("%s/%s.json", directory, att.Name()), json, 0644) + err = os.WriteFile(fmt.Sprintf("%s/%s.json", directory, att.Name()), indented.Bytes(), 0644) if err != nil { log.Fatal("Error writing to file:", err) } diff --git a/schemagen/slsa.json b/schemagen/slsa.json index 6b32db59..a7d60e42 100644 --- a/schemagen/slsa.json +++ b/schemagen/slsa.json @@ -1 +1,159 @@ -{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/in-toto/attestation/go/predicates/provenance/v1/provenance","$ref":"#/$defs/Provenance","$defs":{"BuildDefinition":{"properties":{"build_type":{"type":"string"},"external_parameters":{"$ref":"#/$defs/Struct"},"internal_parameters":{"$ref":"#/$defs/Struct"},"resolved_dependencies":{"items":{"$ref":"#/$defs/ResourceDescriptor"},"type":"array"}},"additionalProperties":false,"type":"object"},"BuildMetadata":{"properties":{"invocation_id":{"type":"string"},"started_on":{"$ref":"#/$defs/Timestamp"},"finished_on":{"$ref":"#/$defs/Timestamp"}},"additionalProperties":false,"type":"object"},"Builder":{"properties":{"id":{"type":"string"},"version":{"additionalProperties":{"type":"string"},"type":"object"},"builder_dependencies":{"items":{"$ref":"#/$defs/ResourceDescriptor"},"type":"array"}},"additionalProperties":false,"type":"object"},"Provenance":{"properties":{"build_definition":{"$ref":"#/$defs/BuildDefinition"},"run_details":{"$ref":"#/$defs/RunDetails"}},"additionalProperties":false,"type":"object"},"ResourceDescriptor":{"properties":{"name":{"type":"string"},"uri":{"type":"string"},"digest":{"additionalProperties":{"type":"string"},"type":"object"},"content":{"type":"string","contentEncoding":"base64"},"download_location":{"type":"string"},"media_type":{"type":"string"},"annotations":{"$ref":"#/$defs/Struct"}},"additionalProperties":false,"type":"object"},"RunDetails":{"properties":{"builder":{"$ref":"#/$defs/Builder"},"metadata":{"$ref":"#/$defs/BuildMetadata"},"byproducts":{"items":{"$ref":"#/$defs/ResourceDescriptor"},"type":"array"}},"additionalProperties":false,"type":"object"},"Struct":{"properties":{"fields":{"additionalProperties":{"$ref":"#/$defs/Value"},"type":"object"}},"additionalProperties":false,"type":"object"},"Timestamp":{"properties":{"seconds":{"type":"integer"},"nanos":{"type":"integer"}},"additionalProperties":false,"type":"object"},"Value":{"properties":{"Kind":true},"additionalProperties":false,"type":"object","required":["Kind"]}}} \ No newline at end of file +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/in-toto/attestation/go/predicates/provenance/v1/provenance", + "$ref": "#/$defs/Provenance", + "$defs": { + "BuildDefinition": { + "properties": { + "build_type": { + "type": "string" + }, + "external_parameters": { + "$ref": "#/$defs/Struct" + }, + "internal_parameters": { + "$ref": "#/$defs/Struct" + }, + "resolved_dependencies": { + "items": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object" + }, + "BuildMetadata": { + "properties": { + "invocation_id": { + "type": "string" + }, + "started_on": { + "$ref": "#/$defs/Timestamp" + }, + "finished_on": { + "$ref": "#/$defs/Timestamp" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Builder": { + "properties": { + "id": { + "type": "string" + }, + "version": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "builder_dependencies": { + "items": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Provenance": { + "properties": { + "build_definition": { + "$ref": "#/$defs/BuildDefinition" + }, + "run_details": { + "$ref": "#/$defs/RunDetails" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ResourceDescriptor": { + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "digest": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "content": { + "type": "string", + "contentEncoding": "base64" + }, + "download_location": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "annotations": { + "$ref": "#/$defs/Struct" + } + }, + "additionalProperties": false, + "type": "object" + }, + "RunDetails": { + "properties": { + "builder": { + "$ref": "#/$defs/Builder" + }, + "metadata": { + "$ref": "#/$defs/BuildMetadata" + }, + "byproducts": { + "items": { + "$ref": "#/$defs/ResourceDescriptor" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Struct": { + "properties": { + "fields": { + "additionalProperties": { + "$ref": "#/$defs/Value" + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Timestamp": { + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Value": { + "properties": { + "Kind": true + }, + "additionalProperties": false, + "type": "object", + "required": [ + "Kind" + ] + } + } +} \ No newline at end of file