From 4c0de80cb1555feb5fa1e7613f5569defe5d45fd Mon Sep 17 00:00:00 2001 From: Paul Joseph Date: Fri, 29 Nov 2024 15:23:20 +0530 Subject: [PATCH] add slsa provenance predicate v0.2 Signed-off-by: Paul Joseph --- .../provenance/v0.2/provenance.proto | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 protos/in_toto_attestation/predicates/provenance/v0.2/provenance.proto diff --git a/protos/in_toto_attestation/predicates/provenance/v0.2/provenance.proto b/protos/in_toto_attestation/predicates/provenance/v0.2/provenance.proto new file mode 100644 index 00000000..5eccfc42 --- /dev/null +++ b/protos/in_toto_attestation/predicates/provenance/v0.2/provenance.proto @@ -0,0 +1,56 @@ +// Keep in sync with schema at https://slsa.dev/provenance/v0.2 +syntax = "proto3"; + +package in_toto_attestation.predicates.provenance.v0_2; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/in-toto/attestation/go/predicates/provenance/v0_2"; +option java_package = "io.github.intoto.attestation.predicates.provenance.v0_2"; + +// Proto representation of predicate type https://slsa.dev/provenance/v0.2 +// Validation of all fields is left to the users of this proto. +message Provenance { + Builder builder = 1; + string build_type = 2; + Invocation invocation = 3; + google.protobuf.Struct build_config = 4; + Metadata metadata = 5; + repeated Material materials = 6; +} + +message Builder { + string id = 1; +} + +message Invocation { + ConfigSource config_source = 1; + google.protobuf.Struct parameters = 2; + google.protobuf.Struct environment = 3; +} + +message ConfigSource { + string uri = 1; + map digest = 2; + string entry_point = 3; +} + +message Metadata { + string build_invocation_id = 1; + google.protobuf.Timestamp build_started_on = 2; + google.protobuf.Timestamp build_finished_on = 3; + Completeness completeness = 4; + bool reproducible = 5; +} + +message Completeness { + bool parameters = 1; + bool environment = 2; + bool materials = 3; +} + +message Material { + string uri = 1; + map digest = 2; +} \ No newline at end of file