@cyvest/cyvest-js 3.1.0 → 3.2.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.
- package/dist/index.d.mts +59 -94
- package/dist/index.d.ts +59 -94
- package/dist/index.js +29 -4
- package/dist/index.mjs +29 -4
- package/package.json +1 -1
- package/src/types.generated.ts +58 -93
package/dist/index.d.mts
CHANGED
|
@@ -1,84 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Investigation start time (UTC).
|
|
3
|
-
*/
|
|
4
|
-
type StartedAt = string;
|
|
5
|
-
/**
|
|
6
|
-
* Global investigation score.
|
|
7
|
-
*/
|
|
8
|
-
type Score = number;
|
|
9
1
|
/**
|
|
10
2
|
* Security level classification for checks, observables, and threat intelligence.
|
|
11
3
|
*
|
|
12
4
|
* Levels are ordered from lowest (NONE) to highest (MALICIOUS) severity.
|
|
13
5
|
*/
|
|
14
6
|
type Level = "NONE" | "TRUSTED" | "INFO" | "SAFE" | "NOTABLE" | "SUSPICIOUS" | "MALICIOUS";
|
|
15
|
-
/**
|
|
16
|
-
* Whether the investigation is whitelisted.
|
|
17
|
-
*/
|
|
18
|
-
type Whitelisted = boolean;
|
|
19
|
-
type Identifier = string;
|
|
20
|
-
type Name = string;
|
|
21
7
|
type Justification = string | null;
|
|
22
8
|
/**
|
|
23
9
|
* List of whitelist entries applied to this investigation.
|
|
24
10
|
*/
|
|
25
11
|
type Whitelists = InvestigationWhitelist[];
|
|
26
|
-
type Type = string;
|
|
27
|
-
type Value = string;
|
|
28
|
-
type Internal = boolean;
|
|
29
|
-
type Whitelisted1 = boolean;
|
|
30
|
-
type Comment = string;
|
|
31
|
-
type Score1 = number;
|
|
32
12
|
type ThreatIntels = string[];
|
|
33
|
-
type TargetKey = string;
|
|
34
|
-
type RelationshipType = string;
|
|
35
13
|
/**
|
|
36
14
|
* Direction of a relationship between observables.
|
|
37
15
|
*/
|
|
38
16
|
type RelationshipDirection = "outbound" | "inbound" | "bidirectional";
|
|
39
17
|
type Relationships = Relationship[];
|
|
40
|
-
type Key = string;
|
|
41
18
|
/**
|
|
42
19
|
* Checks that generated this observable.
|
|
43
20
|
*/
|
|
44
21
|
type GeneratedByChecks = string[];
|
|
45
|
-
type CheckId = string;
|
|
46
|
-
type Scope = string;
|
|
47
|
-
type Description = string;
|
|
48
|
-
type Comment1 = string;
|
|
49
|
-
type Score2 = number;
|
|
50
22
|
type Observables1 = string[];
|
|
51
23
|
/**
|
|
52
24
|
* Controls how a check reacts to linked observables.
|
|
53
25
|
*/
|
|
54
26
|
type CheckScorePolicy = "auto" | "manual";
|
|
55
|
-
type Key1 = string;
|
|
56
|
-
type Source = string;
|
|
57
|
-
type ObservableKey = string;
|
|
58
|
-
type Comment2 = string;
|
|
59
|
-
type Score3 = number;
|
|
60
27
|
type Taxonomies = {
|
|
61
28
|
[k: string]: unknown;
|
|
62
29
|
}[];
|
|
63
|
-
type Key2 = string;
|
|
64
|
-
type Name1 = string;
|
|
65
|
-
type Context = string;
|
|
66
|
-
type Key3 = string;
|
|
67
|
-
type Path = string;
|
|
68
|
-
type Description1 = string;
|
|
69
30
|
type Checks1 = string[];
|
|
70
|
-
type Key4 = string;
|
|
71
|
-
type AggregatedScore = number;
|
|
72
|
-
type TotalObservables = number;
|
|
73
|
-
type InternalObservables = number;
|
|
74
|
-
type ExternalObservables = number;
|
|
75
|
-
type WhitelistedObservables = number;
|
|
76
|
-
type TotalChecks = number;
|
|
77
|
-
type AppliedChecks = number;
|
|
78
|
-
type TotalThreatIntel = number;
|
|
79
|
-
type TotalContainers = number;
|
|
80
|
-
type Checks2 = number;
|
|
81
|
-
type Applied = number;
|
|
82
31
|
/**
|
|
83
32
|
* Root observable type used during data extraction.
|
|
84
33
|
*/
|
|
@@ -98,10 +47,19 @@ type ScoreMode = "max" | "sum";
|
|
|
98
47
|
* schemas matching the actual model_dump() output.
|
|
99
48
|
*/
|
|
100
49
|
interface CyvestInvestigation {
|
|
101
|
-
|
|
102
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Investigation start time (UTC).
|
|
52
|
+
*/
|
|
53
|
+
started_at: string;
|
|
54
|
+
/**
|
|
55
|
+
* Global investigation score.
|
|
56
|
+
*/
|
|
57
|
+
score: number;
|
|
103
58
|
level: Level;
|
|
104
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Whether the investigation is whitelisted.
|
|
61
|
+
*/
|
|
62
|
+
whitelisted: boolean;
|
|
105
63
|
whitelists: Whitelists;
|
|
106
64
|
observables: Observables;
|
|
107
65
|
checks: Checks;
|
|
@@ -112,13 +70,17 @@ interface CyvestInvestigation {
|
|
|
112
70
|
stats: StatisticsSchema;
|
|
113
71
|
stats_checks: StatsChecksSchema;
|
|
114
72
|
data_extraction: DataExtractionSchema;
|
|
73
|
+
/**
|
|
74
|
+
* Global investigation score formatted as fixed-point x.xx.
|
|
75
|
+
*/
|
|
76
|
+
score_display: string;
|
|
115
77
|
}
|
|
116
78
|
/**
|
|
117
79
|
* Represents a whitelist entry on an investigation.
|
|
118
80
|
*/
|
|
119
81
|
interface InvestigationWhitelist {
|
|
120
|
-
identifier:
|
|
121
|
-
name:
|
|
82
|
+
identifier: string;
|
|
83
|
+
name: string;
|
|
122
84
|
justification?: Justification;
|
|
123
85
|
[k: string]: unknown;
|
|
124
86
|
}
|
|
@@ -135,18 +97,19 @@ interface Observables {
|
|
|
135
97
|
* through relationships.
|
|
136
98
|
*/
|
|
137
99
|
interface Observable {
|
|
138
|
-
type:
|
|
139
|
-
value:
|
|
140
|
-
internal:
|
|
141
|
-
whitelisted:
|
|
142
|
-
comment:
|
|
100
|
+
type: string;
|
|
101
|
+
value: string;
|
|
102
|
+
internal: boolean;
|
|
103
|
+
whitelisted: boolean;
|
|
104
|
+
comment: string;
|
|
143
105
|
extra: Extra;
|
|
144
|
-
score:
|
|
106
|
+
score: number;
|
|
145
107
|
level: Level;
|
|
146
108
|
threat_intels: ThreatIntels;
|
|
147
109
|
relationships: Relationships;
|
|
148
|
-
key:
|
|
110
|
+
key: string;
|
|
149
111
|
generated_by_checks: GeneratedByChecks;
|
|
112
|
+
score_display: string;
|
|
150
113
|
[k: string]: unknown;
|
|
151
114
|
}
|
|
152
115
|
interface Extra {
|
|
@@ -156,8 +119,8 @@ interface Extra {
|
|
|
156
119
|
* Represents a relationship between observables.
|
|
157
120
|
*/
|
|
158
121
|
interface Relationship {
|
|
159
|
-
target_key:
|
|
160
|
-
relationship_type:
|
|
122
|
+
target_key: string;
|
|
123
|
+
relationship_type: string;
|
|
161
124
|
direction: RelationshipDirection;
|
|
162
125
|
[k: string]: unknown;
|
|
163
126
|
}
|
|
@@ -174,16 +137,17 @@ interface Checks {
|
|
|
174
137
|
* and contributes to the overall investigation score.
|
|
175
138
|
*/
|
|
176
139
|
interface Check {
|
|
177
|
-
check_id:
|
|
178
|
-
scope:
|
|
179
|
-
description:
|
|
180
|
-
comment:
|
|
140
|
+
check_id: string;
|
|
141
|
+
scope: string;
|
|
142
|
+
description: string;
|
|
143
|
+
comment: string;
|
|
181
144
|
extra: Extra1;
|
|
182
|
-
score:
|
|
145
|
+
score: number;
|
|
183
146
|
level: Level;
|
|
184
147
|
observables: Observables1;
|
|
185
148
|
score_policy?: CheckScorePolicy;
|
|
186
|
-
key:
|
|
149
|
+
key: string;
|
|
150
|
+
score_display: string;
|
|
187
151
|
[k: string]: unknown;
|
|
188
152
|
}
|
|
189
153
|
interface Extra1 {
|
|
@@ -208,14 +172,15 @@ interface ThreatIntels1 {
|
|
|
208
172
|
* like VirusTotal, URLScan.io, etc.
|
|
209
173
|
*/
|
|
210
174
|
interface ThreatIntel {
|
|
211
|
-
source:
|
|
212
|
-
observable_key:
|
|
213
|
-
comment:
|
|
175
|
+
source: string;
|
|
176
|
+
observable_key: string;
|
|
177
|
+
comment: string;
|
|
214
178
|
extra: Extra2;
|
|
215
|
-
score:
|
|
179
|
+
score: number;
|
|
216
180
|
level: Level;
|
|
217
181
|
taxonomies: Taxonomies;
|
|
218
|
-
key:
|
|
182
|
+
key: string;
|
|
183
|
+
score_display: string;
|
|
219
184
|
[k: string]: unknown;
|
|
220
185
|
}
|
|
221
186
|
interface Extra2 {
|
|
@@ -234,10 +199,10 @@ interface Enrichments {
|
|
|
234
199
|
* context but doesn't directly contribute to scoring.
|
|
235
200
|
*/
|
|
236
201
|
interface Enrichment {
|
|
237
|
-
name:
|
|
202
|
+
name: string;
|
|
238
203
|
data: Data;
|
|
239
|
-
context:
|
|
240
|
-
key:
|
|
204
|
+
context: string;
|
|
205
|
+
key: string;
|
|
241
206
|
[k: string]: unknown;
|
|
242
207
|
}
|
|
243
208
|
interface Data {
|
|
@@ -256,12 +221,12 @@ interface Containers {
|
|
|
256
221
|
* with aggregated scores and levels.
|
|
257
222
|
*/
|
|
258
223
|
interface Container {
|
|
259
|
-
path:
|
|
260
|
-
description?:
|
|
224
|
+
path: string;
|
|
225
|
+
description?: string;
|
|
261
226
|
checks: Checks1;
|
|
262
227
|
sub_containers: SubContainers;
|
|
263
|
-
key:
|
|
264
|
-
aggregated_score:
|
|
228
|
+
key: string;
|
|
229
|
+
aggregated_score: number;
|
|
265
230
|
aggregated_level: Level;
|
|
266
231
|
}
|
|
267
232
|
interface SubContainers {
|
|
@@ -273,21 +238,21 @@ interface SubContainers {
|
|
|
273
238
|
* Mirrors the output of `InvestigationStats.get_summary()`.
|
|
274
239
|
*/
|
|
275
240
|
interface StatisticsSchema {
|
|
276
|
-
total_observables:
|
|
277
|
-
internal_observables:
|
|
278
|
-
external_observables:
|
|
279
|
-
whitelisted_observables:
|
|
241
|
+
total_observables: number;
|
|
242
|
+
internal_observables: number;
|
|
243
|
+
external_observables: number;
|
|
244
|
+
whitelisted_observables: number;
|
|
280
245
|
observables_by_type?: ObservablesByType;
|
|
281
246
|
observables_by_level?: ObservablesByLevel;
|
|
282
247
|
observables_by_type_and_level?: ObservablesByTypeAndLevel;
|
|
283
|
-
total_checks:
|
|
284
|
-
applied_checks:
|
|
248
|
+
total_checks: number;
|
|
249
|
+
applied_checks: number;
|
|
285
250
|
checks_by_scope?: ChecksByScope;
|
|
286
251
|
checks_by_level?: ChecksByLevel1;
|
|
287
|
-
total_threat_intel:
|
|
252
|
+
total_threat_intel: number;
|
|
288
253
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
289
254
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
290
|
-
total_containers:
|
|
255
|
+
total_containers: number;
|
|
291
256
|
}
|
|
292
257
|
interface ObservablesByType {
|
|
293
258
|
[k: string]: number;
|
|
@@ -316,8 +281,8 @@ interface ThreatIntelByLevel {
|
|
|
316
281
|
* Schema for check statistics summary.
|
|
317
282
|
*/
|
|
318
283
|
interface StatsChecksSchema {
|
|
319
|
-
checks:
|
|
320
|
-
applied:
|
|
284
|
+
checks: number;
|
|
285
|
+
applied: number;
|
|
321
286
|
}
|
|
322
287
|
/**
|
|
323
288
|
* Schema for data extraction metadata.
|
|
@@ -1369,4 +1334,4 @@ declare function getRelationshipsForObservable(inv: CyvestInvestigation, observa
|
|
|
1369
1334
|
}>;
|
|
1370
1335
|
};
|
|
1371
1336
|
|
|
1372
|
-
export { type
|
|
1337
|
+
export { type Check, type CheckScorePolicy, type Checks, type Checks1, type ChecksByLevel, type ChecksByLevel1, type ChecksByScope, type Container, type Containers, type CyvestInvestigation, type Data, type DataExtractionSchema, type Enrichment, type Enrichments, type Extra, type Extra1, type Extra2, type GeneratedByChecks, type GraphEdge, type GraphNode, type InvestigationCounts, type InvestigationGraph, type InvestigationWhitelist, type Justification, type KeyType, LEVEL_COLORS, LEVEL_ORDER, LEVEL_VALUES, type Level, type Observable, type Observables, type Observables1, type ObservablesByLevel, type ObservablesByType, type ObservablesByTypeAndLevel, type Relationship, type RelationshipDirection, type Relationships, type RootType, type ScoreMode, type StatisticsSchema, type StatsChecksSchema, type SubContainers, type Taxonomies, type ThreatIntel, type ThreatIntelByLevel, type ThreatIntelBySource, type ThreatIntels, type ThreatIntels1, type Whitelists, areConnected, compareLevels, countRelationshipsByType, findChecksAtLeast, findChecksByCheckId, findChecksByLevel, findChecksByScope, findContainersAtLeast, findContainersByLevel, findExternalObservables, findInternalObservables, findLeafObservables, findManuallyScored, findObservablesAtLeast, findObservablesByLevel, findObservablesByType, findObservablesByValue, findObservablesContaining, findObservablesMatching, findObservablesWithThreatIntel, findOrphanObservables, findPath, findRootObservables, findThreatIntelAtLeast, findThreatIntelByLevel, findThreatIntelBySource, findWhitelistedObservables, generateCheckKey, generateContainerKey, generateEnrichmentKey, generateObservableKey, generateThreatIntelKey, getAllChecks, getAllContainers, getAllEnrichments, getAllObservableTypes, getAllObservables, getAllRelationshipTypes, getAllScopes, getAllThreatIntelSources, getAllThreatIntels, getCheck, getCheckByIdScope, getChecksForContainer, getChecksForObservable, getColorForLevel, getColorForScore, getContainer, getContainerByPath, getCounts, getDataExtraction, getEnrichment, getEnrichmentByName, getEntityLevel, getHighestScoringChecks, getHighestScoringObservables, getLevelFromScore, getMaliciousChecks, getMaliciousObservables, getObservable, getObservableByTypeValue, getObservableChildren, getObservableGraph, getObservableParents, getObservablesForCheck, getReachableObservables, getRelatedObservables, getRelatedObservablesByDirection, getRelatedObservablesByType, getRelationshipsForObservable, getStats, getStatsChecks, getSuspiciousChecks, getSuspiciousObservables, getThreatIntel, getThreatIntelBySourceObservable, getThreatIntelsForObservable, getWhitelists, hasLevel, isCyvest, isLevelAtLeast, isLevelHigherThan, isLevelLowerThan, isValidLevel, maxLevel, minLevel, normalizeLevel, parseCheckKey, parseCyvest, parseKeyType, parseObservableKey, parseThreatIntelKey, sortChecksByLevel, sortChecksByScore, sortObservablesByLevel, sortObservablesByScore, validateKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,84 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Investigation start time (UTC).
|
|
3
|
-
*/
|
|
4
|
-
type StartedAt = string;
|
|
5
|
-
/**
|
|
6
|
-
* Global investigation score.
|
|
7
|
-
*/
|
|
8
|
-
type Score = number;
|
|
9
1
|
/**
|
|
10
2
|
* Security level classification for checks, observables, and threat intelligence.
|
|
11
3
|
*
|
|
12
4
|
* Levels are ordered from lowest (NONE) to highest (MALICIOUS) severity.
|
|
13
5
|
*/
|
|
14
6
|
type Level = "NONE" | "TRUSTED" | "INFO" | "SAFE" | "NOTABLE" | "SUSPICIOUS" | "MALICIOUS";
|
|
15
|
-
/**
|
|
16
|
-
* Whether the investigation is whitelisted.
|
|
17
|
-
*/
|
|
18
|
-
type Whitelisted = boolean;
|
|
19
|
-
type Identifier = string;
|
|
20
|
-
type Name = string;
|
|
21
7
|
type Justification = string | null;
|
|
22
8
|
/**
|
|
23
9
|
* List of whitelist entries applied to this investigation.
|
|
24
10
|
*/
|
|
25
11
|
type Whitelists = InvestigationWhitelist[];
|
|
26
|
-
type Type = string;
|
|
27
|
-
type Value = string;
|
|
28
|
-
type Internal = boolean;
|
|
29
|
-
type Whitelisted1 = boolean;
|
|
30
|
-
type Comment = string;
|
|
31
|
-
type Score1 = number;
|
|
32
12
|
type ThreatIntels = string[];
|
|
33
|
-
type TargetKey = string;
|
|
34
|
-
type RelationshipType = string;
|
|
35
13
|
/**
|
|
36
14
|
* Direction of a relationship between observables.
|
|
37
15
|
*/
|
|
38
16
|
type RelationshipDirection = "outbound" | "inbound" | "bidirectional";
|
|
39
17
|
type Relationships = Relationship[];
|
|
40
|
-
type Key = string;
|
|
41
18
|
/**
|
|
42
19
|
* Checks that generated this observable.
|
|
43
20
|
*/
|
|
44
21
|
type GeneratedByChecks = string[];
|
|
45
|
-
type CheckId = string;
|
|
46
|
-
type Scope = string;
|
|
47
|
-
type Description = string;
|
|
48
|
-
type Comment1 = string;
|
|
49
|
-
type Score2 = number;
|
|
50
22
|
type Observables1 = string[];
|
|
51
23
|
/**
|
|
52
24
|
* Controls how a check reacts to linked observables.
|
|
53
25
|
*/
|
|
54
26
|
type CheckScorePolicy = "auto" | "manual";
|
|
55
|
-
type Key1 = string;
|
|
56
|
-
type Source = string;
|
|
57
|
-
type ObservableKey = string;
|
|
58
|
-
type Comment2 = string;
|
|
59
|
-
type Score3 = number;
|
|
60
27
|
type Taxonomies = {
|
|
61
28
|
[k: string]: unknown;
|
|
62
29
|
}[];
|
|
63
|
-
type Key2 = string;
|
|
64
|
-
type Name1 = string;
|
|
65
|
-
type Context = string;
|
|
66
|
-
type Key3 = string;
|
|
67
|
-
type Path = string;
|
|
68
|
-
type Description1 = string;
|
|
69
30
|
type Checks1 = string[];
|
|
70
|
-
type Key4 = string;
|
|
71
|
-
type AggregatedScore = number;
|
|
72
|
-
type TotalObservables = number;
|
|
73
|
-
type InternalObservables = number;
|
|
74
|
-
type ExternalObservables = number;
|
|
75
|
-
type WhitelistedObservables = number;
|
|
76
|
-
type TotalChecks = number;
|
|
77
|
-
type AppliedChecks = number;
|
|
78
|
-
type TotalThreatIntel = number;
|
|
79
|
-
type TotalContainers = number;
|
|
80
|
-
type Checks2 = number;
|
|
81
|
-
type Applied = number;
|
|
82
31
|
/**
|
|
83
32
|
* Root observable type used during data extraction.
|
|
84
33
|
*/
|
|
@@ -98,10 +47,19 @@ type ScoreMode = "max" | "sum";
|
|
|
98
47
|
* schemas matching the actual model_dump() output.
|
|
99
48
|
*/
|
|
100
49
|
interface CyvestInvestigation {
|
|
101
|
-
|
|
102
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Investigation start time (UTC).
|
|
52
|
+
*/
|
|
53
|
+
started_at: string;
|
|
54
|
+
/**
|
|
55
|
+
* Global investigation score.
|
|
56
|
+
*/
|
|
57
|
+
score: number;
|
|
103
58
|
level: Level;
|
|
104
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Whether the investigation is whitelisted.
|
|
61
|
+
*/
|
|
62
|
+
whitelisted: boolean;
|
|
105
63
|
whitelists: Whitelists;
|
|
106
64
|
observables: Observables;
|
|
107
65
|
checks: Checks;
|
|
@@ -112,13 +70,17 @@ interface CyvestInvestigation {
|
|
|
112
70
|
stats: StatisticsSchema;
|
|
113
71
|
stats_checks: StatsChecksSchema;
|
|
114
72
|
data_extraction: DataExtractionSchema;
|
|
73
|
+
/**
|
|
74
|
+
* Global investigation score formatted as fixed-point x.xx.
|
|
75
|
+
*/
|
|
76
|
+
score_display: string;
|
|
115
77
|
}
|
|
116
78
|
/**
|
|
117
79
|
* Represents a whitelist entry on an investigation.
|
|
118
80
|
*/
|
|
119
81
|
interface InvestigationWhitelist {
|
|
120
|
-
identifier:
|
|
121
|
-
name:
|
|
82
|
+
identifier: string;
|
|
83
|
+
name: string;
|
|
122
84
|
justification?: Justification;
|
|
123
85
|
[k: string]: unknown;
|
|
124
86
|
}
|
|
@@ -135,18 +97,19 @@ interface Observables {
|
|
|
135
97
|
* through relationships.
|
|
136
98
|
*/
|
|
137
99
|
interface Observable {
|
|
138
|
-
type:
|
|
139
|
-
value:
|
|
140
|
-
internal:
|
|
141
|
-
whitelisted:
|
|
142
|
-
comment:
|
|
100
|
+
type: string;
|
|
101
|
+
value: string;
|
|
102
|
+
internal: boolean;
|
|
103
|
+
whitelisted: boolean;
|
|
104
|
+
comment: string;
|
|
143
105
|
extra: Extra;
|
|
144
|
-
score:
|
|
106
|
+
score: number;
|
|
145
107
|
level: Level;
|
|
146
108
|
threat_intels: ThreatIntels;
|
|
147
109
|
relationships: Relationships;
|
|
148
|
-
key:
|
|
110
|
+
key: string;
|
|
149
111
|
generated_by_checks: GeneratedByChecks;
|
|
112
|
+
score_display: string;
|
|
150
113
|
[k: string]: unknown;
|
|
151
114
|
}
|
|
152
115
|
interface Extra {
|
|
@@ -156,8 +119,8 @@ interface Extra {
|
|
|
156
119
|
* Represents a relationship between observables.
|
|
157
120
|
*/
|
|
158
121
|
interface Relationship {
|
|
159
|
-
target_key:
|
|
160
|
-
relationship_type:
|
|
122
|
+
target_key: string;
|
|
123
|
+
relationship_type: string;
|
|
161
124
|
direction: RelationshipDirection;
|
|
162
125
|
[k: string]: unknown;
|
|
163
126
|
}
|
|
@@ -174,16 +137,17 @@ interface Checks {
|
|
|
174
137
|
* and contributes to the overall investigation score.
|
|
175
138
|
*/
|
|
176
139
|
interface Check {
|
|
177
|
-
check_id:
|
|
178
|
-
scope:
|
|
179
|
-
description:
|
|
180
|
-
comment:
|
|
140
|
+
check_id: string;
|
|
141
|
+
scope: string;
|
|
142
|
+
description: string;
|
|
143
|
+
comment: string;
|
|
181
144
|
extra: Extra1;
|
|
182
|
-
score:
|
|
145
|
+
score: number;
|
|
183
146
|
level: Level;
|
|
184
147
|
observables: Observables1;
|
|
185
148
|
score_policy?: CheckScorePolicy;
|
|
186
|
-
key:
|
|
149
|
+
key: string;
|
|
150
|
+
score_display: string;
|
|
187
151
|
[k: string]: unknown;
|
|
188
152
|
}
|
|
189
153
|
interface Extra1 {
|
|
@@ -208,14 +172,15 @@ interface ThreatIntels1 {
|
|
|
208
172
|
* like VirusTotal, URLScan.io, etc.
|
|
209
173
|
*/
|
|
210
174
|
interface ThreatIntel {
|
|
211
|
-
source:
|
|
212
|
-
observable_key:
|
|
213
|
-
comment:
|
|
175
|
+
source: string;
|
|
176
|
+
observable_key: string;
|
|
177
|
+
comment: string;
|
|
214
178
|
extra: Extra2;
|
|
215
|
-
score:
|
|
179
|
+
score: number;
|
|
216
180
|
level: Level;
|
|
217
181
|
taxonomies: Taxonomies;
|
|
218
|
-
key:
|
|
182
|
+
key: string;
|
|
183
|
+
score_display: string;
|
|
219
184
|
[k: string]: unknown;
|
|
220
185
|
}
|
|
221
186
|
interface Extra2 {
|
|
@@ -234,10 +199,10 @@ interface Enrichments {
|
|
|
234
199
|
* context but doesn't directly contribute to scoring.
|
|
235
200
|
*/
|
|
236
201
|
interface Enrichment {
|
|
237
|
-
name:
|
|
202
|
+
name: string;
|
|
238
203
|
data: Data;
|
|
239
|
-
context:
|
|
240
|
-
key:
|
|
204
|
+
context: string;
|
|
205
|
+
key: string;
|
|
241
206
|
[k: string]: unknown;
|
|
242
207
|
}
|
|
243
208
|
interface Data {
|
|
@@ -256,12 +221,12 @@ interface Containers {
|
|
|
256
221
|
* with aggregated scores and levels.
|
|
257
222
|
*/
|
|
258
223
|
interface Container {
|
|
259
|
-
path:
|
|
260
|
-
description?:
|
|
224
|
+
path: string;
|
|
225
|
+
description?: string;
|
|
261
226
|
checks: Checks1;
|
|
262
227
|
sub_containers: SubContainers;
|
|
263
|
-
key:
|
|
264
|
-
aggregated_score:
|
|
228
|
+
key: string;
|
|
229
|
+
aggregated_score: number;
|
|
265
230
|
aggregated_level: Level;
|
|
266
231
|
}
|
|
267
232
|
interface SubContainers {
|
|
@@ -273,21 +238,21 @@ interface SubContainers {
|
|
|
273
238
|
* Mirrors the output of `InvestigationStats.get_summary()`.
|
|
274
239
|
*/
|
|
275
240
|
interface StatisticsSchema {
|
|
276
|
-
total_observables:
|
|
277
|
-
internal_observables:
|
|
278
|
-
external_observables:
|
|
279
|
-
whitelisted_observables:
|
|
241
|
+
total_observables: number;
|
|
242
|
+
internal_observables: number;
|
|
243
|
+
external_observables: number;
|
|
244
|
+
whitelisted_observables: number;
|
|
280
245
|
observables_by_type?: ObservablesByType;
|
|
281
246
|
observables_by_level?: ObservablesByLevel;
|
|
282
247
|
observables_by_type_and_level?: ObservablesByTypeAndLevel;
|
|
283
|
-
total_checks:
|
|
284
|
-
applied_checks:
|
|
248
|
+
total_checks: number;
|
|
249
|
+
applied_checks: number;
|
|
285
250
|
checks_by_scope?: ChecksByScope;
|
|
286
251
|
checks_by_level?: ChecksByLevel1;
|
|
287
|
-
total_threat_intel:
|
|
252
|
+
total_threat_intel: number;
|
|
288
253
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
289
254
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
290
|
-
total_containers:
|
|
255
|
+
total_containers: number;
|
|
291
256
|
}
|
|
292
257
|
interface ObservablesByType {
|
|
293
258
|
[k: string]: number;
|
|
@@ -316,8 +281,8 @@ interface ThreatIntelByLevel {
|
|
|
316
281
|
* Schema for check statistics summary.
|
|
317
282
|
*/
|
|
318
283
|
interface StatsChecksSchema {
|
|
319
|
-
checks:
|
|
320
|
-
applied:
|
|
284
|
+
checks: number;
|
|
285
|
+
applied: number;
|
|
321
286
|
}
|
|
322
287
|
/**
|
|
323
288
|
* Schema for data extraction metadata.
|
|
@@ -1369,4 +1334,4 @@ declare function getRelationshipsForObservable(inv: CyvestInvestigation, observa
|
|
|
1369
1334
|
}>;
|
|
1370
1335
|
};
|
|
1371
1336
|
|
|
1372
|
-
export { type
|
|
1337
|
+
export { type Check, type CheckScorePolicy, type Checks, type Checks1, type ChecksByLevel, type ChecksByLevel1, type ChecksByScope, type Container, type Containers, type CyvestInvestigation, type Data, type DataExtractionSchema, type Enrichment, type Enrichments, type Extra, type Extra1, type Extra2, type GeneratedByChecks, type GraphEdge, type GraphNode, type InvestigationCounts, type InvestigationGraph, type InvestigationWhitelist, type Justification, type KeyType, LEVEL_COLORS, LEVEL_ORDER, LEVEL_VALUES, type Level, type Observable, type Observables, type Observables1, type ObservablesByLevel, type ObservablesByType, type ObservablesByTypeAndLevel, type Relationship, type RelationshipDirection, type Relationships, type RootType, type ScoreMode, type StatisticsSchema, type StatsChecksSchema, type SubContainers, type Taxonomies, type ThreatIntel, type ThreatIntelByLevel, type ThreatIntelBySource, type ThreatIntels, type ThreatIntels1, type Whitelists, areConnected, compareLevels, countRelationshipsByType, findChecksAtLeast, findChecksByCheckId, findChecksByLevel, findChecksByScope, findContainersAtLeast, findContainersByLevel, findExternalObservables, findInternalObservables, findLeafObservables, findManuallyScored, findObservablesAtLeast, findObservablesByLevel, findObservablesByType, findObservablesByValue, findObservablesContaining, findObservablesMatching, findObservablesWithThreatIntel, findOrphanObservables, findPath, findRootObservables, findThreatIntelAtLeast, findThreatIntelByLevel, findThreatIntelBySource, findWhitelistedObservables, generateCheckKey, generateContainerKey, generateEnrichmentKey, generateObservableKey, generateThreatIntelKey, getAllChecks, getAllContainers, getAllEnrichments, getAllObservableTypes, getAllObservables, getAllRelationshipTypes, getAllScopes, getAllThreatIntelSources, getAllThreatIntels, getCheck, getCheckByIdScope, getChecksForContainer, getChecksForObservable, getColorForLevel, getColorForScore, getContainer, getContainerByPath, getCounts, getDataExtraction, getEnrichment, getEnrichmentByName, getEntityLevel, getHighestScoringChecks, getHighestScoringObservables, getLevelFromScore, getMaliciousChecks, getMaliciousObservables, getObservable, getObservableByTypeValue, getObservableChildren, getObservableGraph, getObservableParents, getObservablesForCheck, getReachableObservables, getRelatedObservables, getRelatedObservablesByDirection, getRelatedObservablesByType, getRelationshipsForObservable, getStats, getStatsChecks, getSuspiciousChecks, getSuspiciousObservables, getThreatIntel, getThreatIntelBySourceObservable, getThreatIntelsForObservable, getWhitelists, hasLevel, isCyvest, isLevelAtLeast, isLevelHigherThan, isLevelLowerThan, isValidLevel, maxLevel, minLevel, normalizeLevel, parseCheckKey, parseCyvest, parseKeyType, parseObservableKey, parseThreatIntelKey, sortChecksByLevel, sortChecksByScore, sortObservablesByLevel, sortObservablesByScore, validateKey };
|
package/dist/index.js
CHANGED
|
@@ -185,6 +185,11 @@ var cyvest_schema_default = {
|
|
|
185
185
|
key: {
|
|
186
186
|
title: "Key",
|
|
187
187
|
type: "string"
|
|
188
|
+
},
|
|
189
|
+
score_display: {
|
|
190
|
+
readOnly: true,
|
|
191
|
+
title: "Score Display",
|
|
192
|
+
type: "string"
|
|
188
193
|
}
|
|
189
194
|
},
|
|
190
195
|
required: [
|
|
@@ -196,7 +201,8 @@ var cyvest_schema_default = {
|
|
|
196
201
|
"score",
|
|
197
202
|
"level",
|
|
198
203
|
"observables",
|
|
199
|
-
"key"
|
|
204
|
+
"key",
|
|
205
|
+
"score_display"
|
|
200
206
|
],
|
|
201
207
|
title: "Check",
|
|
202
208
|
type: "object"
|
|
@@ -427,6 +433,11 @@ var cyvest_schema_default = {
|
|
|
427
433
|
readOnly: true,
|
|
428
434
|
title: "Generated By Checks",
|
|
429
435
|
type: "array"
|
|
436
|
+
},
|
|
437
|
+
score_display: {
|
|
438
|
+
readOnly: true,
|
|
439
|
+
title: "Score Display",
|
|
440
|
+
type: "string"
|
|
430
441
|
}
|
|
431
442
|
},
|
|
432
443
|
required: [
|
|
@@ -441,7 +452,8 @@ var cyvest_schema_default = {
|
|
|
441
452
|
"threat_intels",
|
|
442
453
|
"relationships",
|
|
443
454
|
"key",
|
|
444
|
-
"generated_by_checks"
|
|
455
|
+
"generated_by_checks",
|
|
456
|
+
"score_display"
|
|
445
457
|
],
|
|
446
458
|
title: "Observable",
|
|
447
459
|
type: "object"
|
|
@@ -665,6 +677,11 @@ var cyvest_schema_default = {
|
|
|
665
677
|
key: {
|
|
666
678
|
title: "Key",
|
|
667
679
|
type: "string"
|
|
680
|
+
},
|
|
681
|
+
score_display: {
|
|
682
|
+
readOnly: true,
|
|
683
|
+
title: "Score Display",
|
|
684
|
+
type: "string"
|
|
668
685
|
}
|
|
669
686
|
},
|
|
670
687
|
required: [
|
|
@@ -675,7 +692,8 @@ var cyvest_schema_default = {
|
|
|
675
692
|
"score",
|
|
676
693
|
"level",
|
|
677
694
|
"taxonomies",
|
|
678
|
-
"key"
|
|
695
|
+
"key",
|
|
696
|
+
"score_display"
|
|
679
697
|
],
|
|
680
698
|
title: "ThreatIntel",
|
|
681
699
|
type: "object"
|
|
@@ -779,6 +797,12 @@ var cyvest_schema_default = {
|
|
|
779
797
|
data_extraction: {
|
|
780
798
|
$ref: "#/$defs/DataExtractionSchema",
|
|
781
799
|
description: "Data extraction metadata."
|
|
800
|
+
},
|
|
801
|
+
score_display: {
|
|
802
|
+
description: "Global investigation score formatted as fixed-point x.xx.",
|
|
803
|
+
readOnly: true,
|
|
804
|
+
title: "Score Display",
|
|
805
|
+
type: "string"
|
|
782
806
|
}
|
|
783
807
|
},
|
|
784
808
|
required: [
|
|
@@ -795,7 +819,8 @@ var cyvest_schema_default = {
|
|
|
795
819
|
"containers",
|
|
796
820
|
"stats",
|
|
797
821
|
"stats_checks",
|
|
798
|
-
"data_extraction"
|
|
822
|
+
"data_extraction",
|
|
823
|
+
"score_display"
|
|
799
824
|
],
|
|
800
825
|
title: "Cyvest Investigation",
|
|
801
826
|
type: "object"
|
package/dist/index.mjs
CHANGED
|
@@ -50,6 +50,11 @@ var cyvest_schema_default = {
|
|
|
50
50
|
key: {
|
|
51
51
|
title: "Key",
|
|
52
52
|
type: "string"
|
|
53
|
+
},
|
|
54
|
+
score_display: {
|
|
55
|
+
readOnly: true,
|
|
56
|
+
title: "Score Display",
|
|
57
|
+
type: "string"
|
|
53
58
|
}
|
|
54
59
|
},
|
|
55
60
|
required: [
|
|
@@ -61,7 +66,8 @@ var cyvest_schema_default = {
|
|
|
61
66
|
"score",
|
|
62
67
|
"level",
|
|
63
68
|
"observables",
|
|
64
|
-
"key"
|
|
69
|
+
"key",
|
|
70
|
+
"score_display"
|
|
65
71
|
],
|
|
66
72
|
title: "Check",
|
|
67
73
|
type: "object"
|
|
@@ -292,6 +298,11 @@ var cyvest_schema_default = {
|
|
|
292
298
|
readOnly: true,
|
|
293
299
|
title: "Generated By Checks",
|
|
294
300
|
type: "array"
|
|
301
|
+
},
|
|
302
|
+
score_display: {
|
|
303
|
+
readOnly: true,
|
|
304
|
+
title: "Score Display",
|
|
305
|
+
type: "string"
|
|
295
306
|
}
|
|
296
307
|
},
|
|
297
308
|
required: [
|
|
@@ -306,7 +317,8 @@ var cyvest_schema_default = {
|
|
|
306
317
|
"threat_intels",
|
|
307
318
|
"relationships",
|
|
308
319
|
"key",
|
|
309
|
-
"generated_by_checks"
|
|
320
|
+
"generated_by_checks",
|
|
321
|
+
"score_display"
|
|
310
322
|
],
|
|
311
323
|
title: "Observable",
|
|
312
324
|
type: "object"
|
|
@@ -530,6 +542,11 @@ var cyvest_schema_default = {
|
|
|
530
542
|
key: {
|
|
531
543
|
title: "Key",
|
|
532
544
|
type: "string"
|
|
545
|
+
},
|
|
546
|
+
score_display: {
|
|
547
|
+
readOnly: true,
|
|
548
|
+
title: "Score Display",
|
|
549
|
+
type: "string"
|
|
533
550
|
}
|
|
534
551
|
},
|
|
535
552
|
required: [
|
|
@@ -540,7 +557,8 @@ var cyvest_schema_default = {
|
|
|
540
557
|
"score",
|
|
541
558
|
"level",
|
|
542
559
|
"taxonomies",
|
|
543
|
-
"key"
|
|
560
|
+
"key",
|
|
561
|
+
"score_display"
|
|
544
562
|
],
|
|
545
563
|
title: "ThreatIntel",
|
|
546
564
|
type: "object"
|
|
@@ -644,6 +662,12 @@ var cyvest_schema_default = {
|
|
|
644
662
|
data_extraction: {
|
|
645
663
|
$ref: "#/$defs/DataExtractionSchema",
|
|
646
664
|
description: "Data extraction metadata."
|
|
665
|
+
},
|
|
666
|
+
score_display: {
|
|
667
|
+
description: "Global investigation score formatted as fixed-point x.xx.",
|
|
668
|
+
readOnly: true,
|
|
669
|
+
title: "Score Display",
|
|
670
|
+
type: "string"
|
|
647
671
|
}
|
|
648
672
|
},
|
|
649
673
|
required: [
|
|
@@ -660,7 +684,8 @@ var cyvest_schema_default = {
|
|
|
660
684
|
"containers",
|
|
661
685
|
"stats",
|
|
662
686
|
"stats_checks",
|
|
663
|
-
"data_extraction"
|
|
687
|
+
"data_extraction",
|
|
688
|
+
"score_display"
|
|
664
689
|
],
|
|
665
690
|
title: "Cyvest Investigation",
|
|
666
691
|
type: "object"
|
package/package.json
CHANGED
package/src/types.generated.ts
CHANGED
|
@@ -1,86 +1,35 @@
|
|
|
1
1
|
// AUTO-GENERATED FROM cyvest.schema.json — DO NOT EDIT
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Investigation start time (UTC).
|
|
5
|
-
*/
|
|
6
|
-
export type StartedAt = string;
|
|
7
|
-
/**
|
|
8
|
-
* Global investigation score.
|
|
9
|
-
*/
|
|
10
|
-
export type Score = number;
|
|
11
3
|
/**
|
|
12
4
|
* Security level classification for checks, observables, and threat intelligence.
|
|
13
5
|
*
|
|
14
6
|
* Levels are ordered from lowest (NONE) to highest (MALICIOUS) severity.
|
|
15
7
|
*/
|
|
16
8
|
export type Level = "NONE" | "TRUSTED" | "INFO" | "SAFE" | "NOTABLE" | "SUSPICIOUS" | "MALICIOUS";
|
|
17
|
-
/**
|
|
18
|
-
* Whether the investigation is whitelisted.
|
|
19
|
-
*/
|
|
20
|
-
export type Whitelisted = boolean;
|
|
21
|
-
export type Identifier = string;
|
|
22
|
-
export type Name = string;
|
|
23
9
|
export type Justification = string | null;
|
|
24
10
|
/**
|
|
25
11
|
* List of whitelist entries applied to this investigation.
|
|
26
12
|
*/
|
|
27
13
|
export type Whitelists = InvestigationWhitelist[];
|
|
28
|
-
export type Type = string;
|
|
29
|
-
export type Value = string;
|
|
30
|
-
export type Internal = boolean;
|
|
31
|
-
export type Whitelisted1 = boolean;
|
|
32
|
-
export type Comment = string;
|
|
33
|
-
export type Score1 = number;
|
|
34
14
|
export type ThreatIntels = string[];
|
|
35
|
-
export type TargetKey = string;
|
|
36
|
-
export type RelationshipType = string;
|
|
37
15
|
/**
|
|
38
16
|
* Direction of a relationship between observables.
|
|
39
17
|
*/
|
|
40
18
|
export type RelationshipDirection = "outbound" | "inbound" | "bidirectional";
|
|
41
19
|
export type Relationships = Relationship[];
|
|
42
|
-
export type Key = string;
|
|
43
20
|
/**
|
|
44
21
|
* Checks that generated this observable.
|
|
45
22
|
*/
|
|
46
23
|
export type GeneratedByChecks = string[];
|
|
47
|
-
export type CheckId = string;
|
|
48
|
-
export type Scope = string;
|
|
49
|
-
export type Description = string;
|
|
50
|
-
export type Comment1 = string;
|
|
51
|
-
export type Score2 = number;
|
|
52
24
|
export type Observables1 = string[];
|
|
53
25
|
/**
|
|
54
26
|
* Controls how a check reacts to linked observables.
|
|
55
27
|
*/
|
|
56
28
|
export type CheckScorePolicy = "auto" | "manual";
|
|
57
|
-
export type Key1 = string;
|
|
58
|
-
export type Source = string;
|
|
59
|
-
export type ObservableKey = string;
|
|
60
|
-
export type Comment2 = string;
|
|
61
|
-
export type Score3 = number;
|
|
62
29
|
export type Taxonomies = {
|
|
63
30
|
[k: string]: unknown;
|
|
64
31
|
}[];
|
|
65
|
-
export type Key2 = string;
|
|
66
|
-
export type Name1 = string;
|
|
67
|
-
export type Context = string;
|
|
68
|
-
export type Key3 = string;
|
|
69
|
-
export type Path = string;
|
|
70
|
-
export type Description1 = string;
|
|
71
32
|
export type Checks1 = string[];
|
|
72
|
-
export type Key4 = string;
|
|
73
|
-
export type AggregatedScore = number;
|
|
74
|
-
export type TotalObservables = number;
|
|
75
|
-
export type InternalObservables = number;
|
|
76
|
-
export type ExternalObservables = number;
|
|
77
|
-
export type WhitelistedObservables = number;
|
|
78
|
-
export type TotalChecks = number;
|
|
79
|
-
export type AppliedChecks = number;
|
|
80
|
-
export type TotalThreatIntel = number;
|
|
81
|
-
export type TotalContainers = number;
|
|
82
|
-
export type Checks2 = number;
|
|
83
|
-
export type Applied = number;
|
|
84
33
|
/**
|
|
85
34
|
* Root observable type used during data extraction.
|
|
86
35
|
*/
|
|
@@ -101,10 +50,19 @@ export type ScoreMode = "max" | "sum";
|
|
|
101
50
|
* schemas matching the actual model_dump() output.
|
|
102
51
|
*/
|
|
103
52
|
export interface CyvestInvestigation {
|
|
104
|
-
|
|
105
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Investigation start time (UTC).
|
|
55
|
+
*/
|
|
56
|
+
started_at: string;
|
|
57
|
+
/**
|
|
58
|
+
* Global investigation score.
|
|
59
|
+
*/
|
|
60
|
+
score: number;
|
|
106
61
|
level: Level;
|
|
107
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Whether the investigation is whitelisted.
|
|
64
|
+
*/
|
|
65
|
+
whitelisted: boolean;
|
|
108
66
|
whitelists: Whitelists;
|
|
109
67
|
observables: Observables;
|
|
110
68
|
checks: Checks;
|
|
@@ -115,13 +73,17 @@ export interface CyvestInvestigation {
|
|
|
115
73
|
stats: StatisticsSchema;
|
|
116
74
|
stats_checks: StatsChecksSchema;
|
|
117
75
|
data_extraction: DataExtractionSchema;
|
|
76
|
+
/**
|
|
77
|
+
* Global investigation score formatted as fixed-point x.xx.
|
|
78
|
+
*/
|
|
79
|
+
score_display: string;
|
|
118
80
|
}
|
|
119
81
|
/**
|
|
120
82
|
* Represents a whitelist entry on an investigation.
|
|
121
83
|
*/
|
|
122
84
|
export interface InvestigationWhitelist {
|
|
123
|
-
identifier:
|
|
124
|
-
name:
|
|
85
|
+
identifier: string;
|
|
86
|
+
name: string;
|
|
125
87
|
justification?: Justification;
|
|
126
88
|
[k: string]: unknown;
|
|
127
89
|
}
|
|
@@ -138,18 +100,19 @@ export interface Observables {
|
|
|
138
100
|
* through relationships.
|
|
139
101
|
*/
|
|
140
102
|
export interface Observable {
|
|
141
|
-
type:
|
|
142
|
-
value:
|
|
143
|
-
internal:
|
|
144
|
-
whitelisted:
|
|
145
|
-
comment:
|
|
103
|
+
type: string;
|
|
104
|
+
value: string;
|
|
105
|
+
internal: boolean;
|
|
106
|
+
whitelisted: boolean;
|
|
107
|
+
comment: string;
|
|
146
108
|
extra: Extra;
|
|
147
|
-
score:
|
|
109
|
+
score: number;
|
|
148
110
|
level: Level;
|
|
149
111
|
threat_intels: ThreatIntels;
|
|
150
112
|
relationships: Relationships;
|
|
151
|
-
key:
|
|
113
|
+
key: string;
|
|
152
114
|
generated_by_checks: GeneratedByChecks;
|
|
115
|
+
score_display: string;
|
|
153
116
|
[k: string]: unknown;
|
|
154
117
|
}
|
|
155
118
|
export interface Extra {
|
|
@@ -159,8 +122,8 @@ export interface Extra {
|
|
|
159
122
|
* Represents a relationship between observables.
|
|
160
123
|
*/
|
|
161
124
|
export interface Relationship {
|
|
162
|
-
target_key:
|
|
163
|
-
relationship_type:
|
|
125
|
+
target_key: string;
|
|
126
|
+
relationship_type: string;
|
|
164
127
|
direction: RelationshipDirection;
|
|
165
128
|
[k: string]: unknown;
|
|
166
129
|
}
|
|
@@ -177,16 +140,17 @@ export interface Checks {
|
|
|
177
140
|
* and contributes to the overall investigation score.
|
|
178
141
|
*/
|
|
179
142
|
export interface Check {
|
|
180
|
-
check_id:
|
|
181
|
-
scope:
|
|
182
|
-
description:
|
|
183
|
-
comment:
|
|
143
|
+
check_id: string;
|
|
144
|
+
scope: string;
|
|
145
|
+
description: string;
|
|
146
|
+
comment: string;
|
|
184
147
|
extra: Extra1;
|
|
185
|
-
score:
|
|
148
|
+
score: number;
|
|
186
149
|
level: Level;
|
|
187
150
|
observables: Observables1;
|
|
188
151
|
score_policy?: CheckScorePolicy;
|
|
189
|
-
key:
|
|
152
|
+
key: string;
|
|
153
|
+
score_display: string;
|
|
190
154
|
[k: string]: unknown;
|
|
191
155
|
}
|
|
192
156
|
export interface Extra1 {
|
|
@@ -211,14 +175,15 @@ export interface ThreatIntels1 {
|
|
|
211
175
|
* like VirusTotal, URLScan.io, etc.
|
|
212
176
|
*/
|
|
213
177
|
export interface ThreatIntel {
|
|
214
|
-
source:
|
|
215
|
-
observable_key:
|
|
216
|
-
comment:
|
|
178
|
+
source: string;
|
|
179
|
+
observable_key: string;
|
|
180
|
+
comment: string;
|
|
217
181
|
extra: Extra2;
|
|
218
|
-
score:
|
|
182
|
+
score: number;
|
|
219
183
|
level: Level;
|
|
220
184
|
taxonomies: Taxonomies;
|
|
221
|
-
key:
|
|
185
|
+
key: string;
|
|
186
|
+
score_display: string;
|
|
222
187
|
[k: string]: unknown;
|
|
223
188
|
}
|
|
224
189
|
export interface Extra2 {
|
|
@@ -237,10 +202,10 @@ export interface Enrichments {
|
|
|
237
202
|
* context but doesn't directly contribute to scoring.
|
|
238
203
|
*/
|
|
239
204
|
export interface Enrichment {
|
|
240
|
-
name:
|
|
205
|
+
name: string;
|
|
241
206
|
data: Data;
|
|
242
|
-
context:
|
|
243
|
-
key:
|
|
207
|
+
context: string;
|
|
208
|
+
key: string;
|
|
244
209
|
[k: string]: unknown;
|
|
245
210
|
}
|
|
246
211
|
export interface Data {
|
|
@@ -259,12 +224,12 @@ export interface Containers {
|
|
|
259
224
|
* with aggregated scores and levels.
|
|
260
225
|
*/
|
|
261
226
|
export interface Container {
|
|
262
|
-
path:
|
|
263
|
-
description?:
|
|
227
|
+
path: string;
|
|
228
|
+
description?: string;
|
|
264
229
|
checks: Checks1;
|
|
265
230
|
sub_containers: SubContainers;
|
|
266
|
-
key:
|
|
267
|
-
aggregated_score:
|
|
231
|
+
key: string;
|
|
232
|
+
aggregated_score: number;
|
|
268
233
|
aggregated_level: Level;
|
|
269
234
|
}
|
|
270
235
|
export interface SubContainers {
|
|
@@ -276,21 +241,21 @@ export interface SubContainers {
|
|
|
276
241
|
* Mirrors the output of `InvestigationStats.get_summary()`.
|
|
277
242
|
*/
|
|
278
243
|
export interface StatisticsSchema {
|
|
279
|
-
total_observables:
|
|
280
|
-
internal_observables:
|
|
281
|
-
external_observables:
|
|
282
|
-
whitelisted_observables:
|
|
244
|
+
total_observables: number;
|
|
245
|
+
internal_observables: number;
|
|
246
|
+
external_observables: number;
|
|
247
|
+
whitelisted_observables: number;
|
|
283
248
|
observables_by_type?: ObservablesByType;
|
|
284
249
|
observables_by_level?: ObservablesByLevel;
|
|
285
250
|
observables_by_type_and_level?: ObservablesByTypeAndLevel;
|
|
286
|
-
total_checks:
|
|
287
|
-
applied_checks:
|
|
251
|
+
total_checks: number;
|
|
252
|
+
applied_checks: number;
|
|
288
253
|
checks_by_scope?: ChecksByScope;
|
|
289
254
|
checks_by_level?: ChecksByLevel1;
|
|
290
|
-
total_threat_intel:
|
|
255
|
+
total_threat_intel: number;
|
|
291
256
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
292
257
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
293
|
-
total_containers:
|
|
258
|
+
total_containers: number;
|
|
294
259
|
}
|
|
295
260
|
export interface ObservablesByType {
|
|
296
261
|
[k: string]: number;
|
|
@@ -319,8 +284,8 @@ export interface ThreatIntelByLevel {
|
|
|
319
284
|
* Schema for check statistics summary.
|
|
320
285
|
*/
|
|
321
286
|
export interface StatsChecksSchema {
|
|
322
|
-
checks:
|
|
323
|
-
applied:
|
|
287
|
+
checks: number;
|
|
288
|
+
applied: number;
|
|
324
289
|
}
|
|
325
290
|
/**
|
|
326
291
|
* Schema for data extraction metadata.
|