From 7939ab944e8064a1c58132b8f43fd34765985a80 Mon Sep 17 00:00:00 2001 From: gui774ume Date: Thu, 27 Apr 2023 00:57:21 +0200 Subject: [PATCH] add file hashes --- cws/dumpsv1/activity_dump.pb.go | 367 +++++++++------ cws/dumpsv1/activity_dump_vtproto.pb.go | 80 ++++ java/com/dd/cws/adv1/pb/SecDumpProto.java | 533 +++++++++++++++++++++- proto/cws/dumpsv1/activity_dump.proto | 14 + 4 files changed, 835 insertions(+), 159 deletions(-) diff --git a/cws/dumpsv1/activity_dump.pb.go b/cws/dumpsv1/activity_dump.pb.go index 1c110ca0..5d35d585 100644 --- a/cws/dumpsv1/activity_dump.pb.go +++ b/cws/dumpsv1/activity_dump.pb.go @@ -20,6 +20,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type HashState int32 + +const ( + HashState_NO_HASH HashState = 0 + HashState_DONE HashState = 1 + HashState_FILE_NOT_FOUND HashState = 2 + HashState_PATHNAME_RESOLUTION_ERROR HashState = 3 + HashState_FILE_TOO_BIG HashState = 4 + HashState_EVENT_TYPE_NOT_CONFIGURED HashState = 5 + HashState_HASH_WAS_RATE_LIMITED HashState = 6 + HashState_UNKNOWN_HASH_ERROR HashState = 7 +) + +// Enum value maps for HashState. +var ( + HashState_name = map[int32]string{ + 0: "NO_HASH", + 1: "DONE", + 2: "FILE_NOT_FOUND", + 3: "PATHNAME_RESOLUTION_ERROR", + 4: "FILE_TOO_BIG", + 5: "EVENT_TYPE_NOT_CONFIGURED", + 6: "HASH_WAS_RATE_LIMITED", + 7: "UNKNOWN_HASH_ERROR", + } + HashState_value = map[string]int32{ + "NO_HASH": 0, + "DONE": 1, + "FILE_NOT_FOUND": 2, + "PATHNAME_RESOLUTION_ERROR": 3, + "FILE_TOO_BIG": 4, + "EVENT_TYPE_NOT_CONFIGURED": 5, + "HASH_WAS_RATE_LIMITED": 6, + "UNKNOWN_HASH_ERROR": 7, + } +) + +func (x HashState) Enum() *HashState { + p := new(HashState) + *p = x + return p +} + +func (x HashState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HashState) Descriptor() protoreflect.EnumDescriptor { + return file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[0].Descriptor() +} + +func (HashState) Type() protoreflect.EnumType { + return &file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[0] +} + +func (x HashState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HashState.Descriptor instead. +func (HashState) EnumDescriptor() ([]byte, []int) { + return file_proto_cws_dumpsv1_activity_dump_proto_rawDescGZIP(), []int{0} +} + type GenerationType int32 const ( @@ -53,11 +117,11 @@ func (x GenerationType) String() string { } func (GenerationType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[0].Descriptor() + return file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[1].Descriptor() } func (GenerationType) Type() protoreflect.EnumType { - return &file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[0] + return &file_proto_cws_dumpsv1_activity_dump_proto_enumTypes[1] } func (x GenerationType) Number() protoreflect.EnumNumber { @@ -66,7 +130,7 @@ func (x GenerationType) Number() protoreflect.EnumNumber { // Deprecated: Use GenerationType.Descriptor instead. func (GenerationType) EnumDescriptor() ([]byte, []int) { - return file_proto_cws_dumpsv1_activity_dump_proto_rawDescGZIP(), []int{0} + return file_proto_cws_dumpsv1_activity_dump_proto_rawDescGZIP(), []int{1} } type SecDump struct { @@ -1001,22 +1065,24 @@ type FileInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` - User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` - Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"` - Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` - Mode uint32 `protobuf:"varint,5,opt,name=mode,proto3" json:"mode,omitempty"` // TODO: check conversion with uint16 - Ctime uint64 `protobuf:"varint,6,opt,name=ctime,proto3" json:"ctime,omitempty"` - Mtime uint64 `protobuf:"varint,7,opt,name=mtime,proto3" json:"mtime,omitempty"` - MountId uint32 `protobuf:"varint,8,opt,name=mount_id,json=mountId,proto3" json:"mount_id,omitempty"` - Inode uint64 `protobuf:"varint,9,opt,name=inode,proto3" json:"inode,omitempty"` - InUpperLayer bool `protobuf:"varint,10,opt,name=in_upper_layer,json=inUpperLayer,proto3" json:"in_upper_layer,omitempty"` - Path string `protobuf:"bytes,11,opt,name=path,proto3" json:"path,omitempty"` - Basename string `protobuf:"bytes,12,opt,name=basename,proto3" json:"basename,omitempty"` - Filesystem string `protobuf:"bytes,13,opt,name=filesystem,proto3" json:"filesystem,omitempty"` - PackageName string `protobuf:"bytes,14,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` - PackageVersion string `protobuf:"bytes,15,opt,name=package_version,json=packageVersion,proto3" json:"package_version,omitempty"` - PackageSrcversion string `protobuf:"bytes,16,opt,name=package_srcversion,json=packageSrcversion,proto3" json:"package_srcversion,omitempty"` + Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"` + Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` + Mode uint32 `protobuf:"varint,5,opt,name=mode,proto3" json:"mode,omitempty"` // TODO: check conversion with uint16 + Ctime uint64 `protobuf:"varint,6,opt,name=ctime,proto3" json:"ctime,omitempty"` + Mtime uint64 `protobuf:"varint,7,opt,name=mtime,proto3" json:"mtime,omitempty"` + MountId uint32 `protobuf:"varint,8,opt,name=mount_id,json=mountId,proto3" json:"mount_id,omitempty"` + Inode uint64 `protobuf:"varint,9,opt,name=inode,proto3" json:"inode,omitempty"` + InUpperLayer bool `protobuf:"varint,10,opt,name=in_upper_layer,json=inUpperLayer,proto3" json:"in_upper_layer,omitempty"` + Path string `protobuf:"bytes,11,opt,name=path,proto3" json:"path,omitempty"` + Basename string `protobuf:"bytes,12,opt,name=basename,proto3" json:"basename,omitempty"` + Filesystem string `protobuf:"bytes,13,opt,name=filesystem,proto3" json:"filesystem,omitempty"` + PackageName string `protobuf:"bytes,14,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` + PackageVersion string `protobuf:"bytes,15,opt,name=package_version,json=packageVersion,proto3" json:"package_version,omitempty"` + PackageSrcversion string `protobuf:"bytes,16,opt,name=package_srcversion,json=packageSrcversion,proto3" json:"package_srcversion,omitempty"` + Hashes []string `protobuf:"bytes,17,rep,name=hashes,proto3" json:"hashes,omitempty"` + HashState HashState `protobuf:"varint,18,opt,name=hash_state,json=hashState,proto3,enum=datadog.cws.dumpsv1.HashState" json:"hash_state,omitempty"` } func (x *FileInfo) Reset() { @@ -1163,6 +1229,20 @@ func (x *FileInfo) GetPackageSrcversion() string { return "" } +func (x *FileInfo) GetHashes() []string { + if x != nil { + return x.Hashes + } + return nil +} + +func (x *FileInfo) GetHashState() HashState { + if x != nil { + return x.HashState + } + return HashState_NO_HASH +} + type Credentials struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1692,7 +1772,7 @@ var file_proto_cws_dumpsv1_activity_dump_proto_rawDesc = []byte{ 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xba, 0x03, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, + 0x74, 0x22, 0x91, 0x04, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, @@ -1719,74 +1799,91 @@ var file_proto_cws_dumpsv1_activity_dump_proto_rawDesc = []byte{ 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x72, 0x63, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x53, 0x72, 0x63, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa1, - 0x03, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x69, - 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x47, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x27, 0x0a, - 0x0f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x73, 0x5f, 0x75, 0x69, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x73, 0x55, 0x69, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x66, 0x73, 0x5f, 0x67, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, - 0x73, 0x47, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x73, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x66, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x66, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x70, 0x5f, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x63, 0x61, 0x70, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x61, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x64, 0x22, 0x57, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x69, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, - 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, - 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x22, 0x75, 0x0a, 0x08, 0x42, - 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, - 0x70, 0x73, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x70, 0x22, 0x9b, 0x02, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, - 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, - 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x64, 0x6f, 0x67, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x76, 0x31, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x2a, 0x38, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 0x42, 0x55, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x64, 0x64, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x61, 0x64, 0x76, 0x31, 0x2e, 0x70, 0x62, - 0x42, 0x0c, 0x53, 0x65, 0x63, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x00, - 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, - 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x77, 0x73, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x61, 0x67, 0x65, 0x53, 0x72, 0x63, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x76, 0x31, + 0x2e, 0x48, 0x61, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x68, 0x61, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa1, 0x03, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0c, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x69, 0x64, 0x12, 0x25, 0x0a, + 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x15, 0x0a, + 0x06, 0x66, 0x73, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, + 0x73, 0x55, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x73, 0x5f, 0x67, 0x69, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x73, 0x47, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x73, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x70, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x45, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x61, 0x70, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x22, 0x57, 0x0a, 0x0a, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, + 0x31, 0x0a, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, 0x70, + 0x73, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x62, 0x69, + 0x6e, 0x64, 0x22, 0x75, 0x0a, 0x08, 0x42, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x45, + 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, + 0x63, 0x77, 0x73, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x9b, 0x02, 0x0a, 0x0b, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, + 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x64, + 0x75, 0x6d, 0x70, 0x73, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x75, + 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0xb9, 0x01, 0x0a, 0x09, 0x48, 0x61, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x48, 0x41, 0x53, 0x48, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, + 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, + 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x41, 0x54, 0x48, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x52, 0x45, 0x53, + 0x4f, 0x4c, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, + 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x42, 0x49, 0x47, 0x10, + 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x45, 0x44, 0x10, 0x05, + 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x57, 0x41, 0x53, 0x5f, 0x52, 0x41, 0x54, + 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x07, 0x2a, 0x38, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 0x42, 0x55, 0x0a, + 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x64, 0x2e, 0x63, 0x77, 0x73, 0x2e, 0x61, 0x64, 0x76, 0x31, + 0x2e, 0x70, 0x62, 0x42, 0x0c, 0x53, 0x65, 0x63, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x00, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x77, 0x73, 0x2f, 0x64, 0x75, 0x6d, + 0x70, 0x73, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1801,55 +1898,57 @@ func file_proto_cws_dumpsv1_activity_dump_proto_rawDescGZIP() []byte { return file_proto_cws_dumpsv1_activity_dump_proto_rawDescData } -var file_proto_cws_dumpsv1_activity_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_cws_dumpsv1_activity_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_proto_cws_dumpsv1_activity_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_proto_cws_dumpsv1_activity_dump_proto_goTypes = []interface{}{ - (GenerationType)(0), // 0: datadog.cws.dumpsv1.GenerationType - (*SecDump)(nil), // 1: datadog.cws.dumpsv1.SecDump - (*Metadata)(nil), // 2: datadog.cws.dumpsv1.Metadata - (*SecurityProfile)(nil), // 3: datadog.cws.dumpsv1.SecurityProfile - (*ProcessActivityNode)(nil), // 4: datadog.cws.dumpsv1.ProcessActivityNode - (*ProcessInfo)(nil), // 5: datadog.cws.dumpsv1.ProcessInfo - (*FileActivityNode)(nil), // 6: datadog.cws.dumpsv1.FileActivityNode - (*OpenNode)(nil), // 7: datadog.cws.dumpsv1.OpenNode - (*DNSNode)(nil), // 8: datadog.cws.dumpsv1.DNSNode - (*DNSInfo)(nil), // 9: datadog.cws.dumpsv1.DNSInfo - (*FileInfo)(nil), // 10: datadog.cws.dumpsv1.FileInfo - (*Credentials)(nil), // 11: datadog.cws.dumpsv1.Credentials - (*SocketNode)(nil), // 12: datadog.cws.dumpsv1.SocketNode - (*BindNode)(nil), // 13: datadog.cws.dumpsv1.BindNode - (*MatchedRule)(nil), // 14: datadog.cws.dumpsv1.MatchedRule - nil, // 15: datadog.cws.dumpsv1.MatchedRule.RuleTagsEntry + (HashState)(0), // 0: datadog.cws.dumpsv1.HashState + (GenerationType)(0), // 1: datadog.cws.dumpsv1.GenerationType + (*SecDump)(nil), // 2: datadog.cws.dumpsv1.SecDump + (*Metadata)(nil), // 3: datadog.cws.dumpsv1.Metadata + (*SecurityProfile)(nil), // 4: datadog.cws.dumpsv1.SecurityProfile + (*ProcessActivityNode)(nil), // 5: datadog.cws.dumpsv1.ProcessActivityNode + (*ProcessInfo)(nil), // 6: datadog.cws.dumpsv1.ProcessInfo + (*FileActivityNode)(nil), // 7: datadog.cws.dumpsv1.FileActivityNode + (*OpenNode)(nil), // 8: datadog.cws.dumpsv1.OpenNode + (*DNSNode)(nil), // 9: datadog.cws.dumpsv1.DNSNode + (*DNSInfo)(nil), // 10: datadog.cws.dumpsv1.DNSInfo + (*FileInfo)(nil), // 11: datadog.cws.dumpsv1.FileInfo + (*Credentials)(nil), // 12: datadog.cws.dumpsv1.Credentials + (*SocketNode)(nil), // 13: datadog.cws.dumpsv1.SocketNode + (*BindNode)(nil), // 14: datadog.cws.dumpsv1.BindNode + (*MatchedRule)(nil), // 15: datadog.cws.dumpsv1.MatchedRule + nil, // 16: datadog.cws.dumpsv1.MatchedRule.RuleTagsEntry } var file_proto_cws_dumpsv1_activity_dump_proto_depIdxs = []int32{ - 2, // 0: datadog.cws.dumpsv1.SecDump.metadata:type_name -> datadog.cws.dumpsv1.Metadata - 4, // 1: datadog.cws.dumpsv1.SecDump.tree:type_name -> datadog.cws.dumpsv1.ProcessActivityNode - 2, // 2: datadog.cws.dumpsv1.SecurityProfile.metadata:type_name -> datadog.cws.dumpsv1.Metadata - 4, // 3: datadog.cws.dumpsv1.SecurityProfile.tree:type_name -> datadog.cws.dumpsv1.ProcessActivityNode - 5, // 4: datadog.cws.dumpsv1.ProcessActivityNode.process:type_name -> datadog.cws.dumpsv1.ProcessInfo - 0, // 5: datadog.cws.dumpsv1.ProcessActivityNode.generation_type:type_name -> datadog.cws.dumpsv1.GenerationType - 14, // 6: datadog.cws.dumpsv1.ProcessActivityNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule - 4, // 7: datadog.cws.dumpsv1.ProcessActivityNode.children:type_name -> datadog.cws.dumpsv1.ProcessActivityNode - 6, // 8: datadog.cws.dumpsv1.ProcessActivityNode.files:type_name -> datadog.cws.dumpsv1.FileActivityNode - 8, // 9: datadog.cws.dumpsv1.ProcessActivityNode.dns_names:type_name -> datadog.cws.dumpsv1.DNSNode - 12, // 10: datadog.cws.dumpsv1.ProcessActivityNode.sockets:type_name -> datadog.cws.dumpsv1.SocketNode - 10, // 11: datadog.cws.dumpsv1.ProcessInfo.file:type_name -> datadog.cws.dumpsv1.FileInfo - 11, // 12: datadog.cws.dumpsv1.ProcessInfo.credentials:type_name -> datadog.cws.dumpsv1.Credentials - 14, // 13: datadog.cws.dumpsv1.FileActivityNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule - 10, // 14: datadog.cws.dumpsv1.FileActivityNode.file:type_name -> datadog.cws.dumpsv1.FileInfo - 0, // 15: datadog.cws.dumpsv1.FileActivityNode.generation_type:type_name -> datadog.cws.dumpsv1.GenerationType - 7, // 16: datadog.cws.dumpsv1.FileActivityNode.open:type_name -> datadog.cws.dumpsv1.OpenNode - 6, // 17: datadog.cws.dumpsv1.FileActivityNode.children:type_name -> datadog.cws.dumpsv1.FileActivityNode - 14, // 18: datadog.cws.dumpsv1.DNSNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule - 9, // 19: datadog.cws.dumpsv1.DNSNode.requests:type_name -> datadog.cws.dumpsv1.DNSInfo - 13, // 20: datadog.cws.dumpsv1.SocketNode.bind:type_name -> datadog.cws.dumpsv1.BindNode - 14, // 21: datadog.cws.dumpsv1.BindNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule - 15, // 22: datadog.cws.dumpsv1.MatchedRule.rule_tags:type_name -> datadog.cws.dumpsv1.MatchedRule.RuleTagsEntry - 23, // [23:23] is the sub-list for method output_type - 23, // [23:23] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 3, // 0: datadog.cws.dumpsv1.SecDump.metadata:type_name -> datadog.cws.dumpsv1.Metadata + 5, // 1: datadog.cws.dumpsv1.SecDump.tree:type_name -> datadog.cws.dumpsv1.ProcessActivityNode + 3, // 2: datadog.cws.dumpsv1.SecurityProfile.metadata:type_name -> datadog.cws.dumpsv1.Metadata + 5, // 3: datadog.cws.dumpsv1.SecurityProfile.tree:type_name -> datadog.cws.dumpsv1.ProcessActivityNode + 6, // 4: datadog.cws.dumpsv1.ProcessActivityNode.process:type_name -> datadog.cws.dumpsv1.ProcessInfo + 1, // 5: datadog.cws.dumpsv1.ProcessActivityNode.generation_type:type_name -> datadog.cws.dumpsv1.GenerationType + 15, // 6: datadog.cws.dumpsv1.ProcessActivityNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule + 5, // 7: datadog.cws.dumpsv1.ProcessActivityNode.children:type_name -> datadog.cws.dumpsv1.ProcessActivityNode + 7, // 8: datadog.cws.dumpsv1.ProcessActivityNode.files:type_name -> datadog.cws.dumpsv1.FileActivityNode + 9, // 9: datadog.cws.dumpsv1.ProcessActivityNode.dns_names:type_name -> datadog.cws.dumpsv1.DNSNode + 13, // 10: datadog.cws.dumpsv1.ProcessActivityNode.sockets:type_name -> datadog.cws.dumpsv1.SocketNode + 11, // 11: datadog.cws.dumpsv1.ProcessInfo.file:type_name -> datadog.cws.dumpsv1.FileInfo + 12, // 12: datadog.cws.dumpsv1.ProcessInfo.credentials:type_name -> datadog.cws.dumpsv1.Credentials + 15, // 13: datadog.cws.dumpsv1.FileActivityNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule + 11, // 14: datadog.cws.dumpsv1.FileActivityNode.file:type_name -> datadog.cws.dumpsv1.FileInfo + 1, // 15: datadog.cws.dumpsv1.FileActivityNode.generation_type:type_name -> datadog.cws.dumpsv1.GenerationType + 8, // 16: datadog.cws.dumpsv1.FileActivityNode.open:type_name -> datadog.cws.dumpsv1.OpenNode + 7, // 17: datadog.cws.dumpsv1.FileActivityNode.children:type_name -> datadog.cws.dumpsv1.FileActivityNode + 15, // 18: datadog.cws.dumpsv1.DNSNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule + 10, // 19: datadog.cws.dumpsv1.DNSNode.requests:type_name -> datadog.cws.dumpsv1.DNSInfo + 0, // 20: datadog.cws.dumpsv1.FileInfo.hash_state:type_name -> datadog.cws.dumpsv1.HashState + 14, // 21: datadog.cws.dumpsv1.SocketNode.bind:type_name -> datadog.cws.dumpsv1.BindNode + 15, // 22: datadog.cws.dumpsv1.BindNode.matched_rules:type_name -> datadog.cws.dumpsv1.MatchedRule + 16, // 23: datadog.cws.dumpsv1.MatchedRule.rule_tags:type_name -> datadog.cws.dumpsv1.MatchedRule.RuleTagsEntry + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_proto_cws_dumpsv1_activity_dump_proto_init() } @@ -2032,7 +2131,7 @@ func file_proto_cws_dumpsv1_activity_dump_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_cws_dumpsv1_activity_dump_proto_rawDesc, - NumEnums: 1, + NumEnums: 2, NumMessages: 15, NumExtensions: 0, NumServices: 0, diff --git a/cws/dumpsv1/activity_dump_vtproto.pb.go b/cws/dumpsv1/activity_dump_vtproto.pb.go index eb653a2d..df19f734 100644 --- a/cws/dumpsv1/activity_dump_vtproto.pb.go +++ b/cws/dumpsv1/activity_dump_vtproto.pb.go @@ -939,6 +939,24 @@ func (m *FileInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.HashState != 0 { + i = encodeVarint(dAtA, i, uint64(m.HashState)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if len(m.Hashes) > 0 { + for iNdEx := len(m.Hashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Hashes[iNdEx]) + copy(dAtA[i:], m.Hashes[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Hashes[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } if len(m.PackageSrcversion) > 0 { i -= len(m.PackageSrcversion) copy(dAtA[i:], m.PackageSrcversion) @@ -1467,7 +1485,9 @@ var vtprotoPool_FileInfo = sync.Pool{ } func (m *FileInfo) ResetVT() { + f0 := m.Hashes[:0] m.Reset() + m.Hashes = f0 } func (m *FileInfo) ReturnToVTPool() { if m != nil { @@ -1926,6 +1946,15 @@ func (m *FileInfo) SizeVT() (n int) { if l > 0 { n += 2 + l + sov(uint64(l)) } + if len(m.Hashes) > 0 { + for _, s := range m.Hashes { + l = len(s) + n += 2 + l + sov(uint64(l)) + } + } + if m.HashState != 0 { + n += 2 + sov(uint64(m.HashState)) + } n += len(m.unknownFields) return n } @@ -5109,6 +5138,57 @@ func (m *FileInfo) UnmarshalVT(dAtA []byte) error { } m.PackageSrcversion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hashes = append(m.Hashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HashState", wireType) + } + m.HashState = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HashState |= HashState(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/java/com/dd/cws/adv1/pb/SecDumpProto.java b/java/com/dd/cws/adv1/pb/SecDumpProto.java index d4b44cc3..9969797a 100644 --- a/java/com/dd/cws/adv1/pb/SecDumpProto.java +++ b/java/com/dd/cws/adv1/pb/SecDumpProto.java @@ -14,6 +14,168 @@ public static void registerAllExtensions( registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + /** + * Protobuf enum {@code datadog.cws.dumpsv1.HashState} + */ + public enum HashState + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NO_HASH = 0; + */ + NO_HASH(0), + /** + * DONE = 1; + */ + DONE(1), + /** + * FILE_NOT_FOUND = 2; + */ + FILE_NOT_FOUND(2), + /** + * PATHNAME_RESOLUTION_ERROR = 3; + */ + PATHNAME_RESOLUTION_ERROR(3), + /** + * FILE_TOO_BIG = 4; + */ + FILE_TOO_BIG(4), + /** + * EVENT_TYPE_NOT_CONFIGURED = 5; + */ + EVENT_TYPE_NOT_CONFIGURED(5), + /** + * HASH_WAS_RATE_LIMITED = 6; + */ + HASH_WAS_RATE_LIMITED(6), + /** + * UNKNOWN_HASH_ERROR = 7; + */ + UNKNOWN_HASH_ERROR(7), + UNRECOGNIZED(-1), + ; + + /** + * NO_HASH = 0; + */ + public static final int NO_HASH_VALUE = 0; + /** + * DONE = 1; + */ + public static final int DONE_VALUE = 1; + /** + * FILE_NOT_FOUND = 2; + */ + public static final int FILE_NOT_FOUND_VALUE = 2; + /** + * PATHNAME_RESOLUTION_ERROR = 3; + */ + public static final int PATHNAME_RESOLUTION_ERROR_VALUE = 3; + /** + * FILE_TOO_BIG = 4; + */ + public static final int FILE_TOO_BIG_VALUE = 4; + /** + * EVENT_TYPE_NOT_CONFIGURED = 5; + */ + public static final int EVENT_TYPE_NOT_CONFIGURED_VALUE = 5; + /** + * HASH_WAS_RATE_LIMITED = 6; + */ + public static final int HASH_WAS_RATE_LIMITED_VALUE = 6; + /** + * UNKNOWN_HASH_ERROR = 7; + */ + public static final int UNKNOWN_HASH_ERROR_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HashState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HashState forNumber(int value) { + switch (value) { + case 0: return NO_HASH; + case 1: return DONE; + case 2: return FILE_NOT_FOUND; + case 3: return PATHNAME_RESOLUTION_ERROR; + case 4: return FILE_TOO_BIG; + case 5: return EVENT_TYPE_NOT_CONFIGURED; + case 6: return HASH_WAS_RATE_LIMITED; + case 7: return UNKNOWN_HASH_ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HashState> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HashState findValueByNumber(int number) { + return HashState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.dd.cws.adv1.pb.SecDumpProto.getDescriptor().getEnumTypes().get(0); + } + + private static final HashState[] VALUES = values(); + + public static HashState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HashState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:datadog.cws.dumpsv1.HashState) + } + /** * Protobuf enum {@code datadog.cws.dumpsv1.GenerationType} */ @@ -105,7 +267,7 @@ public GenerationType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.dd.cws.adv1.pb.SecDumpProto.getDescriptor().getEnumTypes().get(0); + return com.dd.cws.adv1.pb.SecDumpProto.getDescriptor().getEnumTypes().get(1); } private static final GenerationType[] VALUES = values(); @@ -15712,6 +15874,42 @@ public interface FileInfoOrBuilder extends */ com.google.protobuf.ByteString getPackageSrcversionBytes(); + + /** + * repeated string hashes = 17; + * @return A list containing the hashes. + */ + java.util.List + getHashesList(); + /** + * repeated string hashes = 17; + * @return The count of hashes. + */ + int getHashesCount(); + /** + * repeated string hashes = 17; + * @param index The index of the element to return. + * @return The hashes at the given index. + */ + java.lang.String getHashes(int index); + /** + * repeated string hashes = 17; + * @param index The index of the value to return. + * @return The bytes of the hashes at the given index. + */ + com.google.protobuf.ByteString + getHashesBytes(int index); + + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The enum numeric value on the wire for hashState. + */ + int getHashStateValue(); + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The hashState. + */ + com.dd.cws.adv1.pb.SecDumpProto.HashState getHashState(); } /** * Protobuf type {@code datadog.cws.dumpsv1.FileInfo} @@ -15734,6 +15932,8 @@ private FileInfo() { packageName_ = ""; packageVersion_ = ""; packageSrcversion_ = ""; + hashes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + hashState_ = 0; } @java.lang.Override @@ -16165,6 +16365,60 @@ public java.lang.String getPackageSrcversion() { } } + public static final int HASHES_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList hashes_; + /** + * repeated string hashes = 17; + * @return A list containing the hashes. + */ + public com.google.protobuf.ProtocolStringList + getHashesList() { + return hashes_; + } + /** + * repeated string hashes = 17; + * @return The count of hashes. + */ + public int getHashesCount() { + return hashes_.size(); + } + /** + * repeated string hashes = 17; + * @param index The index of the element to return. + * @return The hashes at the given index. + */ + public java.lang.String getHashes(int index) { + return hashes_.get(index); + } + /** + * repeated string hashes = 17; + * @param index The index of the value to return. + * @return The bytes of the hashes at the given index. + */ + public com.google.protobuf.ByteString + getHashesBytes(int index) { + return hashes_.getByteString(index); + } + + public static final int HASH_STATE_FIELD_NUMBER = 18; + private int hashState_ = 0; + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The enum numeric value on the wire for hashState. + */ + @java.lang.Override public int getHashStateValue() { + return hashState_; + } + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The hashState. + */ + @java.lang.Override public com.dd.cws.adv1.pb.SecDumpProto.HashState getHashState() { + com.dd.cws.adv1.pb.SecDumpProto.HashState result = com.dd.cws.adv1.pb.SecDumpProto.HashState.forNumber(hashState_); + return result == null ? com.dd.cws.adv1.pb.SecDumpProto.HashState.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -16227,6 +16481,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageSrcversion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, packageSrcversion_); } + for (int i = 0; i < hashes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, hashes_.getRaw(i)); + } + if (hashState_ != com.dd.cws.adv1.pb.SecDumpProto.HashState.NO_HASH.getNumber()) { + output.writeEnum(18, hashState_); + } getUnknownFields().writeTo(output); } @@ -16292,6 +16552,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageSrcversion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, packageSrcversion_); } + { + int dataSize = 0; + for (int i = 0; i < hashes_.size(); i++) { + dataSize += computeStringSizeNoTag(hashes_.getRaw(i)); + } + size += dataSize; + size += 2 * getHashesList().size(); + } + if (hashState_ != com.dd.cws.adv1.pb.SecDumpProto.HashState.NO_HASH.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(18, hashState_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -16339,6 +16611,9 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getPackageVersion())) return false; if (!getPackageSrcversion() .equals(other.getPackageSrcversion())) return false; + if (!getHashesList() + .equals(other.getHashesList())) return false; + if (hashState_ != other.hashState_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -16386,6 +16661,12 @@ public int hashCode() { hash = (53 * hash) + getPackageVersion().hashCode(); hash = (37 * hash) + PACKAGE_SRCVERSION_FIELD_NUMBER; hash = (53 * hash) + getPackageSrcversion().hashCode(); + if (getHashesCount() > 0) { + hash = (37 * hash) + HASHES_FIELD_NUMBER; + hash = (53 * hash) + getHashesList().hashCode(); + } + hash = (37 * hash) + HASH_STATE_FIELD_NUMBER; + hash = (53 * hash) + hashState_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -16531,6 +16812,9 @@ public Builder clear() { packageName_ = ""; packageVersion_ = ""; packageSrcversion_ = ""; + hashes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00010000); + hashState_ = 0; return this; } @@ -16557,11 +16841,20 @@ public com.dd.cws.adv1.pb.SecDumpProto.FileInfo build() { @java.lang.Override public com.dd.cws.adv1.pb.SecDumpProto.FileInfo buildPartial() { com.dd.cws.adv1.pb.SecDumpProto.FileInfo result = new com.dd.cws.adv1.pb.SecDumpProto.FileInfo(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(com.dd.cws.adv1.pb.SecDumpProto.FileInfo result) { + if (((bitField0_ & 0x00010000) != 0)) { + hashes_ = hashes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00010000); + } + result.hashes_ = hashes_; + } + private void buildPartial0(com.dd.cws.adv1.pb.SecDumpProto.FileInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -16612,6 +16905,9 @@ private void buildPartial0(com.dd.cws.adv1.pb.SecDumpProto.FileInfo result) { if (((from_bitField0_ & 0x00008000) != 0)) { result.packageSrcversion_ = packageSrcversion_; } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.hashState_ = hashState_; + } } @java.lang.Override @@ -16722,6 +17018,19 @@ public Builder mergeFrom(com.dd.cws.adv1.pb.SecDumpProto.FileInfo other) { bitField0_ |= 0x00008000; onChanged(); } + if (!other.hashes_.isEmpty()) { + if (hashes_.isEmpty()) { + hashes_ = other.hashes_; + bitField0_ = (bitField0_ & ~0x00010000); + } else { + ensureHashesIsMutable(); + hashes_.addAll(other.hashes_); + } + onChanged(); + } + if (other.hashState_ != 0) { + setHashStateValue(other.getHashStateValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -16828,6 +17137,17 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 130 + case 138: { + java.lang.String s = input.readStringRequireUtf8(); + ensureHashesIsMutable(); + hashes_.add(s); + break; + } // case 138 + case 144: { + hashState_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 144 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -17688,6 +18008,163 @@ public Builder setPackageSrcversionBytes( onChanged(); return this; } + + private com.google.protobuf.LazyStringList hashes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureHashesIsMutable() { + if (!((bitField0_ & 0x00010000) != 0)) { + hashes_ = new com.google.protobuf.LazyStringArrayList(hashes_); + bitField0_ |= 0x00010000; + } + } + /** + * repeated string hashes = 17; + * @return A list containing the hashes. + */ + public com.google.protobuf.ProtocolStringList + getHashesList() { + return hashes_.getUnmodifiableView(); + } + /** + * repeated string hashes = 17; + * @return The count of hashes. + */ + public int getHashesCount() { + return hashes_.size(); + } + /** + * repeated string hashes = 17; + * @param index The index of the element to return. + * @return The hashes at the given index. + */ + public java.lang.String getHashes(int index) { + return hashes_.get(index); + } + /** + * repeated string hashes = 17; + * @param index The index of the value to return. + * @return The bytes of the hashes at the given index. + */ + public com.google.protobuf.ByteString + getHashesBytes(int index) { + return hashes_.getByteString(index); + } + /** + * repeated string hashes = 17; + * @param index The index to set the value at. + * @param value The hashes to set. + * @return This builder for chaining. + */ + public Builder setHashes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureHashesIsMutable(); + hashes_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string hashes = 17; + * @param value The hashes to add. + * @return This builder for chaining. + */ + public Builder addHashes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureHashesIsMutable(); + hashes_.add(value); + onChanged(); + return this; + } + /** + * repeated string hashes = 17; + * @param values The hashes to add. + * @return This builder for chaining. + */ + public Builder addAllHashes( + java.lang.Iterable values) { + ensureHashesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, hashes_); + onChanged(); + return this; + } + /** + * repeated string hashes = 17; + * @return This builder for chaining. + */ + public Builder clearHashes() { + hashes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * repeated string hashes = 17; + * @param value The bytes of the hashes to add. + * @return This builder for chaining. + */ + public Builder addHashesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureHashesIsMutable(); + hashes_.add(value); + onChanged(); + return this; + } + + private int hashState_ = 0; + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The enum numeric value on the wire for hashState. + */ + @java.lang.Override public int getHashStateValue() { + return hashState_; + } + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @param value The enum numeric value on the wire for hashState to set. + * @return This builder for chaining. + */ + public Builder setHashStateValue(int value) { + hashState_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return The hashState. + */ + @java.lang.Override + public com.dd.cws.adv1.pb.SecDumpProto.HashState getHashState() { + com.dd.cws.adv1.pb.SecDumpProto.HashState result = com.dd.cws.adv1.pb.SecDumpProto.HashState.forNumber(hashState_); + return result == null ? com.dd.cws.adv1.pb.SecDumpProto.HashState.UNRECOGNIZED : result; + } + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @param value The hashState to set. + * @return This builder for chaining. + */ + public Builder setHashState(com.dd.cws.adv1.pb.SecDumpProto.HashState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + hashState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .datadog.cws.dumpsv1.HashState hash_state = 18; + * @return This builder for chaining. + */ + public Builder clearHashState() { + bitField0_ = (bitField0_ & ~0x00020000); + hashState_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -23013,35 +23490,41 @@ public com.dd.cws.adv1.pb.SecDumpProto.MatchedRule getDefaultInstanceForType() { "hedRule\022.\n\010requests\030\001 \003(\0132\034.datadog.cws." + "dumpsv1.DNSInfo\"Q\n\007DNSInfo\022\014\n\004name\030\001 \001(\t" + "\022\014\n\004type\030\002 \001(\r\022\r\n\005class\030\003 \001(\r\022\014\n\004size\030\004 " + - "\001(\r\022\r\n\005count\030\005 \001(\r\"\245\002\n\010FileInfo\022\013\n\003uid\030\001" + + "\001(\r\022\r\n\005count\030\005 \001(\r\"\351\002\n\010FileInfo\022\013\n\003uid\030\001" + " \001(\r\022\014\n\004user\030\002 \001(\t\022\013\n\003gid\030\003 \001(\r\022\r\n\005group" + "\030\004 \001(\t\022\014\n\004mode\030\005 \001(\r\022\r\n\005ctime\030\006 \001(\004\022\r\n\005m" + "time\030\007 \001(\004\022\020\n\010mount_id\030\010 \001(\r\022\r\n\005inode\030\t " + "\001(\004\022\026\n\016in_upper_layer\030\n \001(\010\022\014\n\004path\030\013 \001(" + "\t\022\020\n\010basename\030\014 \001(\t\022\022\n\nfilesystem\030\r \001(\t\022" + "\024\n\014package_name\030\016 \001(\t\022\027\n\017package_version" + - "\030\017 \001(\t\022\032\n\022package_srcversion\030\020 \001(\t\"\224\002\n\013C" + - "redentials\022\013\n\003uid\030\001 \001(\r\022\013\n\003gid\030\002 \001(\r\022\014\n\004" + - "user\030\003 \001(\t\022\r\n\005group\030\004 \001(\t\022\025\n\reffective_u" + - "id\030\005 \001(\r\022\025\n\reffective_gid\030\006 \001(\r\022\026\n\016effec" + - "tive_user\030\007 \001(\t\022\027\n\017effective_group\030\010 \001(\t" + - "\022\016\n\006fs_uid\030\t \001(\r\022\016\n\006fs_gid\030\n \001(\r\022\017\n\007fs_u" + - "ser\030\013 \001(\t\022\020\n\010fs_group\030\014 \001(\t\022\025\n\rcap_effec" + - "tive\030\r \001(\004\022\025\n\rcap_permitted\030\016 \001(\004\"I\n\nSoc" + - "ketNode\022\016\n\006family\030\001 \001(\t\022+\n\004bind\030\002 \003(\0132\035." + - "datadog.cws.dumpsv1.BindNode\"]\n\010BindNode" + - "\0227\n\rmatched_rules\030\003 \003(\0132 .datadog.cws.du" + - "mpsv1.MatchedRule\022\014\n\004port\030\001 \001(\r\022\n\n\002ip\030\002 " + - "\001(\t\"\325\001\n\013MatchedRule\022\017\n\007rule_id\030\001 \001(\t\022\024\n\014" + - "rule_version\030\002 \001(\t\022\023\n\013policy_name\030\003 \001(\t\022" + - "\026\n\016policy_version\030\004 \001(\t\022A\n\trule_tags\030\005 \003" + - "(\0132..datadog.cws.dumpsv1.MatchedRule.Rul" + - "eTagsEntry\032/\n\rRuleTagsEntry\022\013\n\003key\030\001 \001(\t" + - "\022\r\n\005value\030\002 \001(\t:\0028\001*8\n\016GenerationType\022\013\n" + - "\007UNKNOWN\020\000\022\013\n\007RUNTIME\020\001\022\014\n\010SNAPSHOT\020\002BU\n" + - "\022com.dd.cws.adv1.pbB\014SecDumpProtoP\000Z/git" + - "hub.com/DataDog/agent-payload/v5/cws/dum" + - "psv1b\006proto3" + "\030\017 \001(\t\022\032\n\022package_srcversion\030\020 \001(\t\022\016\n\006ha" + + "shes\030\021 \003(\t\0222\n\nhash_state\030\022 \001(\0162\036.datadog" + + ".cws.dumpsv1.HashState\"\224\002\n\013Credentials\022\013" + + "\n\003uid\030\001 \001(\r\022\013\n\003gid\030\002 \001(\r\022\014\n\004user\030\003 \001(\t\022\r" + + "\n\005group\030\004 \001(\t\022\025\n\reffective_uid\030\005 \001(\r\022\025\n\r" + + "effective_gid\030\006 \001(\r\022\026\n\016effective_user\030\007 " + + "\001(\t\022\027\n\017effective_group\030\010 \001(\t\022\016\n\006fs_uid\030\t" + + " \001(\r\022\016\n\006fs_gid\030\n \001(\r\022\017\n\007fs_user\030\013 \001(\t\022\020\n" + + "\010fs_group\030\014 \001(\t\022\025\n\rcap_effective\030\r \001(\004\022\025" + + "\n\rcap_permitted\030\016 \001(\004\"I\n\nSocketNode\022\016\n\006f" + + "amily\030\001 \001(\t\022+\n\004bind\030\002 \003(\0132\035.datadog.cws." + + "dumpsv1.BindNode\"]\n\010BindNode\0227\n\rmatched_" + + "rules\030\003 \003(\0132 .datadog.cws.dumpsv1.Matche" + + "dRule\022\014\n\004port\030\001 \001(\r\022\n\n\002ip\030\002 \001(\t\"\325\001\n\013Matc" + + "hedRule\022\017\n\007rule_id\030\001 \001(\t\022\024\n\014rule_version" + + "\030\002 \001(\t\022\023\n\013policy_name\030\003 \001(\t\022\026\n\016policy_ve" + + "rsion\030\004 \001(\t\022A\n\trule_tags\030\005 \003(\0132..datadog" + + ".cws.dumpsv1.MatchedRule.RuleTagsEntry\032/" + + "\n\rRuleTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001*\271\001\n\tHashState\022\013\n\007NO_HASH\020\000\022\010\n\004DO" + + "NE\020\001\022\022\n\016FILE_NOT_FOUND\020\002\022\035\n\031PATHNAME_RES" + + "OLUTION_ERROR\020\003\022\020\n\014FILE_TOO_BIG\020\004\022\035\n\031EVE" + + "NT_TYPE_NOT_CONFIGURED\020\005\022\031\n\025HASH_WAS_RAT" + + "E_LIMITED\020\006\022\026\n\022UNKNOWN_HASH_ERROR\020\007*8\n\016G" + + "enerationType\022\013\n\007UNKNOWN\020\000\022\013\n\007RUNTIME\020\001\022" + + "\014\n\010SNAPSHOT\020\002BU\n\022com.dd.cws.adv1.pbB\014Sec" + + "DumpProtoP\000Z/github.com/DataDog/agent-pa" + + "yload/v5/cws/dumpsv1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -23106,7 +23589,7 @@ public com.dd.cws.adv1.pb.SecDumpProto.MatchedRule getDefaultInstanceForType() { internal_static_datadog_cws_dumpsv1_FileInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_datadog_cws_dumpsv1_FileInfo_descriptor, - new java.lang.String[] { "Uid", "User", "Gid", "Group", "Mode", "Ctime", "Mtime", "MountId", "Inode", "InUpperLayer", "Path", "Basename", "Filesystem", "PackageName", "PackageVersion", "PackageSrcversion", }); + new java.lang.String[] { "Uid", "User", "Gid", "Group", "Mode", "Ctime", "Mtime", "MountId", "Inode", "InUpperLayer", "Path", "Basename", "Filesystem", "PackageName", "PackageVersion", "PackageSrcversion", "Hashes", "HashState", }); internal_static_datadog_cws_dumpsv1_Credentials_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_datadog_cws_dumpsv1_Credentials_fieldAccessorTable = new diff --git a/proto/cws/dumpsv1/activity_dump.proto b/proto/cws/dumpsv1/activity_dump.proto index 65b2659f..e227472c 100644 --- a/proto/cws/dumpsv1/activity_dump.proto +++ b/proto/cws/dumpsv1/activity_dump.proto @@ -146,6 +146,20 @@ message FileInfo { string package_name = 14; string package_version = 15; string package_srcversion = 16; + + repeated string hashes = 17; + HashState hash_state = 18; +} + +enum HashState { + NO_HASH = 0; + DONE = 1; + FILE_NOT_FOUND = 2; + PATHNAME_RESOLUTION_ERROR = 3; + FILE_TOO_BIG = 4; + EVENT_TYPE_NOT_CONFIGURED = 5; + HASH_WAS_RATE_LIMITED = 6; + UNKNOWN_HASH_ERROR = 7; } message Credentials {