Skip to content

Commit

Permalink
Add CycloneDX predicate
Browse files Browse the repository at this point in the history
This commit adds CycloneDX as a recognized predicate type

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
  • Loading branch information
puerco committed Jun 8, 2022
1 parent 07976bf commit dc9c576
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions in_toto/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ const (
// The SPDX mandates 'spdxVersion' field, so predicate type can omit
// version.
PredicateSPDX = "https://spdx.dev/Document"
// PredicateCycloneDX represents a CycloneDX SBOM
PredicateCycloneDX = "https://cyclonedx.org/schema"
// PredicateLinkV1 represents an in-toto 0.9 link.
PredicateLinkV1 = "https://in-toto.io/Link/v1"
)
Expand Down Expand Up @@ -1008,6 +1010,16 @@ type SPDXStatement struct {
Predicate interface{} `json:"predicate"`
}

/*
CycloneDXStatement defines a cyclonedx sbom in the predicate. It is not
currently serialized like its SPDX counterpart. Currently iy is an empty
interface, like the generic Statement.
*/
type CycloneDXStatement struct {
StatementHeader
Predicate interface{} `json:"predicate"`
}

/*
DSSESigner provides signature generation and validation based on the SSL
Signing Spec: https://github.com/secure-systems-lab/signing-spec
Expand Down

0 comments on commit dc9c576

Please sign in to comment.