From 96b8afc16681936bbab74bbbb534fafe4399c3bb Mon Sep 17 00:00:00 2001 From: brnpl Date: Mon, 23 Dec 2024 16:15:30 +0100 Subject: [PATCH 1/5] Implementation of haskell stack extractor --- .../scan_result_go_proto/scan_result.pb.go | 1115 +++++++++++------ docs/supported_inventory_types.md | 2 + .../language/haskell/stack/stack.go | 188 +++ .../language/haskell/stack/stack_test.go | 279 +++++ .../language/haskell/stack/testdata/invalid | 6 + .../language/haskell/stack/testdata/valid | 40 + extractor/filesystem/list/list.go | 3 + purl/purl.go | 3 + 8 files changed, 1262 insertions(+), 374 deletions(-) create mode 100644 extractor/filesystem/language/haskell/stack/stack.go create mode 100644 extractor/filesystem/language/haskell/stack/stack_test.go create mode 100644 extractor/filesystem/language/haskell/stack/testdata/invalid create mode 100644 extractor/filesystem/language/haskell/stack/testdata/valid diff --git a/binary/proto/scan_result_go_proto/scan_result.pb.go b/binary/proto/scan_result_go_proto/scan_result.pb.go index 6228c241..3a42d40b 100644 --- a/binary/proto/scan_result_go_proto/scan_result.pb.go +++ b/binary/proto/scan_result_go_proto/scan_result.pb.go @@ -16,15 +16,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.33.0 -// protoc v3.21.1 +// protoc v3.12.4 // source: proto/scan_result.proto package scan_result_go_proto import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -253,9 +253,9 @@ type ScanResult struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Status of the overall scan. Status *ScanStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // Status and versions of the inventory+vuln plugins that ran. @@ -303,14 +303,14 @@ func (x *ScanResult) GetVersion() string { return "" } -func (x *ScanResult) GetStartTime() *timestamppb.Timestamp { +func (x *ScanResult) GetStartTime() *timestamp.Timestamp { if x != nil { return x.StartTime } return nil } -func (x *ScanResult) GetEndTime() *timestamppb.Timestamp { +func (x *ScanResult) GetEndTime() *timestamp.Timestamp { if x != nil { return x.EndTime } @@ -501,6 +501,8 @@ type Inventory struct { // *Inventory_JavaArchiveMetadata // *Inventory_JavaLockfileMetadata // *Inventory_PacmanMetadata + // *Inventory_ModuleMetadata + // *Inventory_VmlinuzMetadata // *Inventory_OsvMetadata // *Inventory_PythonRequirementsMetadata // *Inventory_ContainerdContainerMetadata @@ -675,6 +677,20 @@ func (x *Inventory) GetPacmanMetadata() *PACMANPackageMetadata { return nil } +func (x *Inventory) GetModuleMetadata() *MODULEPackageMetadata { + if x, ok := x.GetMetadata().(*Inventory_ModuleMetadata); ok { + return x.ModuleMetadata + } + return nil +} + +func (x *Inventory) GetVmlinuzMetadata() *VMLINUZPackageMetadata { + if x, ok := x.GetMetadata().(*Inventory_VmlinuzMetadata); ok { + return x.VmlinuzMetadata + } + return nil +} + func (x *Inventory) GetOsvMetadata() *OSVPackageMetadata { if x, ok := x.GetMetadata().(*Inventory_OsvMetadata); ok { return x.OsvMetadata @@ -796,6 +812,14 @@ type Inventory_PacmanMetadata struct { PacmanMetadata *PACMANPackageMetadata `protobuf:"bytes,36,opt,name=pacman_metadata,json=pacmanMetadata,proto3,oneof"` } +type Inventory_ModuleMetadata struct { + ModuleMetadata *MODULEPackageMetadata `protobuf:"bytes,38,opt,name=module_metadata,json=moduleMetadata,proto3,oneof"` +} + +type Inventory_VmlinuzMetadata struct { + VmlinuzMetadata *VMLINUZPackageMetadata `protobuf:"bytes,39,opt,name=vmlinuz_metadata,json=vmlinuzMetadata,proto3,oneof"` +} + type Inventory_OsvMetadata struct { OsvMetadata *OSVPackageMetadata `protobuf:"bytes,16,opt,name=osv_metadata,json=osvMetadata,proto3,oneof"` } @@ -852,6 +876,10 @@ func (*Inventory_JavaLockfileMetadata) isInventory_Metadata() {} func (*Inventory_PacmanMetadata) isInventory_Metadata() {} +func (*Inventory_ModuleMetadata) isInventory_Metadata() {} + +func (*Inventory_VmlinuzMetadata) isInventory_Metadata() {} + func (*Inventory_OsvMetadata) isInventory_Metadata() {} func (*Inventory_PythonRequirementsMetadata) isInventory_Metadata() {} @@ -2406,6 +2434,254 @@ func (x *FlatpakPackageMetadata) GetDeveloper() string { return "" } +// The additional data found in MODULE packages. +type MODULEPackageMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` + PackageVersion string `protobuf:"bytes,2,opt,name=package_version,json=packageVersion,proto3" json:"package_version,omitempty"` + PackageVermagic string `protobuf:"bytes,3,opt,name=package_vermagic,json=packageVermagic,proto3" json:"package_vermagic,omitempty"` + PackageSourceVersionIdentifier string `protobuf:"bytes,4,opt,name=package_source_version_identifier,json=packageSourceVersionIdentifier,proto3" json:"package_source_version_identifier,omitempty"` + OsId string `protobuf:"bytes,5,opt,name=os_id,json=osId,proto3" json:"os_id,omitempty"` + OsVersionCodename string `protobuf:"bytes,6,opt,name=os_version_codename,json=osVersionCodename,proto3" json:"os_version_codename,omitempty"` + OsVersionId string `protobuf:"bytes,7,opt,name=os_version_id,json=osVersionId,proto3" json:"os_version_id,omitempty"` + PackageDependencies string `protobuf:"bytes,8,opt,name=package_dependencies,json=packageDependencies,proto3" json:"package_dependencies,omitempty"` + PackageAuthor string `protobuf:"bytes,9,opt,name=package_author,json=packageAuthor,proto3" json:"package_author,omitempty"` +} + +func (x *MODULEPackageMetadata) Reset() { + *x = MODULEPackageMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_scan_result_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MODULEPackageMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MODULEPackageMetadata) ProtoMessage() {} + +func (x *MODULEPackageMetadata) ProtoReflect() protoreflect.Message { + mi := &file_proto_scan_result_proto_msgTypes[23] + 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 MODULEPackageMetadata.ProtoReflect.Descriptor instead. +func (*MODULEPackageMetadata) Descriptor() ([]byte, []int) { + return file_proto_scan_result_proto_rawDescGZIP(), []int{23} +} + +func (x *MODULEPackageMetadata) GetPackageName() string { + if x != nil { + return x.PackageName + } + return "" +} + +func (x *MODULEPackageMetadata) GetPackageVersion() string { + if x != nil { + return x.PackageVersion + } + return "" +} + +func (x *MODULEPackageMetadata) GetPackageVermagic() string { + if x != nil { + return x.PackageVermagic + } + return "" +} + +func (x *MODULEPackageMetadata) GetPackageSourceVersionIdentifier() string { + if x != nil { + return x.PackageSourceVersionIdentifier + } + return "" +} + +func (x *MODULEPackageMetadata) GetOsId() string { + if x != nil { + return x.OsId + } + return "" +} + +func (x *MODULEPackageMetadata) GetOsVersionCodename() string { + if x != nil { + return x.OsVersionCodename + } + return "" +} + +func (x *MODULEPackageMetadata) GetOsVersionId() string { + if x != nil { + return x.OsVersionId + } + return "" +} + +func (x *MODULEPackageMetadata) GetPackageDependencies() string { + if x != nil { + return x.PackageDependencies + } + return "" +} + +func (x *MODULEPackageMetadata) GetPackageAuthor() string { + if x != nil { + return x.PackageAuthor + } + return "" +} + +// The additional data found in VMLINUZ packages. +type VMLINUZPackageMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` + ExtendedVersion string `protobuf:"bytes,4,opt,name=extended_version,json=extendedVersion,proto3" json:"extended_version,omitempty"` + Format string `protobuf:"bytes,5,opt,name=format,proto3" json:"format,omitempty"` + SwapDevice int32 `protobuf:"varint,6,opt,name=swap_device,json=swapDevice,proto3" json:"swap_device,omitempty"` + RootDevice int32 `protobuf:"varint,7,opt,name=root_device,json=rootDevice,proto3" json:"root_device,omitempty"` + VideoMode string `protobuf:"bytes,8,opt,name=video_mode,json=videoMode,proto3" json:"video_mode,omitempty"` + OsId string `protobuf:"bytes,9,opt,name=os_id,json=osId,proto3" json:"os_id,omitempty"` + OsVersionCodename string `protobuf:"bytes,10,opt,name=os_version_codename,json=osVersionCodename,proto3" json:"os_version_codename,omitempty"` + OsVersionId string `protobuf:"bytes,11,opt,name=os_version_id,json=osVersionId,proto3" json:"os_version_id,omitempty"` + RwRootFs bool `protobuf:"varint,12,opt,name=rw_root_fs,json=rwRootFs,proto3" json:"rw_root_fs,omitempty"` +} + +func (x *VMLINUZPackageMetadata) Reset() { + *x = VMLINUZPackageMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_scan_result_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VMLINUZPackageMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMLINUZPackageMetadata) ProtoMessage() {} + +func (x *VMLINUZPackageMetadata) ProtoReflect() protoreflect.Message { + mi := &file_proto_scan_result_proto_msgTypes[24] + 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 VMLINUZPackageMetadata.ProtoReflect.Descriptor instead. +func (*VMLINUZPackageMetadata) Descriptor() ([]byte, []int) { + return file_proto_scan_result_proto_rawDescGZIP(), []int{24} +} + +func (x *VMLINUZPackageMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetArchitecture() string { + if x != nil { + return x.Architecture + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetExtendedVersion() string { + if x != nil { + return x.ExtendedVersion + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetSwapDevice() int32 { + if x != nil { + return x.SwapDevice + } + return 0 +} + +func (x *VMLINUZPackageMetadata) GetRootDevice() int32 { + if x != nil { + return x.RootDevice + } + return 0 +} + +func (x *VMLINUZPackageMetadata) GetVideoMode() string { + if x != nil { + return x.VideoMode + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetOsId() string { + if x != nil { + return x.OsId + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetOsVersionCodename() string { + if x != nil { + return x.OsVersionCodename + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetOsVersionId() string { + if x != nil { + return x.OsVersionId + } + return "" +} + +func (x *VMLINUZPackageMetadata) GetRwRootFs() bool { + if x != nil { + return x.RwRootFs + } + return false +} + // The additional data found in Mac Applications. type MacAppsMetadata struct { state protoimpl.MessageState @@ -2427,7 +2703,7 @@ type MacAppsMetadata struct { func (x *MacAppsMetadata) Reset() { *x = MacAppsMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[23] + mi := &file_proto_scan_result_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2440,7 +2716,7 @@ func (x *MacAppsMetadata) String() string { func (*MacAppsMetadata) ProtoMessage() {} func (x *MacAppsMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[23] + mi := &file_proto_scan_result_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2453,7 +2729,7 @@ func (x *MacAppsMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use MacAppsMetadata.ProtoReflect.Descriptor instead. func (*MacAppsMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{23} + return file_proto_scan_result_proto_rawDescGZIP(), []int{25} } func (x *MacAppsMetadata) GetBundleDisplayName() string { @@ -2539,7 +2815,7 @@ type SPDXPackageMetadata struct { func (x *SPDXPackageMetadata) Reset() { *x = SPDXPackageMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[24] + mi := &file_proto_scan_result_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2552,7 +2828,7 @@ func (x *SPDXPackageMetadata) String() string { func (*SPDXPackageMetadata) ProtoMessage() {} func (x *SPDXPackageMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[24] + mi := &file_proto_scan_result_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2565,7 +2841,7 @@ func (x *SPDXPackageMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use SPDXPackageMetadata.ProtoReflect.Descriptor instead. func (*SPDXPackageMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{24} + return file_proto_scan_result_proto_rawDescGZIP(), []int{26} } func (x *SPDXPackageMetadata) GetPurl() *Purl { @@ -2595,7 +2871,7 @@ type CDXPackageMetadata struct { func (x *CDXPackageMetadata) Reset() { *x = CDXPackageMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[25] + mi := &file_proto_scan_result_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2608,7 +2884,7 @@ func (x *CDXPackageMetadata) String() string { func (*CDXPackageMetadata) ProtoMessage() {} func (x *CDXPackageMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[25] + mi := &file_proto_scan_result_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2621,7 +2897,7 @@ func (x *CDXPackageMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use CDXPackageMetadata.ProtoReflect.Descriptor instead. func (*CDXPackageMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{25} + return file_proto_scan_result_proto_rawDescGZIP(), []int{27} } func (x *CDXPackageMetadata) GetPurl() *Purl { @@ -2652,7 +2928,7 @@ type JavaArchiveMetadata struct { func (x *JavaArchiveMetadata) Reset() { *x = JavaArchiveMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[26] + mi := &file_proto_scan_result_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2665,7 +2941,7 @@ func (x *JavaArchiveMetadata) String() string { func (*JavaArchiveMetadata) ProtoMessage() {} func (x *JavaArchiveMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[26] + mi := &file_proto_scan_result_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2678,7 +2954,7 @@ func (x *JavaArchiveMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use JavaArchiveMetadata.ProtoReflect.Descriptor instead. func (*JavaArchiveMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{26} + return file_proto_scan_result_proto_rawDescGZIP(), []int{28} } func (x *JavaArchiveMetadata) GetArtifactId() string { @@ -2716,7 +2992,7 @@ type JavaLockfileMetadata struct { func (x *JavaLockfileMetadata) Reset() { *x = JavaLockfileMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[27] + mi := &file_proto_scan_result_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2729,7 +3005,7 @@ func (x *JavaLockfileMetadata) String() string { func (*JavaLockfileMetadata) ProtoMessage() {} func (x *JavaLockfileMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[27] + mi := &file_proto_scan_result_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2742,7 +3018,7 @@ func (x *JavaLockfileMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use JavaLockfileMetadata.ProtoReflect.Descriptor instead. func (*JavaLockfileMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{27} + return file_proto_scan_result_proto_rawDescGZIP(), []int{29} } func (x *JavaLockfileMetadata) GetArtifactId() string { @@ -2781,7 +3057,7 @@ type OSVPackageMetadata struct { func (x *OSVPackageMetadata) Reset() { *x = OSVPackageMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[28] + mi := &file_proto_scan_result_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2794,7 +3070,7 @@ func (x *OSVPackageMetadata) String() string { func (*OSVPackageMetadata) ProtoMessage() {} func (x *OSVPackageMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[28] + mi := &file_proto_scan_result_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2807,7 +3083,7 @@ func (x *OSVPackageMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use OSVPackageMetadata.ProtoReflect.Descriptor instead. func (*OSVPackageMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{28} + return file_proto_scan_result_proto_rawDescGZIP(), []int{30} } func (x *OSVPackageMetadata) GetPurlType() string { @@ -2850,7 +3126,7 @@ type PythonRequirementsMetadata struct { func (x *PythonRequirementsMetadata) Reset() { *x = PythonRequirementsMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[29] + mi := &file_proto_scan_result_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2863,7 +3139,7 @@ func (x *PythonRequirementsMetadata) String() string { func (*PythonRequirementsMetadata) ProtoMessage() {} func (x *PythonRequirementsMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[29] + mi := &file_proto_scan_result_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2876,7 +3152,7 @@ func (x *PythonRequirementsMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use PythonRequirementsMetadata.ProtoReflect.Descriptor instead. func (*PythonRequirementsMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{29} + return file_proto_scan_result_proto_rawDescGZIP(), []int{31} } func (x *PythonRequirementsMetadata) GetHashCheckingModeValues() []string { @@ -2914,7 +3190,7 @@ type ContainerdContainerMetadata struct { func (x *ContainerdContainerMetadata) Reset() { *x = ContainerdContainerMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[30] + mi := &file_proto_scan_result_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2927,7 +3203,7 @@ func (x *ContainerdContainerMetadata) String() string { func (*ContainerdContainerMetadata) ProtoMessage() {} func (x *ContainerdContainerMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[30] + mi := &file_proto_scan_result_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2940,7 +3216,7 @@ func (x *ContainerdContainerMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use ContainerdContainerMetadata.ProtoReflect.Descriptor instead. func (*ContainerdContainerMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{30} + return file_proto_scan_result_proto_rawDescGZIP(), []int{32} } func (x *ContainerdContainerMetadata) GetNamespaceName() string { @@ -3037,7 +3313,7 @@ type ContainerdRuntimeContainerMetadata struct { func (x *ContainerdRuntimeContainerMetadata) Reset() { *x = ContainerdRuntimeContainerMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[31] + mi := &file_proto_scan_result_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3050,7 +3326,7 @@ func (x *ContainerdRuntimeContainerMetadata) String() string { func (*ContainerdRuntimeContainerMetadata) ProtoMessage() {} func (x *ContainerdRuntimeContainerMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[31] + mi := &file_proto_scan_result_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3063,7 +3339,7 @@ func (x *ContainerdRuntimeContainerMetadata) ProtoReflect() protoreflect.Message // Deprecated: Use ContainerdRuntimeContainerMetadata.ProtoReflect.Descriptor instead. func (*ContainerdRuntimeContainerMetadata) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{31} + return file_proto_scan_result_proto_rawDescGZIP(), []int{33} } func (x *ContainerdRuntimeContainerMetadata) GetNamespaceName() string { @@ -3127,7 +3403,7 @@ type WindowsOSVersion struct { func (x *WindowsOSVersion) Reset() { *x = WindowsOSVersion{} if protoimpl.UnsafeEnabled { - mi := &file_proto_scan_result_proto_msgTypes[32] + mi := &file_proto_scan_result_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3140,7 +3416,7 @@ func (x *WindowsOSVersion) String() string { func (*WindowsOSVersion) ProtoMessage() {} func (x *WindowsOSVersion) ProtoReflect() protoreflect.Message { - mi := &file_proto_scan_result_proto_msgTypes[32] + mi := &file_proto_scan_result_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3153,7 +3429,7 @@ func (x *WindowsOSVersion) ProtoReflect() protoreflect.Message { // Deprecated: Use WindowsOSVersion.ProtoReflect.Descriptor instead. func (*WindowsOSVersion) Descriptor() ([]byte, []int) { - return file_proto_scan_result_proto_rawDescGZIP(), []int{32} + return file_proto_scan_result_proto_rawDescGZIP(), []int{34} } func (x *WindowsOSVersion) GetProduct() string { @@ -3219,7 +3495,7 @@ var file_proto_scan_result_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x53, 0x63, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0xf0, 0x0f, 0x0a, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, + 0x89, 0x11, 0x0a, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0b, 0x73, @@ -3281,294 +3557,355 @@ var file_proto_scan_result_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x50, 0x41, 0x43, 0x4d, 0x41, 0x4e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6d, 0x61, 0x6e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0c, 0x6f, 0x73, 0x76, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, - 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4f, 0x53, 0x56, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x73, 0x76, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x67, 0x0a, 0x1c, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, - 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x48, 0x00, 0x52, 0x1a, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x6a, 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0d, 0x73, - 0x6e, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x53, 0x4e, 0x41, - 0x50, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x48, 0x00, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x4c, 0x0a, 0x10, 0x66, 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, - 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x66, - 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x46, - 0x0a, 0x11, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x63, 0x61, 0x6c, - 0x69, 0x62, 0x72, 0x2e, 0x4d, 0x61, 0x63, 0x41, 0x70, 0x70, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x63, 0x41, 0x70, 0x70, 0x73, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x80, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x64, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x64, 0x78, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x43, 0x44, 0x58, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, - 0x63, 0x64, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5a, 0x0a, 0x1b, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x5f, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x73, 0x4f, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x18, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x4f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, - 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, - 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x0d, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x23, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0c, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x60, 0x0a, 0x0e, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x15, 0x0a, - 0x11, 0x49, 0x4e, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x4f, 0x53, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, - 0x47, 0x45, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x43, - 0x41, 0x43, 0x48, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x22, 0x42, 0x0a, 0x14, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, - 0x70, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x7b, 0x0a, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, - 0x64, 0x69, 0x66, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x69, 0x66, 0x66, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0x22, 0x0a, 0x0d, 0x69, 0x6e, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x04, 0x50, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x75, 0x72, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x32, 0x0a, 0x0a, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x51, - 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x70, 0x61, 0x74, 0x68, 0x22, 0x33, - 0x0a, 0x09, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 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, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, - 0x23, 0x0a, 0x03, 0x61, 0x64, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, - 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x52, - 0x03, 0x61, 0x64, 0x76, 0x12, 0x2e, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x41, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x41, 0x64, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, - 0x62, 0x72, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x65, - 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, - 0x72, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x03, 0x73, 0x65, 0x76, 0x22, - 0x3b, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x55, 0x4c, 0x4e, - 0x45, 0x52, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x43, - 0x49, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, - 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x26, 0x0a, 0x07, 0x63, 0x76, 0x73, 0x73, 0x5f, 0x76, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x43, 0x56, 0x53, 0x53, 0x52, - 0x06, 0x63, 0x76, 0x73, 0x73, 0x56, 0x32, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x76, 0x73, 0x73, 0x5f, - 0x76, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, - 0x62, 0x72, 0x2e, 0x43, 0x56, 0x53, 0x53, 0x52, 0x06, 0x63, 0x76, 0x73, 0x73, 0x56, 0x33, 0x22, - 0x59, 0x0a, 0x0c, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, - 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, - 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x05, 0x22, 0x7d, 0x0a, 0x04, 0x43, 0x56, - 0x53, 0x53, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, - 0x72, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x65, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x5d, 0x0a, 0x0d, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x09, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x09, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x52, 0x0a, 0x15, 0x50, 0x79, 0x74, 0x68, - 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7d, 0x0a, 0x1d, - 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x12, - 0x41, 0x50, 0x4b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, - 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, + 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x4c, 0x0a, 0x10, 0x76, 0x6d, 0x6c, 0x69, 0x6e, 0x75, 0x7a, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x69, 0x62, 0x72, 0x2e, 0x56, 0x4d, 0x4c, 0x49, 0x4e, 0x55, 0x5a, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x76, 0x6d, + 0x6c, 0x69, 0x6e, 0x75, 0x7a, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, + 0x0c, 0x6f, 0x73, 0x76, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4f, 0x53, + 0x56, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x73, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x67, 0x0a, 0x1c, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, + 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x70, 0x79, + 0x74, 0x68, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6a, 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x53, 0x4e, 0x41, 0x50, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4c, 0x0a, 0x10, 0x66, 0x6c, 0x61, + 0x74, 0x70, 0x61, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x18, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x46, 0x6c, + 0x61, 0x74, 0x70, 0x61, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x66, 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x46, 0x0a, 0x11, 0x6d, 0x61, 0x63, 0x5f, 0x61, + 0x70, 0x70, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x22, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4d, 0x61, 0x63, + 0x41, 0x70, 0x70, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, + 0x6d, 0x61, 0x63, 0x41, 0x70, 0x70, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x80, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x5f, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x22, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x64, 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, + 0x62, 0x72, 0x2e, 0x43, 0x44, 0x58, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x64, 0x78, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x5a, 0x0a, 0x1b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x5f, + 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x69, 0x62, 0x72, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x4f, 0x53, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x18, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x4f, + 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x43, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x1c, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, + 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x0c, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x22, 0x60, 0x0a, 0x0e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x53, 0x49, 0x44, 0x45, + 0x5f, 0x4f, 0x53, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x14, 0x0a, + 0x10, 0x49, 0x4e, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x43, 0x41, 0x43, 0x48, 0x45, 0x5f, 0x44, 0x49, + 0x52, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, + 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x42, 0x0a, 0x14, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, + 0x7b, 0x0a, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x66, 0x66, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x6e, 0x5f, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0xc8, 0x01, 0x0a, + 0x04, 0x50, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x71, 0x75, 0x61, + 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x0a, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x70, 0x61, 0x74, 0x68, 0x22, 0x33, 0x0a, 0x09, 0x51, 0x75, 0x61, 0x6c, 0x69, + 0x66, 0x69, 0x65, 0x72, 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, 0x22, 0x92, 0x01, 0x0a, + 0x07, 0x46, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x03, 0x61, 0x64, 0x76, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, + 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x52, 0x03, 0x61, 0x64, 0x76, 0x12, 0x2e, 0x0a, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x12, 0x23, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x41, 0x64, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x65, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x03, 0x73, 0x65, 0x76, 0x22, 0x3b, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x55, 0x4c, 0x4e, 0x45, 0x52, 0x41, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x49, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, + 0xf1, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x08, + 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, + 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x76, 0x73, 0x73, + 0x5f, 0x76, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x69, 0x62, 0x72, 0x2e, 0x43, 0x56, 0x53, 0x53, 0x52, 0x06, 0x63, 0x76, 0x73, 0x73, 0x56, 0x32, + 0x12, 0x26, 0x0a, 0x07, 0x63, 0x76, 0x73, 0x73, 0x5f, 0x76, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x2e, 0x43, 0x56, 0x53, 0x53, + 0x52, 0x06, 0x63, 0x76, 0x73, 0x73, 0x56, 0x33, 0x22, 0x59, 0x0a, 0x0c, 0x53, 0x65, 0x76, 0x65, + 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4e, + 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, + 0x49, 0x47, 0x48, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, + 0x4c, 0x10, 0x05, 0x22, 0x7d, 0x0a, 0x04, 0x43, 0x56, 0x53, 0x53, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x09, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, + 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x22, 0x5d, 0x0a, 0x0d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x62, 0x72, + 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x09, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x52, 0x0a, 0x15, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7d, 0x0a, 0x1d, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, + 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x6f, 0x72, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x12, 0x41, 0x50, 0x4b, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, + 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x13, 0x44, 0x50, 0x4b, 0x47, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x73, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb4, 0x02, 0x0a, 0x12, 0x52, 0x50, 0x4d, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x70, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x70, 0x6d, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, + 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, - 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x02, - 0x0a, 0x13, 0x44, 0x50, 0x4b, 0x47, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, + 0x1e, 0x0a, 0x0b, 0x6f, 0x73, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0xa1, + 0x01, 0x0a, 0x12, 0x43, 0x4f, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x1d, 0x0a, 0x0a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, + 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x80, 0x02, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4d, 0x41, 0x4e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, + 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x13, 0x53, 0x4e, 0x41, 0x50, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, + 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x6f, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, + 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, + 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xb6, 0x02, 0x0a, 0x16, 0x46, 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, + 0x07, 0x6f, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, + 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x0b, 0x6f, 0x73, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x9c, 0x03, + 0x0a, 0x15, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, + 0x65, 0x72, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x12, 0x49, + 0x0a, 0x21, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, - 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb4, - 0x02, 0x0a, 0x12, 0x52, 0x50, 0x4d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x72, 0x70, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x70, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x13, 0x0a, - 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, - 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6f, 0x73, 0x5f, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, - 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, - 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, - 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, - 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x43, 0x4f, 0x53, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x80, 0x02, 0x0a, 0x15, 0x50, 0x41, - 0x43, 0x4d, 0x41, 0x4e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6f, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0xfc, 0x01, 0x0a, - 0x13, 0x53, 0x4e, 0x41, 0x50, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x73, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xb6, 0x02, 0x0a, 0x16, - 0x46, 0x6c, 0x61, 0x74, 0x70, 0x61, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, - 0x44, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, - 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, - 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6f, 0x73, 0x5f, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x22, 0xbb, 0x03, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x41, 0x70, 0x70, 0x73, + 0x49, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x95, 0x03, 0x0a, + 0x16, 0x56, 0x4d, 0x4c, 0x49, 0x4e, 0x55, 0x5a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, + 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x77, 0x61, 0x70, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x73, 0x77, 0x61, 0x70, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, + 0x05, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x73, + 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x72, 0x77, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x5f, 0x66, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x77, 0x52, 0x6f, + 0x6f, 0x74, 0x46, 0x73, 0x22, 0xbb, 0x03, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x41, 0x70, 0x70, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x69, 0x73, @@ -3699,7 +4036,7 @@ func file_proto_scan_result_proto_rawDescGZIP() []byte { } var file_proto_scan_result_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_proto_scan_result_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_proto_scan_result_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_proto_scan_result_proto_goTypes = []interface{}{ (ScanStatus_ScanStatusEnum)(0), // 0: scalibr.ScanStatus.ScanStatusEnum (Inventory_AnnotationEnum)(0), // 1: scalibr.Inventory.AnnotationEnum @@ -3728,21 +4065,23 @@ var file_proto_scan_result_proto_goTypes = []interface{}{ (*PACMANPackageMetadata)(nil), // 24: scalibr.PACMANPackageMetadata (*SNAPPackageMetadata)(nil), // 25: scalibr.SNAPPackageMetadata (*FlatpakPackageMetadata)(nil), // 26: scalibr.FlatpakPackageMetadata - (*MacAppsMetadata)(nil), // 27: scalibr.MacAppsMetadata - (*SPDXPackageMetadata)(nil), // 28: scalibr.SPDXPackageMetadata - (*CDXPackageMetadata)(nil), // 29: scalibr.CDXPackageMetadata - (*JavaArchiveMetadata)(nil), // 30: scalibr.JavaArchiveMetadata - (*JavaLockfileMetadata)(nil), // 31: scalibr.JavaLockfileMetadata - (*OSVPackageMetadata)(nil), // 32: scalibr.OSVPackageMetadata - (*PythonRequirementsMetadata)(nil), // 33: scalibr.PythonRequirementsMetadata - (*ContainerdContainerMetadata)(nil), // 34: scalibr.ContainerdContainerMetadata - (*ContainerdRuntimeContainerMetadata)(nil), // 35: scalibr.ContainerdRuntimeContainerMetadata - (*WindowsOSVersion)(nil), // 36: scalibr.WindowsOSVersion - (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp + (*MODULEPackageMetadata)(nil), // 27: scalibr.MODULEPackageMetadata + (*VMLINUZPackageMetadata)(nil), // 28: scalibr.VMLINUZPackageMetadata + (*MacAppsMetadata)(nil), // 29: scalibr.MacAppsMetadata + (*SPDXPackageMetadata)(nil), // 30: scalibr.SPDXPackageMetadata + (*CDXPackageMetadata)(nil), // 31: scalibr.CDXPackageMetadata + (*JavaArchiveMetadata)(nil), // 32: scalibr.JavaArchiveMetadata + (*JavaLockfileMetadata)(nil), // 33: scalibr.JavaLockfileMetadata + (*OSVPackageMetadata)(nil), // 34: scalibr.OSVPackageMetadata + (*PythonRequirementsMetadata)(nil), // 35: scalibr.PythonRequirementsMetadata + (*ContainerdContainerMetadata)(nil), // 36: scalibr.ContainerdContainerMetadata + (*ContainerdRuntimeContainerMetadata)(nil), // 37: scalibr.ContainerdRuntimeContainerMetadata + (*WindowsOSVersion)(nil), // 38: scalibr.WindowsOSVersion + (*timestamp.Timestamp)(nil), // 39: google.protobuf.Timestamp } var file_proto_scan_result_proto_depIdxs = []int32{ - 37, // 0: scalibr.ScanResult.start_time:type_name -> google.protobuf.Timestamp - 37, // 1: scalibr.ScanResult.end_time:type_name -> google.protobuf.Timestamp + 39, // 0: scalibr.ScanResult.start_time:type_name -> google.protobuf.Timestamp + 39, // 1: scalibr.ScanResult.end_time:type_name -> google.protobuf.Timestamp 5, // 2: scalibr.ScanResult.status:type_name -> scalibr.ScanStatus 6, // 3: scalibr.ScanResult.plugin_status:type_name -> scalibr.PluginStatus 7, // 4: scalibr.ScanResult.inventories:type_name -> scalibr.Inventory @@ -3757,38 +4096,40 @@ var file_proto_scan_result_proto_depIdxs = []int32{ 21, // 13: scalibr.Inventory.dpkg_metadata:type_name -> scalibr.DPKGPackageMetadata 22, // 14: scalibr.Inventory.rpm_metadata:type_name -> scalibr.RPMPackageMetadata 23, // 15: scalibr.Inventory.cos_metadata:type_name -> scalibr.COSPackageMetadata - 28, // 16: scalibr.Inventory.spdx_metadata:type_name -> scalibr.SPDXPackageMetadata - 30, // 17: scalibr.Inventory.java_archive_metadata:type_name -> scalibr.JavaArchiveMetadata - 31, // 18: scalibr.Inventory.java_lockfile_metadata:type_name -> scalibr.JavaLockfileMetadata + 30, // 16: scalibr.Inventory.spdx_metadata:type_name -> scalibr.SPDXPackageMetadata + 32, // 17: scalibr.Inventory.java_archive_metadata:type_name -> scalibr.JavaArchiveMetadata + 33, // 18: scalibr.Inventory.java_lockfile_metadata:type_name -> scalibr.JavaLockfileMetadata 24, // 19: scalibr.Inventory.pacman_metadata:type_name -> scalibr.PACMANPackageMetadata - 32, // 20: scalibr.Inventory.osv_metadata:type_name -> scalibr.OSVPackageMetadata - 33, // 21: scalibr.Inventory.python_requirements_metadata:type_name -> scalibr.PythonRequirementsMetadata - 34, // 22: scalibr.Inventory.containerd_container_metadata:type_name -> scalibr.ContainerdContainerMetadata - 25, // 23: scalibr.Inventory.snap_metadata:type_name -> scalibr.SNAPPackageMetadata - 26, // 24: scalibr.Inventory.flatpak_metadata:type_name -> scalibr.FlatpakPackageMetadata - 27, // 25: scalibr.Inventory.mac_apps_metadata:type_name -> scalibr.MacAppsMetadata - 35, // 26: scalibr.Inventory.containerd_runtime_container_metadata:type_name -> scalibr.ContainerdRuntimeContainerMetadata - 29, // 27: scalibr.Inventory.cdx_metadata:type_name -> scalibr.CDXPackageMetadata - 36, // 28: scalibr.Inventory.windows_os_version_metadata:type_name -> scalibr.WindowsOSVersion - 1, // 29: scalibr.Inventory.annotations:type_name -> scalibr.Inventory.AnnotationEnum - 9, // 30: scalibr.Inventory.layer_details:type_name -> scalibr.LayerDetails - 11, // 31: scalibr.Purl.qualifiers:type_name -> scalibr.Qualifier - 13, // 32: scalibr.Finding.adv:type_name -> scalibr.Advisory - 17, // 33: scalibr.Finding.target:type_name -> scalibr.TargetDetails - 14, // 34: scalibr.Advisory.id:type_name -> scalibr.AdvisoryId - 2, // 35: scalibr.Advisory.type:type_name -> scalibr.Advisory.TypeEnum - 15, // 36: scalibr.Advisory.sev:type_name -> scalibr.Severity - 3, // 37: scalibr.Severity.severity:type_name -> scalibr.Severity.SeverityEnum - 16, // 38: scalibr.Severity.cvss_v2:type_name -> scalibr.CVSS - 16, // 39: scalibr.Severity.cvss_v3:type_name -> scalibr.CVSS - 7, // 40: scalibr.TargetDetails.inventory:type_name -> scalibr.Inventory - 10, // 41: scalibr.SPDXPackageMetadata.purl:type_name -> scalibr.Purl - 10, // 42: scalibr.CDXPackageMetadata.purl:type_name -> scalibr.Purl - 43, // [43:43] is the sub-list for method output_type - 43, // [43:43] is the sub-list for method input_type - 43, // [43:43] is the sub-list for extension type_name - 43, // [43:43] is the sub-list for extension extendee - 0, // [0:43] is the sub-list for field type_name + 27, // 20: scalibr.Inventory.module_metadata:type_name -> scalibr.MODULEPackageMetadata + 28, // 21: scalibr.Inventory.vmlinuz_metadata:type_name -> scalibr.VMLINUZPackageMetadata + 34, // 22: scalibr.Inventory.osv_metadata:type_name -> scalibr.OSVPackageMetadata + 35, // 23: scalibr.Inventory.python_requirements_metadata:type_name -> scalibr.PythonRequirementsMetadata + 36, // 24: scalibr.Inventory.containerd_container_metadata:type_name -> scalibr.ContainerdContainerMetadata + 25, // 25: scalibr.Inventory.snap_metadata:type_name -> scalibr.SNAPPackageMetadata + 26, // 26: scalibr.Inventory.flatpak_metadata:type_name -> scalibr.FlatpakPackageMetadata + 29, // 27: scalibr.Inventory.mac_apps_metadata:type_name -> scalibr.MacAppsMetadata + 37, // 28: scalibr.Inventory.containerd_runtime_container_metadata:type_name -> scalibr.ContainerdRuntimeContainerMetadata + 31, // 29: scalibr.Inventory.cdx_metadata:type_name -> scalibr.CDXPackageMetadata + 38, // 30: scalibr.Inventory.windows_os_version_metadata:type_name -> scalibr.WindowsOSVersion + 1, // 31: scalibr.Inventory.annotations:type_name -> scalibr.Inventory.AnnotationEnum + 9, // 32: scalibr.Inventory.layer_details:type_name -> scalibr.LayerDetails + 11, // 33: scalibr.Purl.qualifiers:type_name -> scalibr.Qualifier + 13, // 34: scalibr.Finding.adv:type_name -> scalibr.Advisory + 17, // 35: scalibr.Finding.target:type_name -> scalibr.TargetDetails + 14, // 36: scalibr.Advisory.id:type_name -> scalibr.AdvisoryId + 2, // 37: scalibr.Advisory.type:type_name -> scalibr.Advisory.TypeEnum + 15, // 38: scalibr.Advisory.sev:type_name -> scalibr.Severity + 3, // 39: scalibr.Severity.severity:type_name -> scalibr.Severity.SeverityEnum + 16, // 40: scalibr.Severity.cvss_v2:type_name -> scalibr.CVSS + 16, // 41: scalibr.Severity.cvss_v3:type_name -> scalibr.CVSS + 7, // 42: scalibr.TargetDetails.inventory:type_name -> scalibr.Inventory + 10, // 43: scalibr.SPDXPackageMetadata.purl:type_name -> scalibr.Purl + 10, // 44: scalibr.CDXPackageMetadata.purl:type_name -> scalibr.Purl + 45, // [45:45] is the sub-list for method output_type + 45, // [45:45] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name } func init() { file_proto_scan_result_proto_init() } @@ -4074,7 +4415,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MacAppsMetadata); i { + switch v := v.(*MODULEPackageMetadata); i { case 0: return &v.state case 1: @@ -4086,7 +4427,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SPDXPackageMetadata); i { + switch v := v.(*VMLINUZPackageMetadata); i { case 0: return &v.state case 1: @@ -4098,7 +4439,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CDXPackageMetadata); i { + switch v := v.(*MacAppsMetadata); i { case 0: return &v.state case 1: @@ -4110,7 +4451,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JavaArchiveMetadata); i { + switch v := v.(*SPDXPackageMetadata); i { case 0: return &v.state case 1: @@ -4122,7 +4463,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JavaLockfileMetadata); i { + switch v := v.(*CDXPackageMetadata); i { case 0: return &v.state case 1: @@ -4134,7 +4475,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OSVPackageMetadata); i { + switch v := v.(*JavaArchiveMetadata); i { case 0: return &v.state case 1: @@ -4146,7 +4487,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PythonRequirementsMetadata); i { + switch v := v.(*JavaLockfileMetadata); i { case 0: return &v.state case 1: @@ -4158,7 +4499,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContainerdContainerMetadata); i { + switch v := v.(*OSVPackageMetadata); i { case 0: return &v.state case 1: @@ -4170,7 +4511,7 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContainerdRuntimeContainerMetadata); i { + switch v := v.(*PythonRequirementsMetadata); i { case 0: return &v.state case 1: @@ -4182,6 +4523,30 @@ func file_proto_scan_result_proto_init() { } } file_proto_scan_result_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerdContainerMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_scan_result_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerdRuntimeContainerMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_scan_result_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WindowsOSVersion); i { case 0: return &v.state @@ -4205,6 +4570,8 @@ func file_proto_scan_result_proto_init() { (*Inventory_JavaArchiveMetadata)(nil), (*Inventory_JavaLockfileMetadata)(nil), (*Inventory_PacmanMetadata)(nil), + (*Inventory_ModuleMetadata)(nil), + (*Inventory_VmlinuzMetadata)(nil), (*Inventory_OsvMetadata)(nil), (*Inventory_PythonRequirementsMetadata)(nil), (*Inventory_ContainerdContainerMetadata)(nil), @@ -4221,7 +4588,7 @@ func file_proto_scan_result_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_scan_result_proto_rawDesc, NumEnums: 4, - NumMessages: 33, + NumMessages: 35, NumExtensions: 0, NumServices: 0, }, diff --git a/docs/supported_inventory_types.md b/docs/supported_inventory_types.md index 63bc8d2f..2b4c441a 100644 --- a/docs/supported_inventory_types.md +++ b/docs/supported_inventory_types.md @@ -34,6 +34,8 @@ SCALIBR supports extracting software package information from a variety of OS an * Go * Go binaries * go.mod (OSV) +* Haskell + * Stack * Java * Java archives * Lockfiles: pom.xml, gradle.lockfile, verification-metadata.xml diff --git a/extractor/filesystem/language/haskell/stack/stack.go b/extractor/filesystem/language/haskell/stack/stack.go new file mode 100644 index 00000000..93e485a1 --- /dev/null +++ b/extractor/filesystem/language/haskell/stack/stack.go @@ -0,0 +1,188 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package stack extracts stack.yaml.lock files from haskell projects. +package stack + +import ( + "bufio" + "context" + "fmt" + "path/filepath" + "regexp" + "strings" + + "github.com/google/osv-scalibr/extractor" + "github.com/google/osv-scalibr/extractor/filesystem" + "github.com/google/osv-scalibr/extractor/filesystem/internal/units" + "github.com/google/osv-scalibr/plugin" + "github.com/google/osv-scalibr/purl" + "github.com/google/osv-scalibr/stats" +) + +const ( + // Name is the unique name of this extractor. + Name = "haskell/stack" + + // defaultMaxFileSizeBytes is the maximum file size an extractor will unmarshal. + // If Extract gets a bigger file, it will return an error. + defaultMaxFileSizeBytes = 100 * units.MiB +) + +// Config is the configuration for the Extractor. +type Config struct { + // Stats is a stats collector for reporting metrics. + Stats stats.Collector + // MaxFileSizeBytes is the maximum file size this extractor will unmarshal. If + // `FileRequired` gets a bigger file, it will return false, + MaxFileSizeBytes int64 +} + +// DefaultConfig returns the default configuration for the extractor. +func DefaultConfig() Config { + return Config{ + MaxFileSizeBytes: defaultMaxFileSizeBytes, + Stats: nil, + } +} + +// Extractor extracts stack package info from stack.yaml.lock files. +type Extractor struct { + stats stats.Collector + maxFileSizeBytes int64 +} + +// New returns a haskell stack extractor. +func New(cfg Config) *Extractor { + return &Extractor{ + stats: cfg.Stats, + maxFileSizeBytes: cfg.MaxFileSizeBytes, + } +} + +// Config returns the configuration of the extractor. +func (e Extractor) Config() Config { + return Config{ + Stats: e.stats, + MaxFileSizeBytes: e.maxFileSizeBytes, + } +} + +// Name of the extractor +func (e Extractor) Name() string { return Name } + +// Version of the extractor +func (e Extractor) Version() int { return 0 } + +// Requirements of the extractor. +func (e Extractor) Requirements() *plugin.Capabilities { return &plugin.Capabilities{} } + +// FileRequired return true if the specified file matched the stack.yaml.lock file pattern. +func (e Extractor) FileRequired(api filesystem.FileAPI) bool { + path := api.Path() + normalizedPath := filepath.ToSlash(path) + + if filepath.Base(normalizedPath) != "stack.yaml.lock" { + return false + } + + fileinfo, err := api.Stat() + if err != nil { + return false + } + if e.maxFileSizeBytes > 0 && fileinfo.Size() > e.maxFileSizeBytes { + e.reportFileRequired(path, fileinfo.Size(), stats.FileRequiredResultSizeLimitExceeded) + return false + } + + e.reportFileRequired(path, fileinfo.Size(), stats.FileRequiredResultOK) + return true +} + +func (e Extractor) reportFileRequired(path string, fileSizeBytes int64, result stats.FileRequiredResult) { + if e.stats == nil { + return + } + e.stats.AfterFileRequired(e.Name(), &stats.FileRequiredStats{ + Path: path, + Result: result, + FileSizeBytes: fileSizeBytes, + }) +} + +// Extract extracts packages from the stack.yaml.lock file. +func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error) { + inventory, err := e.extractFromInput(ctx, input) + + if e.stats != nil { + var fileSizeBytes int64 + if input.Info != nil { + fileSizeBytes = input.Info.Size() + } + e.stats.AfterFileExtracted(e.Name(), &stats.FileExtractedStats{ + Path: input.Path, + Result: filesystem.ExtractorErrorToFileExtractedResult(err), + FileSizeBytes: fileSizeBytes, + }) + } + return inventory, err +} + +var re = regexp.MustCompile(`hackage:\s*([a-zA-Z0-9\-]+)-([0-9.]+)@`) + +func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error) { + s := bufio.NewScanner(input.Reader) + pkgs := []*extractor.Inventory{} + + for s.Scan() { + // Return if canceled or exceeding deadline. + if err := ctx.Err(); err != nil { + return pkgs, fmt.Errorf("%s halted at %q because of context error: %v", e.Name(), input.Path, err) + } + + line := strings.TrimSpace(s.Text()) + + if line == "" { + continue + } + + matches := re.FindStringSubmatch(line) + if len(matches) == 3 { + pkgName := matches[1] + pkgVersion := matches[2] + + i := &extractor.Inventory{ + Name: pkgName, + Version: pkgVersion, + Locations: []string{input.Path}, + } + + pkgs = append(pkgs, i) + } + } + + return pkgs, nil +} + +// ToPURL converts an inventory created by this extractor into a PURL. +func (e Extractor) ToPURL(i *extractor.Inventory) *purl.PackageURL { + return &purl.PackageURL{ + Type: purl.TypeHaskell, + Name: i.Name, + Version: i.Version, + } +} + +// Ecosystem returns the OSV Ecosystem of the software extracted by this extractor. +func (Extractor) Ecosystem(i *extractor.Inventory) string { return "Hackage" } diff --git a/extractor/filesystem/language/haskell/stack/stack_test.go b/extractor/filesystem/language/haskell/stack/stack_test.go new file mode 100644 index 00000000..d7da7575 --- /dev/null +++ b/extractor/filesystem/language/haskell/stack/stack_test.go @@ -0,0 +1,279 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stack_test + +import ( + "context" + "io/fs" + "path/filepath" + "reflect" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/osv-scalibr/extractor" + "github.com/google/osv-scalibr/extractor/filesystem" + "github.com/google/osv-scalibr/extractor/filesystem/internal/units" + "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stack" + "github.com/google/osv-scalibr/extractor/filesystem/simplefileapi" + scalibrfs "github.com/google/osv-scalibr/fs" + "github.com/google/osv-scalibr/purl" + "github.com/google/osv-scalibr/stats" + "github.com/google/osv-scalibr/testing/fakefs" + "github.com/google/osv-scalibr/testing/testcollector" +) + +func TestNew(t *testing.T) { + tests := []struct { + name string + cfg stack.Config + wantCfg stack.Config + }{ + { + name: "default", + cfg: stack.DefaultConfig(), + wantCfg: stack.Config{ + MaxFileSizeBytes: 100 * units.MiB, + }, + }, + { + name: "custom", + cfg: stack.Config{ + MaxFileSizeBytes: 10, + }, + wantCfg: stack.Config{ + MaxFileSizeBytes: 10, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := stack.New(tt.cfg) + if !reflect.DeepEqual(got.Config(), tt.wantCfg) { + t.Errorf("New(%+v).Config(): got %+v, want %+v", tt.cfg, got.Config(), tt.wantCfg) + } + }) + } +} + +func TestFileRequired(t *testing.T) { + tests := []struct { + name string + path string + fileSizeBytes int64 + maxFileSizeBytes int64 + wantRequired bool + wantResultMetric stats.FileRequiredResult + }{ + { + name: "stack.yaml.lock file", + path: "software-develop/stack.yaml.lock", + wantRequired: true, + wantResultMetric: stats.FileRequiredResultOK, + }, + { + name: "stack.yaml.lock file required if file size < max file size", + path: "software-develop/stack.yaml.lock", + fileSizeBytes: 100 * units.KiB, + maxFileSizeBytes: 1000 * units.KiB, + wantRequired: true, + wantResultMetric: stats.FileRequiredResultOK, + }, + { + name: "stack.yaml.lock file required if file size == max file size", + path: "software-develop/stack.yaml.lock", + fileSizeBytes: 1000 * units.KiB, + maxFileSizeBytes: 1000 * units.KiB, + wantRequired: true, + wantResultMetric: stats.FileRequiredResultOK, + }, + { + name: "stack.yaml.lock file not required if file size > max file size", + path: "software-develop/stack.yaml.lock", + fileSizeBytes: 1000 * units.KiB, + maxFileSizeBytes: 100 * units.KiB, + wantRequired: false, + wantResultMetric: stats.FileRequiredResultSizeLimitExceeded, + }, + { + name: "stack.yaml.lock file required if max file size set to 0", + path: "software-develop/stack.yaml.lock", + fileSizeBytes: 100 * units.KiB, + maxFileSizeBytes: 0, + wantRequired: true, + wantResultMetric: stats.FileRequiredResultOK, + }, + { + name: "not required", + path: "software-develop/stack.yaml.lock/foo", + wantRequired: false, + }, + { + name: "not required", + path: "software-develop/foostack.yaml.lock", + wantRequired: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + collector := testcollector.New() + var e filesystem.Extractor = stack.New(stack.Config{ + Stats: collector, + MaxFileSizeBytes: tt.maxFileSizeBytes, + }) + + fileSizeBytes := tt.fileSizeBytes + if fileSizeBytes == 0 { + fileSizeBytes = 1000 + } + + isRequired := e.FileRequired(simplefileapi.New(tt.path, fakefs.FakeFileInfo{ + FileName: filepath.Base(tt.path), + FileMode: fs.ModePerm, + FileSize: fileSizeBytes, + })) + if isRequired != tt.wantRequired { + t.Fatalf("FileRequired(%s): got %v, want %v", tt.path, isRequired, tt.wantRequired) + } + + gotResultMetric := collector.FileRequiredResult(tt.path) + if tt.wantResultMetric != "" && gotResultMetric != tt.wantResultMetric { + t.Errorf("FileRequired(%s) recorded result metric %v, want result metric %v", tt.path, gotResultMetric, tt.wantResultMetric) + } + }) + } +} + +func TestExtract(t *testing.T) { + tests := []struct { + name string + path string + cfg stack.Config + wantInventory []*extractor.Inventory + wantResultMetric stats.FileExtractedResult + }{ + { + name: "valid stack.yaml.lock file", + path: "testdata/valid", + wantInventory: []*extractor.Inventory{ + { + Name: "fuzzyset", + Version: "0.2.4", + Locations: []string{"testdata/valid"}, + }, + { + Name: "hasql-pool", + Version: "1.0.1", + Locations: []string{"testdata/valid"}, + }, + { + Name: "jose-jwt", + Version: "0.10.0", + Locations: []string{"testdata/valid"}, + }, + { + Name: "postgresql-libpq", + Version: "0.10.1.0", + Locations: []string{"testdata/valid"}, + }, + }, + wantResultMetric: stats.FileExtractedResultSuccess, + }, + { + name: "invalid stack.yaml.lock file", + path: "testdata/invalid", + wantInventory: []*extractor.Inventory{}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + fsys := scalibrfs.DirFS(".") + + r, err := fsys.Open(tt.path) + defer func() { + if err = r.Close(); err != nil { + t.Errorf("Close(): %v", err) + } + }() + if err != nil { + t.Fatal(err) + } + + info, err := r.Stat() + if err != nil { + t.Fatalf("Stat(): %v", err) + } + + collector := testcollector.New() + tt.cfg.Stats = collector + + input := &filesystem.ScanInput{FS: scalibrfs.DirFS("."), Path: tt.path, Info: info, Reader: r} + var e filesystem.Extractor = stack.New(defaultConfigWith(tt.cfg)) + + got, err := e.Extract(context.Background(), input) + + if diff := cmp.Diff(tt.wantInventory, got); diff != "" { + t.Errorf("Extract(%s) (-want +got):\n%s", tt.path, diff) + } + + wantResultMetric := tt.wantResultMetric + if wantResultMetric == "" { + wantResultMetric = stats.FileExtractedResultSuccess + } + + gotResultMetric := collector.FileExtractedResult(tt.path) + if gotResultMetric != wantResultMetric { + t.Errorf("Extract(%s) recorded result metric %v, want result metric %v", tt.path, gotResultMetric, wantResultMetric) + } + + gotFileSizeMetric := collector.FileExtractedFileSize(tt.path) + if gotFileSizeMetric != info.Size() { + t.Errorf("Extract(%s) recorded file size %v, want file size %v", tt.path, gotFileSizeMetric, info.Size()) + } + }) + } +} + +func TestToPURL(t *testing.T) { + e := stack.Extractor{} + i := &extractor.Inventory{ + Name: "Name", + Version: "1.2.3", + Locations: []string{"location"}, + } + want := &purl.PackageURL{ + Type: purl.TypeHaskell, + Name: "Name", + Version: "1.2.3", + } + got := e.ToPURL(i) + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("ToPURL(%v) (-want +got):\n%s", i, diff) + } +} + +func defaultConfigWith(cfg stack.Config) stack.Config { + newCfg := stack.DefaultConfig() + + if cfg.MaxFileSizeBytes > 0 { + newCfg.MaxFileSizeBytes = cfg.MaxFileSizeBytes + } + if cfg.Stats != nil { + newCfg.Stats = cfg.Stats + } + return newCfg +} diff --git a/extractor/filesystem/language/haskell/stack/testdata/invalid b/extractor/filesystem/language/haskell/stack/testdata/invalid new file mode 100644 index 00000000..662c696c --- /dev/null +++ b/extractor/filesystem/language/haskell/stack/testdata/invalid @@ -0,0 +1,6 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: \ No newline at end of file diff --git a/extractor/filesystem/language/haskell/stack/testdata/valid b/extractor/filesystem/language/haskell/stack/testdata/valid new file mode 100644 index 00000000..dab6d9f8 --- /dev/null +++ b/extractor/filesystem/language/haskell/stack/testdata/valid @@ -0,0 +1,40 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: +- completed: + hackage: fuzzyset-0.2.4@sha256:f1b6de8bf33277bf6255207541d65028f1f1ea93af5541b654c86b5674995485,1618 + pantry-tree: + sha256: cee68e8d88f530e9e0588b81b260236936fe3318ef9a66e9f43f680b4cd5f76e + size: 574 + original: + hackage: fuzzyset-0.2.4 +- completed: + hackage: hasql-pool-1.0.1@sha256:3cfb4c7153a6c536ac7e126c17723e6d26ee03794954deed2d72bcc826d05a40,2302 + pantry-tree: + sha256: d98e1269bdd60989b0eb0b84e1d5357eaa9f92821439d9f206663b7251ee95b2 + size: 799 + original: + hackage: hasql-pool-1.0.1 +- completed: + hackage: jose-jwt-0.10.0@sha256:6ed175a01c721e317ceea15eb251a81de145c03711a977517935633a5cdec1d4,3546 + pantry-tree: + sha256: 58649e68e2d1adb47d8ed8741bd27ac23a2f19e3ee62bc28a68ac8642b3e0858 + size: 1231 + original: + hackage: jose-jwt-0.10.0 +- completed: + hackage: postgresql-libpq-0.10.1.0@sha256:6b580c9d5068e78eecc13e655b2885c8e79cdacfca513c5d1e5a6b9dc61d9758,3166 + pantry-tree: + sha256: ae81e7628a8f3d1ef33ace71fa0845c073c003ca7f1150cc9d9ba1e55fc84236 + size: 1096 + original: + hackage: postgresql-libpq-0.10.1.0 +snapshots: +- completed: + sha256: 1e32b51d9082fdf6f3bd92accc9dfffd4ddaf406404427fb10bf76d2bc03cbbb + size: 720263 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/41.yaml + original: lts-22.41 \ No newline at end of file diff --git a/extractor/filesystem/list/list.go b/extractor/filesystem/list/list.go index f5933557..bc9e77e6 100644 --- a/extractor/filesystem/list/list.go +++ b/extractor/filesystem/list/list.go @@ -33,6 +33,7 @@ import ( "github.com/google/osv-scalibr/extractor/filesystem/language/erlang/mixlock" "github.com/google/osv-scalibr/extractor/filesystem/language/golang/gobinary" "github.com/google/osv-scalibr/extractor/filesystem/language/golang/gomod" + "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stack" javaarchive "github.com/google/osv-scalibr/extractor/filesystem/language/java/archive" "github.com/google/osv-scalibr/extractor/filesystem/language/java/gradlelockfile" "github.com/google/osv-scalibr/extractor/filesystem/language/java/gradleverificationmetadataxml" @@ -103,6 +104,8 @@ var ( Dart []filesystem.Extractor = []filesystem.Extractor{pubspec.Extractor{}} // Erlang extractors. Erlang []filesystem.Extractor = []filesystem.Extractor{mixlock.Extractor{}} + // Haskell extractors. + Haskell []filesystem.Extractor = []filesystem.Extractor{stack.Extractor{}} // R extractors R []filesystem.Extractor = []filesystem.Extractor{renvlock.Extractor{}} // Ruby extractors. diff --git a/purl/purl.go b/purl/purl.go index b9fac335..2ec152df 100644 --- a/purl/purl.go +++ b/purl/purl.go @@ -65,6 +65,8 @@ const ( TypeGolang = "golang" // TypeHackage is a pkg:hackage purl. TypeHackage = "hackage" + // Type Haskell is a pkg:haskell purl. + TypeHaskell = "haskell" // TypeMacApps is a pkg:macapps purl. TypeMacApps = "macapps" // TypeHex is a pkg:hex purl. @@ -172,6 +174,7 @@ func validType(t string) bool { TypeGithub: true, TypeGolang: true, TypeHackage: true, + TypeHaskell: true, TypeHex: true, TypeMacApps: true, TypeMaven: true, From 8a7155d145b10e3368d59af1615a18d411fa4b32 Mon Sep 17 00:00:00 2001 From: brnpl Date: Tue, 24 Dec 2024 17:53:08 +0100 Subject: [PATCH 2/5] Updated list.go --- extractor/filesystem/list/list.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extractor/filesystem/list/list.go b/extractor/filesystem/list/list.go index bc9e77e6..60112221 100644 --- a/extractor/filesystem/list/list.go +++ b/extractor/filesystem/list/list.go @@ -146,6 +146,7 @@ var ( Go, Dart, Erlang, + Haskell, PHP, R, Ruby, @@ -165,6 +166,7 @@ var ( "go": Go, "dart": Dart, "erlang": Erlang, + "haskell": Haskell, "r": R, "ruby": Ruby, "dotnet": Dotnet, From 80a616e6133f81d1566c5c7d6eb77fc783f0fcc5 Mon Sep 17 00:00:00 2001 From: brnpl Date: Mon, 13 Jan 2025 14:33:26 +0100 Subject: [PATCH 3/5] Fixes from code review --- docs/supported_inventory_types.md | 2 +- .../stack.go => stacklock/stacklock.go} | 26 ++-- .../stacklock_test.go} | 117 ++++++------------ .../{stack => stacklock}/testdata/invalid | 2 +- .../{stack => stacklock}/testdata/valid | 3 +- extractor/filesystem/list/list.go | 4 +- 6 files changed, 63 insertions(+), 91 deletions(-) rename extractor/filesystem/language/haskell/{stack/stack.go => stacklock/stacklock.go} (88%) rename extractor/filesystem/language/haskell/{stack/stack_test.go => stacklock/stacklock_test.go} (67%) rename extractor/filesystem/language/haskell/{stack => stacklock}/testdata/invalid (95%) rename extractor/filesystem/language/haskell/{stack => stacklock}/testdata/valid (98%) diff --git a/docs/supported_inventory_types.md b/docs/supported_inventory_types.md index 2b4c441a..092ecc7b 100644 --- a/docs/supported_inventory_types.md +++ b/docs/supported_inventory_types.md @@ -35,7 +35,7 @@ SCALIBR supports extracting software package information from a variety of OS an * Go binaries * go.mod (OSV) * Haskell - * Stack + * stack.yaml.lock * Java * Java archives * Lockfiles: pom.xml, gradle.lockfile, verification-metadata.xml diff --git a/extractor/filesystem/language/haskell/stack/stack.go b/extractor/filesystem/language/haskell/stacklock/stacklock.go similarity index 88% rename from extractor/filesystem/language/haskell/stack/stack.go rename to extractor/filesystem/language/haskell/stacklock/stacklock.go index 93e485a1..17e461e0 100644 --- a/extractor/filesystem/language/haskell/stack/stack.go +++ b/extractor/filesystem/language/haskell/stacklock/stacklock.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package stack extracts stack.yaml.lock files from haskell projects. -package stack +// Package stacklock extracts stack.yaml.lock files from haskell projects. +package stacklock import ( "bufio" @@ -33,7 +33,7 @@ import ( const ( // Name is the unique name of this extractor. - Name = "haskell/stack" + Name = "haskell/stacklock" // defaultMaxFileSizeBytes is the maximum file size an extractor will unmarshal. // If Extract gets a bigger file, it will return an error. @@ -57,13 +57,13 @@ func DefaultConfig() Config { } } -// Extractor extracts stack package info from stack.yaml.lock files. +// Extractor extracts stacklock package info from stack.yaml.lock files. type Extractor struct { stats stats.Collector maxFileSizeBytes int64 } -// New returns a haskell stack extractor. +// New returns a haskell stacklock extractor. func New(cfg Config) *Extractor { return &Extractor{ stats: cfg.Stats, @@ -91,9 +91,8 @@ func (e Extractor) Requirements() *plugin.Capabilities { return &plugin.Capabili // FileRequired return true if the specified file matched the stack.yaml.lock file pattern. func (e Extractor) FileRequired(api filesystem.FileAPI) bool { path := api.Path() - normalizedPath := filepath.ToSlash(path) - if filepath.Base(normalizedPath) != "stack.yaml.lock" { + if filepath.Base(path) != "stack.yaml.lock" { return false } @@ -139,7 +138,7 @@ func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([] return inventory, err } -var re = regexp.MustCompile(`hackage:\s*([a-zA-Z0-9\-]+)-([0-9.]+)@`) +var PackageVersionRe = regexp.MustCompile(`hackage:\s*([a-zA-Z0-9\-]+)-([0-9.]+)@`) func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error) { s := bufio.NewScanner(input.Reader) @@ -157,7 +156,7 @@ func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanI continue } - matches := re.FindStringSubmatch(line) + matches := PackageVersionRe.FindStringSubmatch(line) if len(matches) == 3 { pkgName := matches[1] pkgVersion := matches[2] @@ -170,6 +169,15 @@ func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanI pkgs = append(pkgs, i) } + + if s.Err() != nil { + return pkgs, fmt.Errorf("error while scanning cabal.project.freeze file from %v: %w", input.Path, s.Err()) + } + } + + // EOF + if len(pkgs) == 0 { + return pkgs, fmt.Errorf("EOF reached while scanning %q", input.Path) } return pkgs, nil diff --git a/extractor/filesystem/language/haskell/stack/stack_test.go b/extractor/filesystem/language/haskell/stacklock/stacklock_test.go similarity index 67% rename from extractor/filesystem/language/haskell/stack/stack_test.go rename to extractor/filesystem/language/haskell/stacklock/stacklock_test.go index d7da7575..c87607f5 100644 --- a/extractor/filesystem/language/haskell/stack/stack_test.go +++ b/extractor/filesystem/language/haskell/stacklock/stacklock_test.go @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -package stack_test +package stacklock_test import ( "context" "io/fs" "path/filepath" - "reflect" "testing" "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/google/osv-scalibr/extractor" "github.com/google/osv-scalibr/extractor/filesystem" "github.com/google/osv-scalibr/extractor/filesystem/internal/units" - "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stack" + "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stacklock" "github.com/google/osv-scalibr/extractor/filesystem/simplefileapi" - scalibrfs "github.com/google/osv-scalibr/fs" "github.com/google/osv-scalibr/purl" "github.com/google/osv-scalibr/stats" + "github.com/google/osv-scalibr/testing/extracttest" "github.com/google/osv-scalibr/testing/fakefs" "github.com/google/osv-scalibr/testing/testcollector" ) @@ -37,22 +37,22 @@ import ( func TestNew(t *testing.T) { tests := []struct { name string - cfg stack.Config - wantCfg stack.Config + cfg stacklock.Config + wantCfg stacklock.Config }{ { name: "default", - cfg: stack.DefaultConfig(), - wantCfg: stack.Config{ + cfg: stacklock.DefaultConfig(), + wantCfg: stacklock.Config{ MaxFileSizeBytes: 100 * units.MiB, }, }, { name: "custom", - cfg: stack.Config{ + cfg: stacklock.Config{ MaxFileSizeBytes: 10, }, - wantCfg: stack.Config{ + wantCfg: stacklock.Config{ MaxFileSizeBytes: 10, }, }, @@ -60,9 +60,9 @@ func TestNew(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := stack.New(tt.cfg) - if !reflect.DeepEqual(got.Config(), tt.wantCfg) { - t.Errorf("New(%+v).Config(): got %+v, want %+v", tt.cfg, got.Config(), tt.wantCfg) + got := stacklock.New(tt.cfg) + if diff := cmp.Diff(tt.wantCfg, got.Config()); diff != "" { + t.Errorf("New(%+v).Config(): (-want +got):\n%s", tt.cfg, diff) } }) } @@ -130,7 +130,7 @@ func TestFileRequired(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { collector := testcollector.New() - var e filesystem.Extractor = stack.New(stack.Config{ + var e filesystem.Extractor = stacklock.New(stacklock.Config{ Stats: collector, MaxFileSizeBytes: tt.maxFileSizeBytes, }) @@ -158,17 +158,13 @@ func TestFileRequired(t *testing.T) { } func TestExtract(t *testing.T) { - tests := []struct { - name string - path string - cfg stack.Config - wantInventory []*extractor.Inventory - wantResultMetric stats.FileExtractedResult - }{ + tests := []extracttest.TestTableEntry{ { - name: "valid stack.yaml.lock file", - path: "testdata/valid", - wantInventory: []*extractor.Inventory{ + Name: "valid stack.yaml.lock file", + InputConfig: extracttest.ScanInputMockConfig{ + Path: "testdata/valid", + }, + WantInventory: []*extractor.Inventory{ { Name: "fuzzyset", Version: "0.2.4", @@ -190,66 +186,45 @@ func TestExtract(t *testing.T) { Locations: []string{"testdata/valid"}, }, }, - wantResultMetric: stats.FileExtractedResultSuccess, }, { - name: "invalid stack.yaml.lock file", - path: "testdata/invalid", - wantInventory: []*extractor.Inventory{}, + Name: "invalid stack.yaml.lock file", + InputConfig: extracttest.ScanInputMockConfig{ + Path: "testdata/invalid", + }, + WantInventory: []*extractor.Inventory{}, + WantErr: cmpopts.AnyError, }, } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - fsys := scalibrfs.DirFS(".") - - r, err := fsys.Open(tt.path) - defer func() { - if err = r.Close(); err != nil { - t.Errorf("Close(): %v", err) - } - }() - if err != nil { - t.Fatal(err) - } - - info, err := r.Stat() - if err != nil { - t.Fatalf("Stat(): %v", err) - } - + t.Run(tt.Name, func(t *testing.T) { collector := testcollector.New() - tt.cfg.Stats = collector - - input := &filesystem.ScanInput{FS: scalibrfs.DirFS("."), Path: tt.path, Info: info, Reader: r} - var e filesystem.Extractor = stack.New(defaultConfigWith(tt.cfg)) - got, err := e.Extract(context.Background(), input) + var e filesystem.Extractor = stacklock.New(stacklock.Config{ + Stats: collector, + MaxFileSizeBytes: 100, + }) - if diff := cmp.Diff(tt.wantInventory, got); diff != "" { - t.Errorf("Extract(%s) (-want +got):\n%s", tt.path, diff) - } + scanInput := extracttest.GenerateScanInputMock(t, tt.InputConfig) + defer extracttest.CloseTestScanInput(t, scanInput) - wantResultMetric := tt.wantResultMetric - if wantResultMetric == "" { - wantResultMetric = stats.FileExtractedResultSuccess - } + got, err := e.Extract(context.Background(), &scanInput) - gotResultMetric := collector.FileExtractedResult(tt.path) - if gotResultMetric != wantResultMetric { - t.Errorf("Extract(%s) recorded result metric %v, want result metric %v", tt.path, gotResultMetric, wantResultMetric) + if diff := cmp.Diff(tt.WantErr, err, cmpopts.EquateErrors()); diff != "" { + t.Errorf("%s.Extract(%q) error diff (-want +got):\n%s", e.Name(), tt.InputConfig.Path, diff) + return } - gotFileSizeMetric := collector.FileExtractedFileSize(tt.path) - if gotFileSizeMetric != info.Size() { - t.Errorf("Extract(%s) recorded file size %v, want file size %v", tt.path, gotFileSizeMetric, info.Size()) + if diff := cmp.Diff(tt.WantInventory, got, cmpopts.SortSlices(extracttest.InventoryCmpLess)); diff != "" { + t.Errorf("%s.Extract(%q) diff (-want +got):\n%s", e.Name(), tt.InputConfig.Path, diff) } }) } } func TestToPURL(t *testing.T) { - e := stack.Extractor{} + e := stacklock.Extractor{} i := &extractor.Inventory{ Name: "Name", Version: "1.2.3", @@ -265,15 +240,3 @@ func TestToPURL(t *testing.T) { t.Errorf("ToPURL(%v) (-want +got):\n%s", i, diff) } } - -func defaultConfigWith(cfg stack.Config) stack.Config { - newCfg := stack.DefaultConfig() - - if cfg.MaxFileSizeBytes > 0 { - newCfg.MaxFileSizeBytes = cfg.MaxFileSizeBytes - } - if cfg.Stats != nil { - newCfg.Stats = cfg.Stats - } - return newCfg -} diff --git a/extractor/filesystem/language/haskell/stack/testdata/invalid b/extractor/filesystem/language/haskell/stacklock/testdata/invalid similarity index 95% rename from extractor/filesystem/language/haskell/stack/testdata/invalid rename to extractor/filesystem/language/haskell/stacklock/testdata/invalid index 662c696c..4b5c9d12 100644 --- a/extractor/filesystem/language/haskell/stack/testdata/invalid +++ b/extractor/filesystem/language/haskell/stacklock/testdata/invalid @@ -3,4 +3,4 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: \ No newline at end of file +packages: diff --git a/extractor/filesystem/language/haskell/stack/testdata/valid b/extractor/filesystem/language/haskell/stacklock/testdata/valid similarity index 98% rename from extractor/filesystem/language/haskell/stack/testdata/valid rename to extractor/filesystem/language/haskell/stacklock/testdata/valid index dab6d9f8..3ebf46b2 100644 --- a/extractor/filesystem/language/haskell/stack/testdata/valid +++ b/extractor/filesystem/language/haskell/stacklock/testdata/valid @@ -37,4 +37,5 @@ snapshots: sha256: 1e32b51d9082fdf6f3bd92accc9dfffd4ddaf406404427fb10bf76d2bc03cbbb size: 720263 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/41.yaml - original: lts-22.41 \ No newline at end of file + original: lts-22.41 + \ No newline at end of file diff --git a/extractor/filesystem/list/list.go b/extractor/filesystem/list/list.go index 60112221..0c0f5637 100644 --- a/extractor/filesystem/list/list.go +++ b/extractor/filesystem/list/list.go @@ -33,7 +33,7 @@ import ( "github.com/google/osv-scalibr/extractor/filesystem/language/erlang/mixlock" "github.com/google/osv-scalibr/extractor/filesystem/language/golang/gobinary" "github.com/google/osv-scalibr/extractor/filesystem/language/golang/gomod" - "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stack" + "github.com/google/osv-scalibr/extractor/filesystem/language/haskell/stacklock" javaarchive "github.com/google/osv-scalibr/extractor/filesystem/language/java/archive" "github.com/google/osv-scalibr/extractor/filesystem/language/java/gradlelockfile" "github.com/google/osv-scalibr/extractor/filesystem/language/java/gradleverificationmetadataxml" @@ -105,7 +105,7 @@ var ( // Erlang extractors. Erlang []filesystem.Extractor = []filesystem.Extractor{mixlock.Extractor{}} // Haskell extractors. - Haskell []filesystem.Extractor = []filesystem.Extractor{stack.Extractor{}} + Haskell []filesystem.Extractor = []filesystem.Extractor{stacklock.New(stacklock.DefaultConfig())} // R extractors R []filesystem.Extractor = []filesystem.Extractor{renvlock.Extractor{}} // Ruby extractors. From 6819422c89115c0aa68c66bb32903bfadc36666b Mon Sep 17 00:00:00 2001 From: brnpl Date: Thu, 16 Jan 2025 09:51:25 +0100 Subject: [PATCH 4/5] Fixes from code review --- .../filesystem/language/haskell/stacklock/stacklock.go | 9 ++------- .../filesystem/language/haskell/stacklock/testdata/valid | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/extractor/filesystem/language/haskell/stacklock/stacklock.go b/extractor/filesystem/language/haskell/stacklock/stacklock.go index 17e461e0..a0b68944 100644 --- a/extractor/filesystem/language/haskell/stacklock/stacklock.go +++ b/extractor/filesystem/language/haskell/stacklock/stacklock.go @@ -138,7 +138,7 @@ func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([] return inventory, err } -var PackageVersionRe = regexp.MustCompile(`hackage:\s*([a-zA-Z0-9\-]+)-([0-9.]+)@`) +var packageVersionRe = regexp.MustCompile(`hackage:\s*([a-zA-Z0-9\-]+)-([0-9.]+)@`) func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error) { s := bufio.NewScanner(input.Reader) @@ -156,7 +156,7 @@ func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanI continue } - matches := PackageVersionRe.FindStringSubmatch(line) + matches := packageVersionRe.FindStringSubmatch(line) if len(matches) == 3 { pkgName := matches[1] pkgVersion := matches[2] @@ -175,11 +175,6 @@ func (e Extractor) extractFromInput(ctx context.Context, input *filesystem.ScanI } } - // EOF - if len(pkgs) == 0 { - return pkgs, fmt.Errorf("EOF reached while scanning %q", input.Path) - } - return pkgs, nil } diff --git a/extractor/filesystem/language/haskell/stacklock/testdata/valid b/extractor/filesystem/language/haskell/stacklock/testdata/valid index 3ebf46b2..4b5fce07 100644 --- a/extractor/filesystem/language/haskell/stacklock/testdata/valid +++ b/extractor/filesystem/language/haskell/stacklock/testdata/valid @@ -38,4 +38,3 @@ snapshots: size: 720263 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/41.yaml original: lts-22.41 - \ No newline at end of file From 14199c93d268396b939b4436a35f0dd6eba309d6 Mon Sep 17 00:00:00 2001 From: brnpl Date: Thu, 16 Jan 2025 09:53:13 +0100 Subject: [PATCH 5/5] Minor fix --- .../filesystem/language/haskell/stacklock/stacklock_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/extractor/filesystem/language/haskell/stacklock/stacklock_test.go b/extractor/filesystem/language/haskell/stacklock/stacklock_test.go index c87607f5..005105ae 100644 --- a/extractor/filesystem/language/haskell/stacklock/stacklock_test.go +++ b/extractor/filesystem/language/haskell/stacklock/stacklock_test.go @@ -193,7 +193,6 @@ func TestExtract(t *testing.T) { Path: "testdata/invalid", }, WantInventory: []*extractor.Inventory{}, - WantErr: cmpopts.AnyError, }, }