From 79582c49fc7f2a5ec8d8a03cf5684bfd02b75b28 Mon Sep 17 00:00:00 2001 From: Billy Lynch Date: Wed, 8 Mar 2023 14:33:28 -0500 Subject: [PATCH] Add type aliases to v0.2 provenance to revert backwards incompatible change. Tripped over a few upgrade issues in sigstore + tekton projects: ``` undefined: v0.2.DigestSet ``` This adds a type alias to the v0.2 package to point to the common package to let things pass. --- in_toto/slsa_provenance/v0.2/provenance.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/in_toto/slsa_provenance/v0.2/provenance.go b/in_toto/slsa_provenance/v0.2/provenance.go index 5fca7abb..40416e29 100644 --- a/in_toto/slsa_provenance/v0.2/provenance.go +++ b/in_toto/slsa_provenance/v0.2/provenance.go @@ -11,6 +11,13 @@ const ( PredicateSLSAProvenance = "https://slsa.dev/provenance/v0.2" ) +// These are type aliases to common to avoid backwards incompatible changes. +type ( + DigestSet = common.DigestSet + ProvenanceBuilder = common.ProvenanceBuilder + ProvenanceMaterial = common.ProvenanceMaterial +) + // ProvenancePredicate is the provenance predicate definition. type ProvenancePredicate struct { // Builder identifies the entity that executed the invocation, which is trusted to have