| 1 |
// Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/spec/v1.0/schema/provenance.proto |
| 2 |
syntax = "proto3"; |
| 3 |
|
| 4 |
package in_toto_attestation.predicates.provenance.v1; |
| 5 |
|
| 6 |
import "in_toto_attestation/v1/resource_descriptor.proto"; |
| 7 |
import "google/protobuf/struct.proto"; |
| 8 |
import "google/protobuf/timestamp.proto"; |
| 9 |
|
| 10 |
option go_package = "github.com/in-toto/attestation/go/predicates/provenance/v1"; |
| 11 |
option java_package = "io.github.intoto.attestation.predicates.provenance.v1"; |
| 12 |
|
| 13 |
// Proto representation of predicate type https://slsa.dev/provenance/v1 |
| 14 |
// Validation of all fields is left to the users of this proto. |
| 15 |
message Provenance { |
| 16 |
BuildDefinition build_definition = 1; |
| 17 |
RunDetails run_details = 2; |
| 18 |
} |
| 19 |
|
| 20 |
message BuildDefinition { |
| 21 |
string build_type = 1; |
| 22 |
google.protobuf.Struct external_parameters = 2; |
| 23 |
google.protobuf.Struct internal_parameters = 3; |
| 24 |
repeated in_toto_attestation.v1.ResourceDescriptor resolved_dependencies = 4; |
| 25 |
} |
| 26 |
|
| 27 |
message RunDetails { |
| 28 |
Builder builder = 1; |
| 29 |
BuildMetadata metadata = 2; |
| 30 |
repeated in_toto_attestation.v1.ResourceDescriptor byproducts = 3; |
| 31 |
} |
| 32 |
|
| 33 |
message Builder { |
| 34 |
string id = 1; |
| 35 |
map<string, string> version = 2; |
| 36 |
repeated in_toto_attestation.v1.ResourceDescriptor builder_dependencies = 3; |
| 37 |
} |
| 38 |
|
| 39 |
message BuildMetadata { |
| 40 |
string invocation_id = 1; |
| 41 |
google.protobuf.Timestamp started_on = 2; |
| 42 |
google.protobuf.Timestamp finished_on = 3; |
| 43 |
} |