Skip to content

Commit

Permalink
Add vex attestor to imports and generate schema
Browse files Browse the repository at this point in the history
Signed-off-by: John Kjell <[email protected]>
  • Loading branch information
jkjell committed Jun 15, 2024
1 parent 4240aa9 commit ac632d1
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 0 deletions.
1 change: 1 addition & 0 deletions imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
_ "github.com/in-toto/go-witness/attestation/sarif"
_ "github.com/in-toto/go-witness/attestation/sbom"
_ "github.com/in-toto/go-witness/attestation/slsa"
_ "github.com/in-toto/go-witness/attestation/vex"

// signer providers
_ "github.com/in-toto/go-witness/signer/file"
Expand Down
202 changes: 202 additions & 0 deletions schemagen/vex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "#/$defs/Attestor",
"$defs": {
"Attestor": {
"properties": {
"vexDocument": {
"$ref": "#/$defs/VEX"
},
"reportFileName": {
"type": "string"
},
"reportDigestSet": {
"$ref": "#/$defs/DigestSet"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"vexDocument"
]
},
"DigestSet": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"Product": {
"properties": {
"@id": {
"type": "string"
},
"hashes": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"identifiers": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"supplier": {
"type": "string"
},
"subcomponents": {
"items": {
"$ref": "#/$defs/Subcomponent"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"Statement": {
"properties": {
"@id": {
"type": "string"
},
"vulnerability": {
"$ref": "#/$defs/Vulnerability"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"last_updated": {
"type": "string",
"format": "date-time"
},
"products": {
"items": {
"$ref": "#/$defs/Product"
},
"type": "array"
},
"status": {
"type": "string"
},
"status_notes": {
"type": "string"
},
"justification": {
"type": "string"
},
"impact_statement": {
"type": "string"
},
"action_statement": {
"type": "string"
},
"action_statement_timestamp": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"status"
]
},
"Subcomponent": {
"properties": {
"@id": {
"type": "string"
},
"hashes": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"identifiers": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"supplier": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"VEX": {
"properties": {
"@context": {
"type": "string"
},
"@id": {
"type": "string"
},
"author": {
"type": "string"
},
"role": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"last_updated": {
"type": "string",
"format": "date-time"
},
"version": {
"type": "integer"
},
"tooling": {
"type": "string"
},
"supplier": {
"type": "string"
},
"statements": {
"items": {
"$ref": "#/$defs/Statement"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"@context",
"@id",
"author",
"timestamp",
"version",
"statements"
]
},
"Vulnerability": {
"properties": {
"@id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"aliases": {
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
}
}
}

0 comments on commit ac632d1

Please sign in to comment.