google-backstory 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +8 -7
- data/lib/backstory/collection_pb.rb +439 -0
- data/lib/backstory/data_access_pb.rb +96 -0
- data/lib/backstory/entity_pb.rb +694 -0
- data/lib/backstory/entity_risk_pb.rb +153 -0
- data/lib/backstory/id_pb.rb +114 -0
- data/lib/backstory/udm_pb.rb +6841 -0
- data/lib/google/backstory/version.rb +4 -2
- metadata +49 -12
- data/LICENSE.md +0 -201
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: backstory/entity_risk.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/protobuf/duration_pb'
|
|
8
|
+
require 'google/protobuf/timestamp_pb'
|
|
9
|
+
require 'google/type/interval_pb'
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
descriptor_data = "\n\x1b\x62\x61\x63kstory/entity_risk.proto\x12\x10google.backstory\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xfe\x04\n\nEntityRisk\x12\x14\n\x0crisk_version\x18\x01 \x01(\t\x12*\n\x0brisk_window\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x36\n\x15\x44\x45PRECATED_risk_score\x18\x03 \x01(\x05\x42\x02\x18\x01R\x13\x44\x45PRECATEDRiskScore\x12\x34\n\nrisk_delta\x18\x04 \x01(\x0b\x32\x1b.google.backstory.RiskDeltaH\x00\x88\x01\x01\x12\x18\n\x10\x64\x65tections_count\x18\x05 \x01(\x05\x12\x38\n\x14\x66irst_detection_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13last_detection_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nrisk_score\x18\x08 \x01(\x02\x12\x1d\n\x15normalized_risk_score\x18\t \x01(\x05\x12\x33\n\x10risk_window_size\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x0eraw_risk_delta\x18\x0b \x01(\x0b\x32\x1b.google.backstory.RiskDeltaH\x01\x88\x01\x01\x12\x33\n\x0flast_reset_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ndetail_uri\x18\r \x01(\t\x12&\n\x1erisk_window_has_new_detections\x18\x0e \x01(\x08\x42\r\n\x0b_risk_deltaB\x11\n\x0f_raw_risk_delta\"\xa1\x01\n\tRiskDelta\x12;\n\x17previous_range_end_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10risk_score_delta\x18\x02 \x01(\x05\x12\x1b\n\x13previous_risk_score\x18\x03 \x01(\x05\x12 \n\x18risk_score_numeric_delta\x18\x04 \x01(\x05\x42\x9e\x01\n\x14\x63om.google.backstoryB\x0f\x45ntityRiskProtoP\x01Z9google.golang.org/genproto/googleapis/backstory;backstory\xaa\x02\x10Google.Backstory\xca\x02\x10Google\\Backstory\xea\x02\x11Google::Backstoryb\x06proto3"
|
|
13
|
+
|
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
|
+
|
|
16
|
+
begin
|
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
|
18
|
+
rescue TypeError
|
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
22
|
+
parsed.clear_dependency
|
|
23
|
+
serialized = parsed.class.encode(parsed)
|
|
24
|
+
file = pool.add_serialized_file(serialized)
|
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
26
|
+
imports = [
|
|
27
|
+
["google.type.Interval", "google/type/interval.proto"],
|
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
29
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
|
30
|
+
]
|
|
31
|
+
imports.each do |type_name, expected_filename|
|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
|
33
|
+
if import_file.name != expected_filename
|
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
|
38
|
+
warn "This will become an error in the next major version."
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
module Google
|
|
42
|
+
module Backstory
|
|
43
|
+
EntityRisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.backstory.EntityRisk").msgclass
|
|
44
|
+
RiskDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.backstory.RiskDelta").msgclass
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
#### Source proto file: backstory/entity_risk.proto ####
|
|
49
|
+
#
|
|
50
|
+
# // Copyright 2026 Google LLC
|
|
51
|
+
# //
|
|
52
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
|
53
|
+
# // you may not use this file except in compliance with the License.
|
|
54
|
+
# // You may obtain a copy of the License at
|
|
55
|
+
# //
|
|
56
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
|
57
|
+
# //
|
|
58
|
+
# // Unless required by applicable law or agreed to in writing, software
|
|
59
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
|
60
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
61
|
+
# // See the License for the specific language governing permissions and
|
|
62
|
+
# // limitations under the License.
|
|
63
|
+
#
|
|
64
|
+
# syntax = "proto3";
|
|
65
|
+
#
|
|
66
|
+
# package google.backstory;
|
|
67
|
+
#
|
|
68
|
+
# import "google/protobuf/duration.proto";
|
|
69
|
+
# import "google/protobuf/timestamp.proto";
|
|
70
|
+
# import "google/type/interval.proto";
|
|
71
|
+
#
|
|
72
|
+
# option csharp_namespace = "Google.Backstory";
|
|
73
|
+
# option go_package = "google.golang.org/genproto/googleapis/backstory;backstory";
|
|
74
|
+
# option java_multiple_files = true;
|
|
75
|
+
# option java_outer_classname = "EntityRiskProto";
|
|
76
|
+
# option java_package = "com.google.backstory";
|
|
77
|
+
# option php_namespace = "Google\\Backstory";
|
|
78
|
+
# option ruby_package = "Google::Backstory";
|
|
79
|
+
#
|
|
80
|
+
# // This is branched of the original entity.proto in
|
|
81
|
+
# // googlex/security/malachite/proto/external/entity.proto.
|
|
82
|
+
# // This is to avoid the circular dependency between udm.proto and
|
|
83
|
+
# // entity.proto.
|
|
84
|
+
#
|
|
85
|
+
# // Stores information related to the risk score of an entity.
|
|
86
|
+
# message EntityRisk {
|
|
87
|
+
# // Version of the risk score calculation algorithm.
|
|
88
|
+
# string risk_version = 1;
|
|
89
|
+
#
|
|
90
|
+
# // Time window used when computing the risk score for an entity, for
|
|
91
|
+
# // example 24 hours or 7 days.
|
|
92
|
+
# google.type.Interval risk_window = 2;
|
|
93
|
+
#
|
|
94
|
+
# // Deprecated risk score.
|
|
95
|
+
# int32 DEPRECATED_risk_score = 3
|
|
96
|
+
# [deprecated = true, json_name = "DEPRECATEDRiskScore"];
|
|
97
|
+
#
|
|
98
|
+
# // Represents the change in risk score for an entity between the end of the
|
|
99
|
+
# // previous time window and the end of the current time window.
|
|
100
|
+
# optional RiskDelta risk_delta = 4;
|
|
101
|
+
#
|
|
102
|
+
# // Number of detections that make up the risk score within the time window.
|
|
103
|
+
# int32 detections_count = 5;
|
|
104
|
+
#
|
|
105
|
+
# // Timestamp of the first detection within the specified time window.
|
|
106
|
+
# // This field is empty when there are no detections.
|
|
107
|
+
# google.protobuf.Timestamp first_detection_time = 6;
|
|
108
|
+
#
|
|
109
|
+
# // Timestamp of the last detection within the specified time window.
|
|
110
|
+
# // This field is empty when there are no detections.
|
|
111
|
+
# google.protobuf.Timestamp last_detection_time = 7;
|
|
112
|
+
#
|
|
113
|
+
# // Raw risk score for the entity.
|
|
114
|
+
# float risk_score = 8;
|
|
115
|
+
#
|
|
116
|
+
# // Normalized risk score for the entity. This value is between 0-1000.
|
|
117
|
+
# int32 normalized_risk_score = 9;
|
|
118
|
+
#
|
|
119
|
+
# // Risk window duration for the entity.
|
|
120
|
+
# google.protobuf.Duration risk_window_size = 10;
|
|
121
|
+
#
|
|
122
|
+
# // Represents the change in raw risk score for an entity between the end of
|
|
123
|
+
# // the previous time window and the end of the current time window.
|
|
124
|
+
# optional RiskDelta raw_risk_delta = 11;
|
|
125
|
+
#
|
|
126
|
+
# // Timestamp for UEBA risk score reset based deduplication. Used specifically
|
|
127
|
+
# // for risk based meta rules.
|
|
128
|
+
# google.protobuf.Timestamp last_reset_time = 12;
|
|
129
|
+
#
|
|
130
|
+
# // Link to the Google Security Operations UI with information about the entity
|
|
131
|
+
# // risk score.
|
|
132
|
+
# // If the SecOps instance has multiple frontend paths configured, this will be
|
|
133
|
+
# // a relative path that can be used to construct the full URL.
|
|
134
|
+
# string detail_uri = 13;
|
|
135
|
+
#
|
|
136
|
+
# // Whether there are new detections for the risk window.
|
|
137
|
+
# bool risk_window_has_new_detections = 14;
|
|
138
|
+
# }
|
|
139
|
+
#
|
|
140
|
+
# // Describes the difference in risk score between two points in time.
|
|
141
|
+
# message RiskDelta {
|
|
142
|
+
# // End time of the previous time window.
|
|
143
|
+
# google.protobuf.Timestamp previous_range_end_time = 1;
|
|
144
|
+
#
|
|
145
|
+
# // Difference in the normalized risk score from the previous recorded value.
|
|
146
|
+
# int32 risk_score_delta = 2;
|
|
147
|
+
#
|
|
148
|
+
# // Risk score from previous risk window
|
|
149
|
+
# int32 previous_risk_score = 3;
|
|
150
|
+
#
|
|
151
|
+
# // Numeric change between current and previous risk score
|
|
152
|
+
# int32 risk_score_numeric_delta = 4;
|
|
153
|
+
# }
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: backstory/id.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\x12\x62\x61\x63kstory/id.proto\x12\x10google.backstory\"\x9e\x02\n\x02Id\x12\x31\n\tnamespace\x18\x01 \x01(\x0e\x32\x1e.google.backstory.Id.Namespace\x12\n\n\x02id\x18\x02 \x01(\x0c\x12\x11\n\tstring_id\x18\x03 \x01(\t\"\xc5\x01\n\tNamespace\x12\x18\n\x14NORMALIZED_TELEMETRY\x10\x00\x12\x11\n\rRAW_TELEMETRY\x10\x01\x12\x13\n\x0fRULE_DETECTIONS\x10\x02\x12\r\n\tUPPERCASE\x10\x03\x12\x18\n\x14MACHINE_INTELLIGENCE\x10\x04\x12\x1b\n\x17SECURITY_COMMAND_CENTER\x10\x05\x12\x0f\n\x0bUNSPECIFIED\x10\x06\x12\x0e\n\nSOAR_ALERT\x10\x07\x12\x0f\n\x0bVIRUS_TOTAL\x10\x08\x42\x8d\x01\n\x14\x63om.google.backstoryP\x01Z9google.golang.org/genproto/googleapis/backstory;backstory\xaa\x02\x10Google.Backstory\xca\x02\x10Google\\Backstory\xea\x02\x11Google::Backstoryb\x06proto3"
|
|
9
|
+
|
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
|
|
12
|
+
begin
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
rescue TypeError
|
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
18
|
+
parsed.clear_dependency
|
|
19
|
+
serialized = parsed.class.encode(parsed)
|
|
20
|
+
file = pool.add_serialized_file(serialized)
|
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
22
|
+
imports = [
|
|
23
|
+
]
|
|
24
|
+
imports.each do |type_name, expected_filename|
|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
|
26
|
+
if import_file.name != expected_filename
|
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
|
31
|
+
warn "This will become an error in the next major version."
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
module Google
|
|
35
|
+
module Backstory
|
|
36
|
+
Id = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.backstory.Id").msgclass
|
|
37
|
+
Id::Namespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.backstory.Id.Namespace").enummodule
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
#### Source proto file: backstory/id.proto ####
|
|
42
|
+
#
|
|
43
|
+
# // Copyright 2026 Google LLC
|
|
44
|
+
# //
|
|
45
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
|
46
|
+
# // you may not use this file except in compliance with the License.
|
|
47
|
+
# // You may obtain a copy of the License at
|
|
48
|
+
# //
|
|
49
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
|
50
|
+
# //
|
|
51
|
+
# // Unless required by applicable law or agreed to in writing, software
|
|
52
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
|
53
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
54
|
+
# // See the License for the specific language governing permissions and
|
|
55
|
+
# // limitations under the License.
|
|
56
|
+
#
|
|
57
|
+
# syntax = "proto3";
|
|
58
|
+
#
|
|
59
|
+
# package google.backstory;
|
|
60
|
+
#
|
|
61
|
+
# option csharp_namespace = "Google.Backstory";
|
|
62
|
+
# option go_package = "google.golang.org/genproto/googleapis/backstory;backstory";
|
|
63
|
+
# option java_multiple_files = true;
|
|
64
|
+
# option java_package = "com.google.backstory";
|
|
65
|
+
# option php_namespace = "Google\\Backstory";
|
|
66
|
+
# option ruby_package = "Google::Backstory";
|
|
67
|
+
#
|
|
68
|
+
# // Identifier to identify a UDM object like a UDM event, Entity, Collection.
|
|
69
|
+
# // The full identifier for persistence is created by setting the 32 most
|
|
70
|
+
# // significant bits as the Id.Namespace enum This is a convenience wrapper to
|
|
71
|
+
# // define the id space enum values and provide an easy interface for RPCs, most
|
|
72
|
+
# // persistence use cases should use a denormalized form.
|
|
73
|
+
# message Id {
|
|
74
|
+
# // Extracted Namespace Component
|
|
75
|
+
# enum Namespace {
|
|
76
|
+
# // Ingested and Normalized telemetry events
|
|
77
|
+
# NORMALIZED_TELEMETRY = 0;
|
|
78
|
+
#
|
|
79
|
+
# // Ingested Raw telemetry
|
|
80
|
+
# RAW_TELEMETRY = 1;
|
|
81
|
+
#
|
|
82
|
+
# // Chronicle Rules engine
|
|
83
|
+
# RULE_DETECTIONS = 2;
|
|
84
|
+
#
|
|
85
|
+
# // Uppercase
|
|
86
|
+
# UPPERCASE = 3;
|
|
87
|
+
#
|
|
88
|
+
# // DSML - Machine Intelligence
|
|
89
|
+
# MACHINE_INTELLIGENCE = 4;
|
|
90
|
+
#
|
|
91
|
+
# // A normalized telemetry event from Google Security Command Center.
|
|
92
|
+
# SECURITY_COMMAND_CENTER = 5;
|
|
93
|
+
#
|
|
94
|
+
# // Unspecified Namespace
|
|
95
|
+
# UNSPECIFIED = 6;
|
|
96
|
+
#
|
|
97
|
+
# // An alert coming from other SIEMs via Chronicle SOAR.
|
|
98
|
+
# SOAR_ALERT = 7;
|
|
99
|
+
#
|
|
100
|
+
# // VirusTotal.
|
|
101
|
+
# VIRUS_TOTAL = 8;
|
|
102
|
+
# }
|
|
103
|
+
#
|
|
104
|
+
# // Namespace the id belongs to.
|
|
105
|
+
# Namespace namespace = 1;
|
|
106
|
+
#
|
|
107
|
+
# // Full raw ID.
|
|
108
|
+
# bytes id = 2;
|
|
109
|
+
#
|
|
110
|
+
# // Some ids are stored as strings that are not able to be translated to bytes,
|
|
111
|
+
# // so store these separately.
|
|
112
|
+
# // Ex. detection id of the form de_aaaaaaaa-aaaa...
|
|
113
|
+
# string string_id = 3;
|
|
114
|
+
# }
|