Skip to content

Commit

Permalink
add slsa provenance predicate v0.2
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Joseph <[email protected]>
  • Loading branch information
kpauljoseph committed Nov 29, 2024
1 parent d726fad commit 4c0de80
Showing 1 changed file with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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<string, string> 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<string, string> digest = 2;
}

0 comments on commit 4c0de80

Please sign in to comment.