Skip to content

Commit

Permalink
chore(deps): CycloneDX PredicateType changed to use in-toto-golang
Browse files Browse the repository at this point in the history
Signed-off-by: masahiro331 <m_fujimura@r.recruit.co.jp>
  • Loading branch information
masahiro331 committed Jul 13, 2022
1 parent 161b0c7 commit 06ddc4e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions pkg/cosign/attestation/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ type CosignVulnStatement struct {
Predicate CosignVulnPredicate `json:"predicate"`
}

// TODO: upstream to in-toto
type CycloneDXStatement struct {
in_toto.StatementHeader
Predicate interface{} `json:"predicate"`
}

type Invocation struct {
Parameters interface{} `json:"parameters"`
URI string `json:"uri"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/policy/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func AttestationToPayloadJSON(ctx context.Context, predicateType string, verifie
return nil, fmt.Errorf("marshaling SPDXStatement: %w", err)
}
case options.PredicateCycloneDX:
var cyclonedxStatement attestation.CycloneDXStatement
var cyclonedxStatement in_toto.CycloneDXStatement
if err := json.Unmarshal(decodedPayload, &cyclonedxStatement); err != nil {
return nil, fmt.Errorf("unmarshaling CycloneDXStatement: %w", err)
}
Expand Down

0 comments on commit 06ddc4e

Please sign in to comment.