From 4ac44f3c1a6b3397fb72df7b1cb51572af60518d Mon Sep 17 00:00:00 2001 From: Nick Schuch Date: Tue, 10 Nov 2026 09:05:33 +0000 Subject: [PATCH] feat(release) Add SbomList RPC - Add SbomList rpc to the release service for listing software components in a release image - Add ReleaseSbomListRequest, ReleaseSbomListResponse and ReleaseSbomComponent messages - Regenerate pb/release.pb.go and pb/release_grpc.pb.go --- pb/release.pb.go | 315 ++++++++++++++++++++++++++++++++++++------ pb/release_grpc.pb.go | 36 +++++ release.proto | 25 ++++ 3 files changed, 336 insertions(+), 40 deletions(-) diff --git a/pb/release.pb.go b/pb/release.pb.go index 18634ce..81bf042 100644 --- a/pb/release.pb.go +++ b/pb/release.pb.go @@ -549,6 +549,177 @@ func (x *ReleaseSignerInfoResponse) GetIdentifier() string { return "" } +// * +// List the software components in a release image +type ReleaseSbomListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Release string `protobuf:"bytes,1,opt,name=Release,proto3" json:"Release,omitempty"` // Name of the release + Image string `protobuf:"bytes,2,opt,name=Image,proto3" json:"Image,omitempty"` // Name of the release image +} + +func (x *ReleaseSbomListRequest) Reset() { + *x = ReleaseSbomListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_release_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseSbomListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseSbomListRequest) ProtoMessage() {} + +func (x *ReleaseSbomListRequest) ProtoReflect() protoreflect.Message { + mi := &file_release_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseSbomListRequest.ProtoReflect.Descriptor instead. +func (*ReleaseSbomListRequest) Descriptor() ([]byte, []int) { + return file_release_proto_rawDescGZIP(), []int{10} +} + +func (x *ReleaseSbomListRequest) GetRelease() string { + if x != nil { + return x.Release + } + return "" +} + +func (x *ReleaseSbomListRequest) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +// * +// Returns the software components in a release image +type ReleaseSbomListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*ReleaseSbomComponent `protobuf:"bytes,1,rep,name=Items,proto3" json:"Items,omitempty"` // Components in the image +} + +func (x *ReleaseSbomListResponse) Reset() { + *x = ReleaseSbomListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_release_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseSbomListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseSbomListResponse) ProtoMessage() {} + +func (x *ReleaseSbomListResponse) ProtoReflect() protoreflect.Message { + mi := &file_release_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseSbomListResponse.ProtoReflect.Descriptor instead. +func (*ReleaseSbomListResponse) Descriptor() ([]byte, []int) { + return file_release_proto_rawDescGZIP(), []int{11} +} + +func (x *ReleaseSbomListResponse) GetItems() []*ReleaseSbomComponent { + if x != nil { + return x.Items + } + return nil +} + +// * +// A software component in a release image +type ReleaseSbomComponent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // Name as the ecosystem spells it, e.g. drupal/core + Version string `protobuf:"bytes,2,opt,name=Version,proto3" json:"Version,omitempty"` // Version of the component + Ecosystem string `protobuf:"bytes,3,opt,name=Ecosystem,proto3" json:"Ecosystem,omitempty"` // Package ecosystem, e.g. composer, npm, deb +} + +func (x *ReleaseSbomComponent) Reset() { + *x = ReleaseSbomComponent{} + if protoimpl.UnsafeEnabled { + mi := &file_release_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseSbomComponent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseSbomComponent) ProtoMessage() {} + +func (x *ReleaseSbomComponent) ProtoReflect() protoreflect.Message { + mi := &file_release_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseSbomComponent.ProtoReflect.Descriptor instead. +func (*ReleaseSbomComponent) Descriptor() ([]byte, []int) { + return file_release_proto_rawDescGZIP(), []int{12} +} + +func (x *ReleaseSbomComponent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ReleaseSbomComponent) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ReleaseSbomComponent) GetEcosystem() string { + if x != nil { + return x.Ecosystem + } + return "" +} + var File_release_proto protoreflect.FileDescriptor var file_release_proto_rawDesc = []byte{ @@ -597,27 +768,49 @@ var file_release_proto_rawDesc = []byte{ 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x32, 0xbd, 0x02, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x04, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x62, 0x6f, 0x6d, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x4f, 0x0a, 0x17, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x62, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x62, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x62, 0x0a, 0x14, 0x52, + 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x62, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x32, + 0x90, 0x03, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x1c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x45, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x51, 0x0a, 0x08, 0x53, 0x62, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x62, + 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x53, 0x62, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -632,7 +825,7 @@ func file_release_proto_rawDescGZIP() []byte { return file_release_proto_rawDescData } -var file_release_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_release_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_release_proto_goTypes = []interface{}{ (*ReleaseCreateRequest)(nil), // 0: workflow.ReleaseCreateRequest (*ReleaseImage)(nil), // 1: workflow.ReleaseImage @@ -644,25 +837,31 @@ var file_release_proto_goTypes = []interface{}{ (*ReleaseListItem)(nil), // 7: workflow.ReleaseListItem (*ReleaseSignerInfoRequest)(nil), // 8: workflow.ReleaseSignerInfoRequest (*ReleaseSignerInfoResponse)(nil), // 9: workflow.ReleaseSignerInfoResponse + (*ReleaseSbomListRequest)(nil), // 10: workflow.ReleaseSbomListRequest + (*ReleaseSbomListResponse)(nil), // 11: workflow.ReleaseSbomListResponse + (*ReleaseSbomComponent)(nil), // 12: workflow.ReleaseSbomComponent } var file_release_proto_depIdxs = []int32{ - 1, // 0: workflow.ReleaseCreateRequest.Images:type_name -> workflow.ReleaseImage - 1, // 1: workflow.ReleaseInfoResponse.Images:type_name -> workflow.ReleaseImage - 7, // 2: workflow.ReleaseListResponse.Items:type_name -> workflow.ReleaseListItem - 1, // 3: workflow.ReleaseListItem.Images:type_name -> workflow.ReleaseImage - 0, // 4: workflow.release.Create:input_type -> workflow.ReleaseCreateRequest - 3, // 5: workflow.release.Info:input_type -> workflow.ReleaseInfoRequest - 5, // 6: workflow.release.List:input_type -> workflow.ReleaseListRequest - 8, // 7: workflow.release.SignerInfo:input_type -> workflow.ReleaseSignerInfoRequest - 2, // 8: workflow.release.Create:output_type -> workflow.ReleaseCreateResponse - 4, // 9: workflow.release.Info:output_type -> workflow.ReleaseInfoResponse - 6, // 10: workflow.release.List:output_type -> workflow.ReleaseListResponse - 9, // 11: workflow.release.SignerInfo:output_type -> workflow.ReleaseSignerInfoResponse - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 1, // 0: workflow.ReleaseCreateRequest.Images:type_name -> workflow.ReleaseImage + 1, // 1: workflow.ReleaseInfoResponse.Images:type_name -> workflow.ReleaseImage + 7, // 2: workflow.ReleaseListResponse.Items:type_name -> workflow.ReleaseListItem + 1, // 3: workflow.ReleaseListItem.Images:type_name -> workflow.ReleaseImage + 12, // 4: workflow.ReleaseSbomListResponse.Items:type_name -> workflow.ReleaseSbomComponent + 0, // 5: workflow.release.Create:input_type -> workflow.ReleaseCreateRequest + 3, // 6: workflow.release.Info:input_type -> workflow.ReleaseInfoRequest + 5, // 7: workflow.release.List:input_type -> workflow.ReleaseListRequest + 8, // 8: workflow.release.SignerInfo:input_type -> workflow.ReleaseSignerInfoRequest + 10, // 9: workflow.release.SbomList:input_type -> workflow.ReleaseSbomListRequest + 2, // 10: workflow.release.Create:output_type -> workflow.ReleaseCreateResponse + 4, // 11: workflow.release.Info:output_type -> workflow.ReleaseInfoResponse + 6, // 12: workflow.release.List:output_type -> workflow.ReleaseListResponse + 9, // 13: workflow.release.SignerInfo:output_type -> workflow.ReleaseSignerInfoResponse + 11, // 14: workflow.release.SbomList:output_type -> workflow.ReleaseSbomListResponse + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_release_proto_init() } @@ -791,6 +990,42 @@ func file_release_proto_init() { return nil } } + file_release_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseSbomListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_release_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseSbomListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_release_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseSbomComponent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -798,7 +1033,7 @@ func file_release_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_release_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/pb/release_grpc.pb.go b/pb/release_grpc.pb.go index 78e1242..d699aca 100644 --- a/pb/release_grpc.pb.go +++ b/pb/release_grpc.pb.go @@ -26,6 +26,7 @@ type ReleaseClient interface { Info(ctx context.Context, in *ReleaseInfoRequest, opts ...grpc.CallOption) (*ReleaseInfoResponse, error) List(ctx context.Context, in *ReleaseListRequest, opts ...grpc.CallOption) (*ReleaseListResponse, error) SignerInfo(ctx context.Context, in *ReleaseSignerInfoRequest, opts ...grpc.CallOption) (*ReleaseSignerInfoResponse, error) + SbomList(ctx context.Context, in *ReleaseSbomListRequest, opts ...grpc.CallOption) (*ReleaseSbomListResponse, error) } type releaseClient struct { @@ -72,6 +73,15 @@ func (c *releaseClient) SignerInfo(ctx context.Context, in *ReleaseSignerInfoReq return out, nil } +func (c *releaseClient) SbomList(ctx context.Context, in *ReleaseSbomListRequest, opts ...grpc.CallOption) (*ReleaseSbomListResponse, error) { + out := new(ReleaseSbomListResponse) + err := c.cc.Invoke(ctx, "/workflow.release/SbomList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ReleaseServer is the server API for Release service. // All implementations must embed UnimplementedReleaseServer // for forward compatibility @@ -80,6 +90,7 @@ type ReleaseServer interface { Info(context.Context, *ReleaseInfoRequest) (*ReleaseInfoResponse, error) List(context.Context, *ReleaseListRequest) (*ReleaseListResponse, error) SignerInfo(context.Context, *ReleaseSignerInfoRequest) (*ReleaseSignerInfoResponse, error) + SbomList(context.Context, *ReleaseSbomListRequest) (*ReleaseSbomListResponse, error) mustEmbedUnimplementedReleaseServer() } @@ -99,6 +110,9 @@ func (UnimplementedReleaseServer) List(context.Context, *ReleaseListRequest) (*R func (UnimplementedReleaseServer) SignerInfo(context.Context, *ReleaseSignerInfoRequest) (*ReleaseSignerInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SignerInfo not implemented") } +func (UnimplementedReleaseServer) SbomList(context.Context, *ReleaseSbomListRequest) (*ReleaseSbomListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SbomList not implemented") +} func (UnimplementedReleaseServer) mustEmbedUnimplementedReleaseServer() {} // UnsafeReleaseServer may be embedded to opt out of forward compatibility for this service. @@ -184,6 +198,24 @@ func _Release_SignerInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Release_SbomList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleaseSbomListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReleaseServer).SbomList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/workflow.release/SbomList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReleaseServer).SbomList(ctx, req.(*ReleaseSbomListRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Release_ServiceDesc is the grpc.ServiceDesc for Release service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -207,6 +239,10 @@ var Release_ServiceDesc = grpc.ServiceDesc{ MethodName: "SignerInfo", Handler: _Release_SignerInfo_Handler, }, + { + MethodName: "SbomList", + Handler: _Release_SbomList_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "release.proto", diff --git a/release.proto b/release.proto index d032cb8..6add773 100644 --- a/release.proto +++ b/release.proto @@ -10,6 +10,7 @@ service release { rpc Info (ReleaseInfoRequest) returns (ReleaseInfoResponse) {} rpc List (ReleaseListRequest) returns (ReleaseListResponse) {} rpc SignerInfo (ReleaseSignerInfoRequest) returns (ReleaseSignerInfoResponse) {} + rpc SbomList (ReleaseSbomListRequest) returns (ReleaseSbomListResponse) {} } /** @@ -83,3 +84,27 @@ message ReleaseSignerInfoRequest {} message ReleaseSignerInfoResponse { string Identifier = 1; // Identifier for the signer } + +/** + * List the software components in a release image + */ +message ReleaseSbomListRequest { + string Release = 1; // Name of the release + string Image = 2; // Name of the release image +} + +/** + * Returns the software components in a release image + */ +message ReleaseSbomListResponse { + repeated ReleaseSbomComponent Items = 1; // Components in the image +} + +/** + * A software component in a release image + */ +message ReleaseSbomComponent { + string Name = 1; // Name as the ecosystem spells it, e.g. drupal/core + string Version = 2; // Version of the component + string Ecosystem = 3; // Package ecosystem, e.g. composer, npm, deb +}