-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBOM and Omnitrail Attestor #464
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c58ffe4
Add new docs and schema for new SBOM attestor. Also includes schema u…
jkjell 0c15286
Update docs and fix multiple signatures
jkjell 616eab9
Update to go-witness v0.5.0 and support testing on Darwin/Mac (no tra…
jkjell 584b3ff
Add testing and policy for SBOM attestations
jkjell 55d15ab
Update to go-witness v0.5.1
jkjell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$ref": "#/$defs/Attestor", | ||
"$defs": { | ||
"Attestor": { | ||
"properties": { | ||
"Envelope": { | ||
"$ref": "#/$defs/Envelope" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"Envelope" | ||
] | ||
}, | ||
"Element": { | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
}, | ||
"sha1": { | ||
"type": "string" | ||
}, | ||
"sha256": { | ||
"type": "string" | ||
}, | ||
"gitoid:sha1": { | ||
"type": "string" | ||
}, | ||
"gitoid:sha256": { | ||
"type": "string" | ||
}, | ||
"posix": { | ||
"$ref": "#/$defs/Posix" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
] | ||
}, | ||
"Envelope": { | ||
"properties": { | ||
"header": { | ||
"$ref": "#/$defs/Header" | ||
}, | ||
"mapping": { | ||
"additionalProperties": { | ||
"$ref": "#/$defs/Element" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"header", | ||
"mapping" | ||
] | ||
}, | ||
"Feature": { | ||
"properties": { | ||
"algorithms": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"Header": { | ||
"properties": { | ||
"features": { | ||
"additionalProperties": { | ||
"$ref": "#/$defs/Feature" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"features" | ||
] | ||
}, | ||
"Posix": { | ||
"properties": { | ||
"atime": { | ||
"type": "string" | ||
}, | ||
"ctime": { | ||
"type": "string" | ||
}, | ||
"creation_time": { | ||
"type": "string" | ||
}, | ||
"extended_attributes": { | ||
"type": "string" | ||
}, | ||
"file_device_id": { | ||
"type": "string" | ||
}, | ||
"file_flags": { | ||
"type": "string" | ||
}, | ||
"file_inode": { | ||
"type": "string" | ||
}, | ||
"file_system_id": { | ||
"type": "string" | ||
}, | ||
"file_type": { | ||
"type": "string" | ||
}, | ||
"hard_link_count": { | ||
"type": "string" | ||
}, | ||
"mtime": { | ||
"type": "string" | ||
}, | ||
"metadata_ctime": { | ||
"type": "string" | ||
}, | ||
"owner_gid": { | ||
"type": "string" | ||
}, | ||
"owner_uid": { | ||
"type": "string" | ||
}, | ||
"permissions": { | ||
"type": "string" | ||
}, | ||
"size": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
## Schema | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to have docs for this new attestor. @fkautz maybe you have a couple mins to add this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed #465 to not block this PR. |
||
```json | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$ref": "#/$defs/Attestor", | ||
"$defs": { | ||
"Attestor": { | ||
"properties": { | ||
"Envelope": { | ||
"$ref": "#/$defs/Envelope" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"Envelope" | ||
] | ||
}, | ||
"Element": { | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
}, | ||
"sha1": { | ||
"type": "string" | ||
}, | ||
"sha256": { | ||
"type": "string" | ||
}, | ||
"gitoid:sha1": { | ||
"type": "string" | ||
}, | ||
"gitoid:sha256": { | ||
"type": "string" | ||
}, | ||
"posix": { | ||
"$ref": "#/$defs/Posix" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
] | ||
}, | ||
"Envelope": { | ||
"properties": { | ||
"header": { | ||
"$ref": "#/$defs/Header" | ||
}, | ||
"mapping": { | ||
"additionalProperties": { | ||
"$ref": "#/$defs/Element" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"header", | ||
"mapping" | ||
] | ||
}, | ||
"Feature": { | ||
"properties": { | ||
"algorithms": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"Header": { | ||
"properties": { | ||
"features": { | ||
"additionalProperties": { | ||
"$ref": "#/$defs/Feature" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"features" | ||
] | ||
}, | ||
"Posix": { | ||
"properties": { | ||
"atime": { | ||
"type": "string" | ||
}, | ||
"ctime": { | ||
"type": "string" | ||
}, | ||
"creation_time": { | ||
"type": "string" | ||
}, | ||
"extended_attributes": { | ||
"type": "string" | ||
}, | ||
"file_device_id": { | ||
"type": "string" | ||
}, | ||
"file_flags": { | ||
"type": "string" | ||
}, | ||
"file_inode": { | ||
"type": "string" | ||
}, | ||
"file_system_id": { | ||
"type": "string" | ||
}, | ||
"file_type": { | ||
"type": "string" | ||
}, | ||
"hard_link_count": { | ||
"type": "string" | ||
}, | ||
"mtime": { | ||
"type": "string" | ||
}, | ||
"metadata_ctime": { | ||
"type": "string" | ||
}, | ||
"owner_gid": { | ||
"type": "string" | ||
}, | ||
"owner_uid": { | ||
"type": "string" | ||
}, | ||
"permissions": { | ||
"type": "string" | ||
}, | ||
"size": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/in-toto/go-witness/attestation/sbom/sbom-attestor", | ||
"$ref": "#/$defs/SBOMAttestor", | ||
"$defs": { | ||
"SBOMAttestor": { | ||
"properties": { | ||
"SBOMDocument": true | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"SBOMDocument" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SBOM Attestor | ||
|
||
The SBOM attestor records the contents of any [products](./product.md) that are valid [CycloneDX](https://cyclonedx.org/specification/overview/) or [SPDX](https://spdx.dev/learn/overview/) json files. The SBOM file is parsed and the contents are recorded in the attestation. | ||
|
||
## Schema | ||
```json | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/in-toto/go-witness/attestation/sbom/sbom-attestor", | ||
"$ref": "#/$defs/SBOMAttestor", | ||
"$defs": { | ||
"SBOMAttestor": { | ||
"properties": { | ||
"SBOMDocument": true | ||
}, | ||
"additionalProperties": false, | ||
"type": "object", | ||
"required": [ | ||
"SBOMDocument" | ||
] | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha, we were calling this twice?