diff --git a/pkg/chains/formats/intotoite6/intotoite6_test.go b/pkg/chains/formats/intotoite6/intotoite6_test.go index 23f0feadb9..1127664413 100644 --- a/pkg/chains/formats/intotoite6/intotoite6_test.go +++ b/pkg/chains/formats/intotoite6/intotoite6_test.go @@ -167,7 +167,7 @@ func TestPipelineRunCreatePayload(t *testing.T) { Builder: slsa.ProvenanceBuilder{ ID: "test_builder-1", }, - BuildType: "https://tekton.dev/attestations/chains/pipelinerun@v2", + BuildType: "tekton.dev/v1beta1/PipelineRun", BuildConfig: pipelinerun.BuildConfig{ Tasks: []pipelinerun.TaskAttestation{ { @@ -355,7 +355,7 @@ func TestPipelineRunCreatePayloadChildRefs(t *testing.T) { Builder: slsa.ProvenanceBuilder{ ID: "test_builder-1", }, - BuildType: "https://tekton.dev/attestations/chains/pipelinerun@v2", + BuildType: "tekton.dev/v1beta1/PipelineRun", BuildConfig: pipelinerun.BuildConfig{ Tasks: []pipelinerun.TaskAttestation{ { diff --git a/pkg/chains/formats/intotoite6/pipelinerun/pipelinerun.go b/pkg/chains/formats/intotoite6/pipelinerun/pipelinerun.go index 760a742c3e..2b9901280f 100644 --- a/pkg/chains/formats/intotoite6/pipelinerun/pipelinerun.go +++ b/pkg/chains/formats/intotoite6/pipelinerun/pipelinerun.go @@ -14,6 +14,7 @@ limitations under the License. package pipelinerun import ( + "fmt" "time" intoto "github.com/in-toto/in-toto-golang/in_toto" @@ -27,10 +28,6 @@ import ( "knative.dev/pkg/apis" ) -const ( - TektonPipelineRunID = "https://tekton.dev/attestations/chains/pipelinerun@v2" -) - type BuildConfig struct { Tasks []TaskAttestation `json:"tasks"` } @@ -60,7 +57,7 @@ func GenerateAttestation(builderID string, pro *objects.PipelineRunObject, logge Builder: slsa.ProvenanceBuilder{ ID: builderID, }, - BuildType: TektonPipelineRunID, + BuildType: fmt.Sprintf("%s/%s", pro.GetGroupVersionKind().GroupVersion().String(), pro.GetGroupVersionKind().Kind), Invocation: invocation(pro), BuildConfig: buildConfig(pro, logger), Metadata: metadata(pro), diff --git a/pkg/chains/formats/intotoite6/taskrun/taskrun.go b/pkg/chains/formats/intotoite6/taskrun/taskrun.go index 6f4f71caa0..0374a53708 100644 --- a/pkg/chains/formats/intotoite6/taskrun/taskrun.go +++ b/pkg/chains/formats/intotoite6/taskrun/taskrun.go @@ -26,10 +26,6 @@ import ( "go.uber.org/zap" ) -const ( - TektonID = "https://tekton.dev/attestations/chains@v2" -) - func GenerateAttestation(builderID string, tro *objects.TaskRunObject, logger *zap.SugaredLogger) (interface{}, error) { subjects := extract.SubjectDigests(tro, logger)