diff --git a/go/predicates/provenance/v0/provenance.pb.go b/go/predicates/provenance/v0/provenance.pb.go new file mode 100644 index 00000000..bb68ed8b --- /dev/null +++ b/go/predicates/provenance/v0/provenance.pb.go @@ -0,0 +1,656 @@ +// Keep in sync with schema at https://slsa.dev/provenance/v0.2 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.28.3 +// source: in_toto_attestation/predicates/provenance/v0/provenance.proto + +package v0 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Proto representation of predicate type https://slsa.dev/provenance/v0.2 +// Validation of all fields is left to the users of this proto. +type Provenance struct { + state protoimpl.MessageState `protogen:"open.v1"` + Builder *Builder `protobuf:"bytes,1,opt,name=builder,proto3" json:"builder,omitempty"` + BuildType string `protobuf:"bytes,2,opt,name=build_type,json=buildType,proto3" json:"build_type,omitempty"` + Invocation *Invocation `protobuf:"bytes,3,opt,name=invocation,proto3" json:"invocation,omitempty"` + BuildConfig *structpb.Struct `protobuf:"bytes,4,opt,name=build_config,json=buildConfig,proto3" json:"build_config,omitempty"` + Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + Materials []*Material `protobuf:"bytes,6,rep,name=materials,proto3" json:"materials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Provenance) Reset() { + *x = Provenance{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Provenance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Provenance) ProtoMessage() {} + +func (x *Provenance) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Provenance.ProtoReflect.Descriptor instead. +func (*Provenance) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{0} +} + +func (x *Provenance) GetBuilder() *Builder { + if x != nil { + return x.Builder + } + return nil +} + +func (x *Provenance) GetBuildType() string { + if x != nil { + return x.BuildType + } + return "" +} + +func (x *Provenance) GetInvocation() *Invocation { + if x != nil { + return x.Invocation + } + return nil +} + +func (x *Provenance) GetBuildConfig() *structpb.Struct { + if x != nil { + return x.BuildConfig + } + return nil +} + +func (x *Provenance) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Provenance) GetMaterials() []*Material { + if x != nil { + return x.Materials + } + return nil +} + +type Builder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Builder) Reset() { + *x = Builder{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Builder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Builder) ProtoMessage() {} + +func (x *Builder) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Builder.ProtoReflect.Descriptor instead. +func (*Builder) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{1} +} + +func (x *Builder) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Invocation struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConfigSource *ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + Parameters *structpb.Struct `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"` + Environment *structpb.Struct `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Invocation) Reset() { + *x = Invocation{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Invocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Invocation) ProtoMessage() {} + +func (x *Invocation) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Invocation.ProtoReflect.Descriptor instead. +func (*Invocation) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{2} +} + +func (x *Invocation) GetConfigSource() *ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *Invocation) GetParameters() *structpb.Struct { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Invocation) GetEnvironment() *structpb.Struct { + if x != nil { + return x.Environment + } + return nil +} + +type ConfigSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Digest map[string]string `protobuf:"bytes,2,rep,name=digest,proto3" json:"digest,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + EntryPoint string `protobuf:"bytes,3,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigSource) Reset() { + *x = ConfigSource{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigSource) ProtoMessage() {} + +func (x *ConfigSource) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigSource.ProtoReflect.Descriptor instead. +func (*ConfigSource) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{3} +} + +func (x *ConfigSource) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *ConfigSource) GetDigest() map[string]string { + if x != nil { + return x.Digest + } + return nil +} + +func (x *ConfigSource) GetEntryPoint() string { + if x != nil { + return x.EntryPoint + } + return "" +} + +type Metadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildInvocationId string `protobuf:"bytes,1,opt,name=build_invocation_id,json=buildInvocationId,proto3" json:"build_invocation_id,omitempty"` + BuildStartedOn *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=build_started_on,json=buildStartedOn,proto3" json:"build_started_on,omitempty"` + BuildFinishedOn *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=build_finished_on,json=buildFinishedOn,proto3" json:"build_finished_on,omitempty"` + Completeness *Completeness `protobuf:"bytes,4,opt,name=completeness,proto3" json:"completeness,omitempty"` + Reproducible bool `protobuf:"varint,5,opt,name=reproducible,proto3" json:"reproducible,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{4} +} + +func (x *Metadata) GetBuildInvocationId() string { + if x != nil { + return x.BuildInvocationId + } + return "" +} + +func (x *Metadata) GetBuildStartedOn() *timestamppb.Timestamp { + if x != nil { + return x.BuildStartedOn + } + return nil +} + +func (x *Metadata) GetBuildFinishedOn() *timestamppb.Timestamp { + if x != nil { + return x.BuildFinishedOn + } + return nil +} + +func (x *Metadata) GetCompleteness() *Completeness { + if x != nil { + return x.Completeness + } + return nil +} + +func (x *Metadata) GetReproducible() bool { + if x != nil { + return x.Reproducible + } + return false +} + +type Completeness struct { + state protoimpl.MessageState `protogen:"open.v1"` + Parameters bool `protobuf:"varint,1,opt,name=parameters,proto3" json:"parameters,omitempty"` + Environment bool `protobuf:"varint,2,opt,name=environment,proto3" json:"environment,omitempty"` + Materials bool `protobuf:"varint,3,opt,name=materials,proto3" json:"materials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Completeness) Reset() { + *x = Completeness{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Completeness) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Completeness) ProtoMessage() {} + +func (x *Completeness) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Completeness.ProtoReflect.Descriptor instead. +func (*Completeness) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{5} +} + +func (x *Completeness) GetParameters() bool { + if x != nil { + return x.Parameters + } + return false +} + +func (x *Completeness) GetEnvironment() bool { + if x != nil { + return x.Environment + } + return false +} + +func (x *Completeness) GetMaterials() bool { + if x != nil { + return x.Materials + } + return false +} + +type Material struct { + state protoimpl.MessageState `protogen:"open.v1"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Digest map[string]string `protobuf:"bytes,2,rep,name=digest,proto3" json:"digest,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Material) Reset() { + *x = Material{} + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Material) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Material) ProtoMessage() {} + +func (x *Material) ProtoReflect() protoreflect.Message { + mi := &file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Material.ProtoReflect.Descriptor instead. +func (*Material) Descriptor() ([]byte, []int) { + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP(), []int{6} +} + +func (x *Material) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *Material) GetDigest() map[string]string { + if x != nil { + return x.Digest + } + return nil +} + +var File_in_toto_attestation_predicates_provenance_v0_provenance_proto protoreflect.FileDescriptor + +var file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x30, 0x2f, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x2c, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x03, 0x0a, + 0x0a, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, + 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0a, 0x69, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x38, 0x2e, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x52, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, + 0x76, 0x30, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x69, 0x6e, 0x5f, 0x74, 0x6f, + 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x52, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x19, 0x0a, 0x07, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x69, + 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x39, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x0c, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x5e, 0x0a, + 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, + 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x39, + 0x0a, 0x0b, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x02, 0x0a, 0x08, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x46, 0x0a, 0x11, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x5e, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x69, 0x6e, 0x5f, + 0x74, 0x6f, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x69, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x6e, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x5a, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x69, 0x6e, 0x5f, 0x74, 0x6f, 0x74, + 0x6f, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, + 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x64, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x73, + 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, 0x6e, 0x74, 0x6f, + 0x74, 0x6f, 0x2e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x30, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x2d, 0x74, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescOnce sync.Once + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescData = file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDesc +) + +func file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescGZIP() []byte { + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescOnce.Do(func() { + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescData = protoimpl.X.CompressGZIP(file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescData) + }) + return file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDescData +} + +var file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_in_toto_attestation_predicates_provenance_v0_provenance_proto_goTypes = []any{ + (*Provenance)(nil), // 0: in_toto_attestation.predicates.provenance.v0.Provenance + (*Builder)(nil), // 1: in_toto_attestation.predicates.provenance.v0.Builder + (*Invocation)(nil), // 2: in_toto_attestation.predicates.provenance.v0.Invocation + (*ConfigSource)(nil), // 3: in_toto_attestation.predicates.provenance.v0.ConfigSource + (*Metadata)(nil), // 4: in_toto_attestation.predicates.provenance.v0.Metadata + (*Completeness)(nil), // 5: in_toto_attestation.predicates.provenance.v0.Completeness + (*Material)(nil), // 6: in_toto_attestation.predicates.provenance.v0.Material + nil, // 7: in_toto_attestation.predicates.provenance.v0.ConfigSource.DigestEntry + nil, // 8: in_toto_attestation.predicates.provenance.v0.Material.DigestEntry + (*structpb.Struct)(nil), // 9: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp +} +var file_in_toto_attestation_predicates_provenance_v0_provenance_proto_depIdxs = []int32{ + 1, // 0: in_toto_attestation.predicates.provenance.v0.Provenance.builder:type_name -> in_toto_attestation.predicates.provenance.v0.Builder + 2, // 1: in_toto_attestation.predicates.provenance.v0.Provenance.invocation:type_name -> in_toto_attestation.predicates.provenance.v0.Invocation + 9, // 2: in_toto_attestation.predicates.provenance.v0.Provenance.build_config:type_name -> google.protobuf.Struct + 4, // 3: in_toto_attestation.predicates.provenance.v0.Provenance.metadata:type_name -> in_toto_attestation.predicates.provenance.v0.Metadata + 6, // 4: in_toto_attestation.predicates.provenance.v0.Provenance.materials:type_name -> in_toto_attestation.predicates.provenance.v0.Material + 3, // 5: in_toto_attestation.predicates.provenance.v0.Invocation.config_source:type_name -> in_toto_attestation.predicates.provenance.v0.ConfigSource + 9, // 6: in_toto_attestation.predicates.provenance.v0.Invocation.parameters:type_name -> google.protobuf.Struct + 9, // 7: in_toto_attestation.predicates.provenance.v0.Invocation.environment:type_name -> google.protobuf.Struct + 7, // 8: in_toto_attestation.predicates.provenance.v0.ConfigSource.digest:type_name -> in_toto_attestation.predicates.provenance.v0.ConfigSource.DigestEntry + 10, // 9: in_toto_attestation.predicates.provenance.v0.Metadata.build_started_on:type_name -> google.protobuf.Timestamp + 10, // 10: in_toto_attestation.predicates.provenance.v0.Metadata.build_finished_on:type_name -> google.protobuf.Timestamp + 5, // 11: in_toto_attestation.predicates.provenance.v0.Metadata.completeness:type_name -> in_toto_attestation.predicates.provenance.v0.Completeness + 8, // 12: in_toto_attestation.predicates.provenance.v0.Material.digest:type_name -> in_toto_attestation.predicates.provenance.v0.Material.DigestEntry + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_in_toto_attestation_predicates_provenance_v0_provenance_proto_init() } +func file_in_toto_attestation_predicates_provenance_v0_provenance_proto_init() { + if File_in_toto_attestation_predicates_provenance_v0_provenance_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_in_toto_attestation_predicates_provenance_v0_provenance_proto_goTypes, + DependencyIndexes: file_in_toto_attestation_predicates_provenance_v0_provenance_proto_depIdxs, + MessageInfos: file_in_toto_attestation_predicates_provenance_v0_provenance_proto_msgTypes, + }.Build() + File_in_toto_attestation_predicates_provenance_v0_provenance_proto = out.File + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_rawDesc = nil + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_goTypes = nil + file_in_toto_attestation_predicates_provenance_v0_provenance_proto_depIdxs = nil +} diff --git a/protos/in_toto_attestation/predicates/provenance/v0/provenance.proto b/protos/in_toto_attestation/predicates/provenance/v0/provenance.proto new file mode 100644 index 00000000..59559915 --- /dev/null +++ b/protos/in_toto_attestation/predicates/provenance/v0/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; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/in-toto/attestation/go/predicates/provenance/v0"; +option java_package = "io.github.intoto.attestation.predicates.provenance.v0"; + +// 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; +}