@cyvest/cyvest-js 4.4.0 → 5.0.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.ts CHANGED
@@ -78,7 +78,7 @@ interface CyvestInvestigation {
78
78
  checks: Checks;
79
79
  threat_intels: ThreatIntels1;
80
80
  enrichments: Enrichments;
81
- containers: Containers;
81
+ tags: Tags;
82
82
  stats: StatisticsSchema;
83
83
  data_extraction: DataExtractionSchema;
84
84
  /**
@@ -154,10 +154,10 @@ interface Relationship {
154
154
  [k: string]: unknown;
155
155
  }
156
156
  /**
157
- * Checks organized by scope.
157
+ * Checks keyed by their unique key.
158
158
  */
159
159
  interface Checks {
160
- [k: string]: Check[];
160
+ [k: string]: Check;
161
161
  }
162
162
  /**
163
163
  * Represents a verification step in the investigation.
@@ -166,8 +166,7 @@ interface Checks {
166
166
  * and contributes to the overall investigation score.
167
167
  */
168
168
  interface Check {
169
- check_id: string;
170
- scope: string;
169
+ check_name: string;
171
170
  description: string;
172
171
  comment: string;
173
172
  extra: Extra1;
@@ -247,28 +246,34 @@ interface Data {
247
246
  [k: string]: unknown;
248
247
  }
249
248
  /**
250
- * Containers keyed by their unique key.
249
+ * Tags keyed by their unique key.
251
250
  */
252
- interface Containers {
253
- [k: string]: Container;
251
+ interface Tags {
252
+ [k: string]: Tag;
254
253
  }
255
254
  /**
256
- * Groups checks and sub-containers for hierarchical organization.
255
+ * Groups checks for categorical organization.
257
256
  *
258
- * Containers allow structuring the investigation into logical sections
259
- * with aggregated scores and levels.
257
+ * Tags allow structuring the investigation into logical sections
258
+ * with aggregated scores and levels. Hierarchy is automatic based on
259
+ * the ":" delimiter in tag names (e.g., "header:auth:dkim").
260
260
  */
261
- interface Container {
262
- path: string;
261
+ interface Tag {
262
+ name: string;
263
263
  description?: string;
264
264
  checks: Checks1;
265
- sub_containers: SubContainers;
266
265
  key: string;
267
- aggregated_score: number;
268
- aggregated_level: Level;
269
- }
270
- interface SubContainers {
271
- [k: string]: Container;
266
+ /**
267
+ * Calculate the score from direct checks only (no hierarchy).
268
+ *
269
+ * For hierarchical aggregation (including descendant tags), use
270
+ * Investigation.get_tag_aggregated_score() or TagProxy.get_aggregated_score().
271
+ *
272
+ * Returns:
273
+ * Total score from direct checks
274
+ */
275
+ direct_score: number;
276
+ direct_level: Level;
272
277
  }
273
278
  /**
274
279
  * Schema for investigation statistics.
@@ -285,12 +290,11 @@ interface StatisticsSchema {
285
290
  observables_by_type_and_level?: ObservablesByTypeAndLevel;
286
291
  total_checks: number;
287
292
  applied_checks: number;
288
- checks_by_scope?: ChecksByScope;
289
293
  checks_by_level?: ChecksByLevel;
290
294
  total_threat_intel: number;
291
295
  threat_intel_by_source?: ThreatIntelBySource;
292
296
  threat_intel_by_level?: ThreatIntelByLevel;
293
- total_containers: number;
297
+ total_tags: number;
294
298
  }
295
299
  interface ObservablesByType {
296
300
  [k: string]: number;
@@ -303,9 +307,6 @@ interface ObservablesByTypeAndLevel {
303
307
  [k: string]: number;
304
308
  };
305
309
  }
306
- interface ChecksByScope {
307
- [k: string]: string[];
308
- }
309
310
  interface ChecksByLevel {
310
311
  [k: string]: string[];
311
312
  }
@@ -335,7 +336,7 @@ declare function isCyvest(json: unknown): json is CyvestInvestigation;
335
336
  /**
336
337
  * Key type prefixes used in Cyvest.
337
338
  */
338
- type KeyType = "obs" | "chk" | "ti" | "enr" | "ctr";
339
+ type KeyType = "obs" | "chk" | "ti" | "enr" | "tag";
339
340
  /**
340
341
  * Generate a unique key for an observable.
341
342
  *
@@ -355,19 +356,18 @@ declare function generateObservableKey(obsType: string, value: string): string;
355
356
  /**
356
357
  * Generate a unique key for a check.
357
358
  *
358
- * Format: chk:{check_id}:{scope}
359
+ * Format: chk:{check_name}
359
360
  *
360
- * @param checkId - Identifier of the check
361
- * @param scope - Scope of the check
361
+ * @param checkName - Name of the check
362
362
  * @returns Unique check key
363
363
  *
364
364
  * @example
365
365
  * ```ts
366
- * generateCheckKey("sender_verification", "email_headers")
367
- * // => "chk:sender_verification:email_headers"
366
+ * generateCheckKey("sender_verification")
367
+ * // => "chk:sender_verification"
368
368
  * ```
369
369
  */
370
- declare function generateCheckKey(checkId: string, scope: string): string;
370
+ declare function generateCheckKey(checkName: string): string;
371
371
  /**
372
372
  * Generate a unique key for threat intelligence.
373
373
  *
@@ -404,25 +404,66 @@ declare function generateThreatIntelKey(source: string, observableKey: string):
404
404
  */
405
405
  declare function generateEnrichmentKey(name: string, context?: string): string;
406
406
  /**
407
- * Generate a unique key for a container.
407
+ * Generate a unique key for a tag.
408
+ *
409
+ * Format: tag:{normalized_name}
408
410
  *
409
- * Format: ctr:{normalized_path}
411
+ * @param name - Name of the tag (can use : as hierarchy delimiter)
412
+ * @returns Unique tag key
413
+ *
414
+ * @example
415
+ * ```ts
416
+ * generateTagKey("header:auth:dkim")
417
+ * // => "tag:header:auth:dkim"
418
+ * ```
419
+ */
420
+ declare function generateTagKey(name: string): string;
421
+ /**
422
+ * Get all ancestor tag names from a hierarchical tag name.
410
423
  *
411
- * @param path - Path of the container (can use / or . as separator)
412
- * @returns Unique container key
424
+ * @param name - Tag name with : delimiter
425
+ * @returns Array of ancestor tag names
413
426
  *
414
427
  * @example
415
428
  * ```ts
416
- * generateContainerKey("email/headers")
417
- * // => "ctr:email/headers"
429
+ * getTagAncestors("header:auth:dkim")
430
+ * // => ["header", "header:auth"]
418
431
  * ```
419
432
  */
420
- declare function generateContainerKey(path: string): string;
433
+ declare function getTagAncestors(name: string): string[];
434
+ /**
435
+ * Check if a tag is a direct child of another tag.
436
+ *
437
+ * @param childName - Potential child tag name
438
+ * @param parentName - Potential parent tag name
439
+ * @returns True if childName is a direct child of parentName
440
+ *
441
+ * @example
442
+ * ```ts
443
+ * isTagChildOf("header:auth", "header") // => true
444
+ * isTagChildOf("header:auth:dkim", "header") // => false (grandchild)
445
+ * ```
446
+ */
447
+ declare function isTagChildOf(childName: string, parentName: string): boolean;
448
+ /**
449
+ * Check if a tag is a descendant of another tag (any depth).
450
+ *
451
+ * @param descendantName - Potential descendant tag name
452
+ * @param ancestorName - Potential ancestor tag name
453
+ * @returns True if descendantName is a descendant of ancestorName
454
+ *
455
+ * @example
456
+ * ```ts
457
+ * isTagDescendantOf("header:auth:dkim", "header") // => true
458
+ * isTagDescendantOf("header", "header") // => false (same)
459
+ * ```
460
+ */
461
+ declare function isTagDescendantOf(descendantName: string, ancestorName: string): boolean;
421
462
  /**
422
463
  * Extract the type prefix from a key.
423
464
  *
424
465
  * @param key - The key to parse
425
- * @returns Type prefix (obs, chk, ti, enr, ctr) or null if invalid
466
+ * @returns Type prefix (obs, chk, ti, enr, tag) or null if invalid
426
467
  *
427
468
  * @example
428
469
  * ```ts
@@ -467,17 +508,16 @@ declare function parseObservableKey(key: string): {
467
508
  * Extract components from a check key.
468
509
  *
469
510
  * @param key - Check key to parse
470
- * @returns Object with checkId and scope, or null if invalid
511
+ * @returns Object with checkName, or null if invalid
471
512
  *
472
513
  * @example
473
514
  * ```ts
474
- * parseCheckKey("chk:sender_verification:email_headers")
475
- * // => { checkId: "sender_verification", scope: "email_headers" }
515
+ * parseCheckKey("chk:sender_verification")
516
+ * // => { checkName: "sender_verification" }
476
517
  * ```
477
518
  */
478
519
  declare function parseCheckKey(key: string): {
479
- checkId: string;
480
- scope: string;
520
+ checkName: string;
481
521
  } | null;
482
522
  /**
483
523
  * Extract components from a threat intel key.
@@ -648,9 +688,9 @@ declare function hasLevel(obj: unknown): obj is {
648
688
  level: Level;
649
689
  };
650
690
  /**
651
- * Extract level from an entity (Observable, Check, ThreatIntel, Container).
691
+ * Extract level from an entity (Observable, Check, ThreatIntel, Tag).
652
692
  */
653
- declare function getEntityLevel(entity: Observable | Check | ThreatIntel | Container): Level;
693
+ declare function getEntityLevel(entity: Observable | Check | ThreatIntel | Tag): Level;
654
694
 
655
695
  /**
656
696
  * Get an observable by its key.
@@ -682,6 +722,24 @@ declare function getObservable(inv: CyvestInvestigation, key: string): Observabl
682
722
  * ```
683
723
  */
684
724
  declare function getObservableByTypeValue(inv: CyvestInvestigation, type: string, value: string): Observable | undefined;
725
+ /**
726
+ * Get the root observable of the investigation.
727
+ *
728
+ * The root observable is identified using the `root_type` from data extraction
729
+ * metadata combined with value="root".
730
+ *
731
+ * @param inv - The investigation
732
+ * @returns The root observable, or undefined if not found
733
+ *
734
+ * @example
735
+ * ```ts
736
+ * const root = getRootObservable(investigation);
737
+ * if (root) {
738
+ * console.log(`Root: ${root.type} = ${root.value}`);
739
+ * }
740
+ * ```
741
+ */
742
+ declare function getRootObservable(inv: CyvestInvestigation): Observable | undefined;
685
743
  /**
686
744
  * Get a check by its key.
687
745
  *
@@ -696,21 +754,20 @@ declare function getObservableByTypeValue(inv: CyvestInvestigation, type: string
696
754
  */
697
755
  declare function getCheck(inv: CyvestInvestigation, key: string): Check | undefined;
698
756
  /**
699
- * Get a check by its ID and scope.
757
+ * Get a check by its name.
700
758
  *
701
759
  * @param inv - The investigation to search
702
- * @param checkId - Check identifier
703
- * @param scope - Check scope
760
+ * @param checkName - Check name
704
761
  * @returns The check or undefined if not found
705
762
  *
706
763
  * @example
707
764
  * ```ts
708
- * const check = getCheckByIdScope(investigation, "sender_verification", "email_headers");
765
+ * const check = getCheckByName(investigation, "sender_verification");
709
766
  * ```
710
767
  */
711
- declare function getCheckByIdScope(inv: CyvestInvestigation, checkId: string, scope: string): Check | undefined;
768
+ declare function getCheckByName(inv: CyvestInvestigation, checkName: string): Check | undefined;
712
769
  /**
713
- * Get all checks as a flat array (not grouped by scope).
770
+ * Get all checks as an array.
714
771
  *
715
772
  * @param inv - The investigation
716
773
  * @returns Array of all checks
@@ -770,28 +827,47 @@ declare function getEnrichmentByName(inv: CyvestInvestigation, name: string): En
770
827
  */
771
828
  declare function getAllEnrichments(inv: CyvestInvestigation): Enrichment[];
772
829
  /**
773
- * Get a container by its key.
830
+ * Get a tag by its key.
774
831
  *
775
832
  * @param inv - The investigation to search
776
- * @param key - Container key (e.g., "ctr:email/headers")
777
- * @returns The container or undefined if not found
833
+ * @param key - Tag key (e.g., "tag:header:auth")
834
+ * @returns The tag or undefined if not found
835
+ *
836
+ * @example
837
+ * ```ts
838
+ * const tag = getTag(investigation, "tag:header:auth");
839
+ * if (tag) {
840
+ * console.log(tag.name, tag.direct_level);
841
+ * }
842
+ * ```
778
843
  */
779
- declare function getContainer(inv: CyvestInvestigation, key: string): Container | undefined;
844
+ declare function getTag(inv: CyvestInvestigation, key: string): Tag | undefined;
780
845
  /**
781
- * Get a container by its path.
846
+ * Get a tag by its name.
782
847
  *
783
848
  * @param inv - The investigation to search
784
- * @param path - Container path
785
- * @returns The container or undefined if not found
849
+ * @param name - Tag name (e.g., "header:auth:dkim")
850
+ * @returns The tag or undefined if not found
851
+ *
852
+ * @example
853
+ * ```ts
854
+ * const tag = getTagByName(investigation, "header:auth:dkim");
855
+ * ```
786
856
  */
787
- declare function getContainerByPath(inv: CyvestInvestigation, path: string): Container | undefined;
857
+ declare function getTagByName(inv: CyvestInvestigation, name: string): Tag | undefined;
788
858
  /**
789
- * Get all containers as a flat array (including sub-containers).
859
+ * Get all tags as an array.
790
860
  *
791
861
  * @param inv - The investigation
792
- * @returns Array of all containers
862
+ * @returns Array of all tags
863
+ *
864
+ * @example
865
+ * ```ts
866
+ * const allTags = getAllTags(investigation);
867
+ * console.log(`Total tags: ${allTags.length}`);
868
+ * ```
793
869
  */
794
- declare function getAllContainers(inv: CyvestInvestigation): Container[];
870
+ declare function getAllTags(inv: CyvestInvestigation): Tag[];
795
871
  /**
796
872
  * Get all observables as an array.
797
873
  *
@@ -828,7 +904,7 @@ interface InvestigationCounts {
828
904
  checks: number;
829
905
  threatIntels: number;
830
906
  enrichments: number;
831
- containers: number;
907
+ tags: number;
832
908
  whitelists: number;
833
909
  }
834
910
  /**
@@ -855,6 +931,69 @@ declare function getCounts(inv: CyvestInvestigation): InvestigationCounts;
855
931
  * ```
856
932
  */
857
933
  declare function getStartedAt(inv: CyvestInvestigation): string | undefined;
934
+ /**
935
+ * Get direct child tags of a given tag.
936
+ *
937
+ * @param inv - The investigation
938
+ * @param tagName - Parent tag name
939
+ * @returns Array of direct child tags
940
+ *
941
+ * @example
942
+ * ```ts
943
+ * const children = getTagChildren(investigation, "bodies");
944
+ * // Returns tags like "bodies:urls", "bodies:domains" (but not "bodies:urls:something")
945
+ * ```
946
+ */
947
+ declare function getTagChildren(inv: CyvestInvestigation, tagName: string): Tag[];
948
+ /**
949
+ * Get all descendant tags of a given tag (any depth).
950
+ *
951
+ * @param inv - The investigation
952
+ * @param tagName - Ancestor tag name
953
+ * @returns Array of all descendant tags
954
+ *
955
+ * @example
956
+ * ```ts
957
+ * const descendants = getTagDescendants(investigation, "bodies");
958
+ * // Returns all tags starting with "bodies:"
959
+ * ```
960
+ */
961
+ declare function getTagDescendants(inv: CyvestInvestigation, tagName: string): Tag[];
962
+ /**
963
+ * Get the aggregated score for a tag including all descendant tags.
964
+ *
965
+ * The aggregated score includes:
966
+ * - The tag's direct_score (from its direct checks)
967
+ * - Recursively, the aggregated scores of all child tags
968
+ *
969
+ * @param inv - The investigation
970
+ * @param tagName - Name of the tag
971
+ * @returns Total aggregated score, or 0 if tag not found
972
+ *
973
+ * @example
974
+ * ```ts
975
+ * const score = getTagAggregatedScore(investigation, "bodies");
976
+ * // Includes scores from bodies, bodies:urls, bodies:domains, etc.
977
+ * ```
978
+ */
979
+ declare function getTagAggregatedScore(inv: CyvestInvestigation, tagName: string): number;
980
+ /**
981
+ * Get the aggregated level for a tag including all descendant tags.
982
+ *
983
+ * The level is calculated from the aggregated score using the standard
984
+ * score-to-level mapping.
985
+ *
986
+ * @param inv - The investigation
987
+ * @param tagName - Name of the tag
988
+ * @returns Level based on aggregated score
989
+ *
990
+ * @example
991
+ * ```ts
992
+ * const level = getTagAggregatedLevel(investigation, "bodies");
993
+ * // Returns "MALICIOUS" if aggregated score >= 5, etc.
994
+ * ```
995
+ */
996
+ declare function getTagAggregatedLevel(inv: CyvestInvestigation, tagName: string): Level;
858
997
 
859
998
  /**
860
999
  * Finder utilities for querying and filtering Cyvest Investigation data.
@@ -958,19 +1097,6 @@ declare function findWhitelistedObservables(inv: CyvestInvestigation): Observabl
958
1097
  * @returns Array of observables that have associated threat intel
959
1098
  */
960
1099
  declare function findObservablesWithThreatIntel(inv: CyvestInvestigation): Observable[];
961
- /**
962
- * Find all checks in a specific scope.
963
- *
964
- * @param inv - The investigation to search
965
- * @param scope - Check scope
966
- * @returns Array of checks in the scope
967
- *
968
- * @example
969
- * ```ts
970
- * const emailChecks = findChecksByScope(investigation, "email_headers");
971
- * ```
972
- */
973
- declare function findChecksByScope(inv: CyvestInvestigation, scope: string): Check[];
974
1100
  /**
975
1101
  * Find all checks at a specific level.
976
1102
  *
@@ -988,13 +1114,13 @@ declare function findChecksByLevel(inv: CyvestInvestigation, level: Level): Chec
988
1114
  */
989
1115
  declare function findChecksAtLeast(inv: CyvestInvestigation, minLevel: Level): Check[];
990
1116
  /**
991
- * Find checks by check ID (across all scopes).
1117
+ * Find checks by check name.
992
1118
  *
993
1119
  * @param inv - The investigation to search
994
- * @param checkId - Check identifier to search for
995
- * @returns Array of matching checks
1120
+ * @param checkName - Check name to search for
1121
+ * @returns The matching check or undefined
996
1122
  */
997
- declare function findChecksByCheckId(inv: CyvestInvestigation, checkId: string): Check[];
1123
+ declare function findCheckByName(inv: CyvestInvestigation, checkName: string): Check | undefined;
998
1124
  /**
999
1125
  * Find all threat intel from a specific source.
1000
1126
  *
@@ -1020,23 +1146,31 @@ declare function findThreatIntelByLevel(inv: CyvestInvestigation, level: Level):
1020
1146
  */
1021
1147
  declare function findThreatIntelAtLeast(inv: CyvestInvestigation, minLevel: Level): ThreatIntel[];
1022
1148
  /**
1023
- * Find containers at a specific aggregated level.
1149
+ * Find tags at a specific direct level.
1150
+ *
1151
+ * @param inv - The investigation to search
1152
+ * @param level - Direct level to filter by
1153
+ * @returns Array of matching tags
1154
+ */
1155
+ declare function findTagsByLevel(inv: CyvestInvestigation, level: Level): Tag[];
1156
+ /**
1157
+ * Find tags at or above a minimum direct level.
1024
1158
  *
1025
1159
  * @param inv - The investigation to search
1026
- * @param level - Aggregated level to filter by
1027
- * @returns Array of matching containers
1160
+ * @param minLevel - Minimum direct level
1161
+ * @returns Array of matching tags
1028
1162
  */
1029
- declare function findContainersByLevel(inv: CyvestInvestigation, level: Level): Container[];
1163
+ declare function findTagsAtLeast(inv: CyvestInvestigation, minLevel: Level): Tag[];
1030
1164
  /**
1031
- * Find containers at or above a minimum aggregated level.
1165
+ * Find tags by name pattern.
1032
1166
  *
1033
1167
  * @param inv - The investigation to search
1034
- * @param minLevel - Minimum aggregated level
1035
- * @returns Array of matching containers
1168
+ * @param pattern - Pattern to match against tag names
1169
+ * @returns Array of matching tags
1036
1170
  */
1037
- declare function findContainersAtLeast(inv: CyvestInvestigation, minLevel: Level): Container[];
1171
+ declare function findTagsByNamePattern(inv: CyvestInvestigation, pattern: RegExp): Tag[];
1038
1172
  /**
1039
- * Get all checks that generated or reference a specific observable.
1173
+ * Find all checks that generated or reference a specific observable.
1040
1174
  *
1041
1175
  * @param inv - The investigation to search
1042
1176
  * @param observableKey - Key of the observable
@@ -1044,35 +1178,35 @@ declare function findContainersAtLeast(inv: CyvestInvestigation, minLevel: Level
1044
1178
  *
1045
1179
  * @example
1046
1180
  * ```ts
1047
- * const checks = getChecksForObservable(investigation, "obs:ipv4-addr:192.168.1.1");
1181
+ * const checks = findChecksForObservable(investigation, "obs:ipv4-addr:192.168.1.1");
1048
1182
  * ```
1049
1183
  */
1050
- declare function getChecksForObservable(inv: CyvestInvestigation, observableKey: string): Check[];
1184
+ declare function findChecksForObservable(inv: CyvestInvestigation, observableKey: string): Check[];
1051
1185
  /**
1052
- * Get all threat intel entries for a specific observable.
1186
+ * Find all threat intel entries for a specific observable.
1053
1187
  *
1054
1188
  * @param inv - The investigation to search
1055
1189
  * @param observableKey - Key of the observable
1056
1190
  * @returns Array of threat intel for this observable
1057
1191
  */
1058
- declare function getThreatIntelsForObservable(inv: CyvestInvestigation, observableKey: string): ThreatIntel[];
1192
+ declare function findThreatIntelsForObservable(inv: CyvestInvestigation, observableKey: string): ThreatIntel[];
1059
1193
  /**
1060
- * Get all observables referenced by a specific check.
1194
+ * Find all observables referenced by a specific check.
1061
1195
  *
1062
1196
  * @param inv - The investigation to search
1063
1197
  * @param checkKey - Key of the check
1064
1198
  * @returns Array of observables referenced by this check
1065
1199
  */
1066
- declare function getObservablesForCheck(inv: CyvestInvestigation, checkKey: string): Observable[];
1200
+ declare function findObservablesForCheck(inv: CyvestInvestigation, checkKey: string): Observable[];
1067
1201
  /**
1068
- * Get all checks for a specific container.
1202
+ * Find all checks for a specific tag.
1069
1203
  *
1070
1204
  * @param inv - The investigation to search
1071
- * @param containerKey - Key of the container
1072
- * @param recursive - Include checks from sub-containers (default: false)
1073
- * @returns Array of checks in the container
1205
+ * @param tagKey - Key of the tag
1206
+ * @param recursive - Include checks from descendant tags (default: false)
1207
+ * @returns Array of checks in the tag
1074
1208
  */
1075
- declare function getChecksForContainer(inv: CyvestInvestigation, containerKey: string, recursive?: boolean): Check[];
1209
+ declare function findChecksForTag(inv: CyvestInvestigation, tagKey: string, recursive?: boolean): Check[];
1076
1210
  /**
1077
1211
  * Sort observables by score (descending - highest first).
1078
1212
  *
@@ -1102,56 +1236,56 @@ declare function sortObservablesByLevel(observables: Observable[]): Observable[]
1102
1236
  */
1103
1237
  declare function sortChecksByLevel(checks: Check[]): Check[];
1104
1238
  /**
1105
- * Get the highest scoring observables.
1239
+ * Find the highest scoring observables.
1106
1240
  *
1107
1241
  * @param inv - The investigation to search
1108
1242
  * @param n - Number of results to return (default: 10)
1109
1243
  * @returns Array of highest scoring observables
1110
1244
  */
1111
- declare function getHighestScoringObservables(inv: CyvestInvestigation, n?: number): Observable[];
1245
+ declare function findHighestScoringObservables(inv: CyvestInvestigation, n?: number): Observable[];
1112
1246
  /**
1113
- * Get the highest scoring checks.
1247
+ * Find the highest scoring checks.
1114
1248
  *
1115
1249
  * @param inv - The investigation to search
1116
1250
  * @param n - Number of results to return (default: 10)
1117
1251
  * @returns Array of highest scoring checks
1118
1252
  */
1119
- declare function getHighestScoringChecks(inv: CyvestInvestigation, n?: number): Check[];
1253
+ declare function findHighestScoringChecks(inv: CyvestInvestigation, n?: number): Check[];
1120
1254
  /**
1121
- * Get all malicious observables (convenience function).
1255
+ * Find all malicious observables (convenience function).
1122
1256
  *
1123
1257
  * @param inv - The investigation to search
1124
1258
  * @returns Array of malicious observables
1125
1259
  */
1126
- declare function getMaliciousObservables(inv: CyvestInvestigation): Observable[];
1260
+ declare function findMaliciousObservables(inv: CyvestInvestigation): Observable[];
1127
1261
  /**
1128
- * Get all suspicious observables (convenience function).
1262
+ * Find all suspicious observables (convenience function).
1129
1263
  *
1130
1264
  * @param inv - The investigation to search
1131
1265
  * @returns Array of suspicious observables
1132
1266
  */
1133
- declare function getSuspiciousObservables(inv: CyvestInvestigation): Observable[];
1267
+ declare function findSuspiciousObservables(inv: CyvestInvestigation): Observable[];
1134
1268
  /**
1135
- * Get all malicious checks (convenience function).
1269
+ * Find all malicious checks (convenience function).
1136
1270
  *
1137
1271
  * @param inv - The investigation to search
1138
1272
  * @returns Array of malicious checks
1139
1273
  */
1140
- declare function getMaliciousChecks(inv: CyvestInvestigation): Check[];
1274
+ declare function findMaliciousChecks(inv: CyvestInvestigation): Check[];
1141
1275
  /**
1142
- * Get all suspicious checks (convenience function).
1276
+ * Find all suspicious checks (convenience function).
1143
1277
  *
1144
1278
  * @param inv - The investigation to search
1145
1279
  * @returns Array of suspicious checks
1146
1280
  */
1147
- declare function getSuspiciousChecks(inv: CyvestInvestigation): Check[];
1281
+ declare function findSuspiciousChecks(inv: CyvestInvestigation): Check[];
1148
1282
  /**
1149
- * Get all scopes that have checks.
1283
+ * Get all check keys in the investigation.
1150
1284
  *
1151
1285
  * @param inv - The investigation
1152
- * @returns Array of scope names
1286
+ * @returns Array of check keys
1153
1287
  */
1154
- declare function getAllScopes(inv: CyvestInvestigation): string[];
1288
+ declare function getAllCheckKeys(inv: CyvestInvestigation): string[];
1155
1289
  /**
1156
1290
  * Get all observable types present in the investigation.
1157
1291
  *
@@ -1287,15 +1421,15 @@ declare function getRelatedObservablesByDirection(inv: CyvestInvestigation, obse
1287
1421
  */
1288
1422
  declare function getObservableGraph(inv: CyvestInvestigation): InvestigationGraph;
1289
1423
  /**
1290
- * Find the root observable(s) of the investigation.
1424
+ * Find source observables in the investigation graph.
1291
1425
  *
1292
- * Root observables are those that have no incoming relationships
1426
+ * Source observables are those that have no incoming relationships
1293
1427
  * (nothing points to them as a target).
1294
1428
  *
1295
1429
  * @param inv - The investigation
1296
- * @returns Array of root observables
1430
+ * @returns Array of source observables
1297
1431
  */
1298
- declare function findRootObservables(inv: CyvestInvestigation): Observable[];
1432
+ declare function findSourceObservables(inv: CyvestInvestigation): Observable[];
1299
1433
  /**
1300
1434
  * Find orphan observables (not connected to any other observable).
1301
1435
  *
@@ -1368,4 +1502,4 @@ declare function getRelationshipsForObservable(inv: CyvestInvestigation, observa
1368
1502
  }>;
1369
1503
  };
1370
1504
 
1371
- export { type Actor, type AuditEvent, type AuditLog, type Check, type CheckLinks, type Checks, type Checks1, type ChecksByLevel, type ChecksByScope, type Container, type Containers, type CyvestInvestigation, type Data, type DataExtractionSchema, type Details, type Enrichment, type Enrichments, type Extra, type Extra1, type Extra2, type GraphEdge, type GraphNode, type InvestigationCounts, type InvestigationGraph, type InvestigationName, type InvestigationWhitelist, type Justification, type KeyType, LEVEL_COLORS, LEVEL_ORDER, LEVEL_VALUES, type Level, type ObjectKey, type ObjectType, type Observable, type ObservableLink, type ObservableLinks, type Observables, type ObservablesByLevel, type ObservablesByType, type ObservablesByTypeAndLevel, type PropagationMode, type Reason, type Relationship, type RelationshipDirection, type Relationships, type RootType, type ScoreMode, type StatisticsSchema, type SubContainers, type Taxonomies, type Taxonomy, type ThreatIntel, type ThreatIntelByLevel, type ThreatIntelBySource, type ThreatIntels, type ThreatIntels1, type Tool, type Whitelists, areConnected, compareLevels, countRelationshipsByType, findChecksAtLeast, findChecksByCheckId, findChecksByLevel, findChecksByScope, findContainersAtLeast, findContainersByLevel, findExternalObservables, findInternalObservables, findLeafObservables, 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, getStartedAt, getStats, 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 };
1505
+ export { type Actor, type AuditEvent, type AuditLog, type Check, type CheckLinks, type Checks, type Checks1, type ChecksByLevel, type CyvestInvestigation, type Data, type DataExtractionSchema, type Details, type Enrichment, type Enrichments, type Extra, type Extra1, type Extra2, type GraphEdge, type GraphNode, type InvestigationCounts, type InvestigationGraph, type InvestigationName, type InvestigationWhitelist, type Justification, type KeyType, LEVEL_COLORS, LEVEL_ORDER, LEVEL_VALUES, type Level, type ObjectKey, type ObjectType, type Observable, type ObservableLink, type ObservableLinks, type Observables, type ObservablesByLevel, type ObservablesByType, type ObservablesByTypeAndLevel, type PropagationMode, type Reason, type Relationship, type RelationshipDirection, type Relationships, type RootType, type ScoreMode, type StatisticsSchema, type Tag, type Tags, type Taxonomies, type Taxonomy, type ThreatIntel, type ThreatIntelByLevel, type ThreatIntelBySource, type ThreatIntels, type ThreatIntels1, type Tool, type Whitelists, areConnected, compareLevels, countRelationshipsByType, findCheckByName, findChecksAtLeast, findChecksByLevel, findChecksForObservable, findChecksForTag, findExternalObservables, findHighestScoringChecks, findHighestScoringObservables, findInternalObservables, findLeafObservables, findMaliciousChecks, findMaliciousObservables, findObservablesAtLeast, findObservablesByLevel, findObservablesByType, findObservablesByValue, findObservablesContaining, findObservablesForCheck, findObservablesMatching, findObservablesWithThreatIntel, findOrphanObservables, findPath, findSourceObservables, findSuspiciousChecks, findSuspiciousObservables, findTagsAtLeast, findTagsByLevel, findTagsByNamePattern, findThreatIntelAtLeast, findThreatIntelByLevel, findThreatIntelBySource, findThreatIntelsForObservable, findWhitelistedObservables, generateCheckKey, generateEnrichmentKey, generateObservableKey, generateTagKey, generateThreatIntelKey, getAllCheckKeys, getAllChecks, getAllEnrichments, getAllObservableTypes, getAllObservables, getAllRelationshipTypes, getAllTags, getAllThreatIntelSources, getAllThreatIntels, getCheck, getCheckByName, getColorForLevel, getColorForScore, getCounts, getDataExtraction, getEnrichment, getEnrichmentByName, getEntityLevel, getLevelFromScore, getObservable, getObservableByTypeValue, getObservableChildren, getObservableGraph, getObservableParents, getReachableObservables, getRelatedObservables, getRelatedObservablesByDirection, getRelatedObservablesByType, getRelationshipsForObservable, getRootObservable, getStartedAt, getStats, getTag, getTagAggregatedLevel, getTagAggregatedScore, getTagAncestors, getTagByName, getTagChildren, getTagDescendants, getThreatIntel, getThreatIntelBySourceObservable, getWhitelists, hasLevel, isCyvest, isLevelAtLeast, isLevelHigherThan, isLevelLowerThan, isTagChildOf, isTagDescendantOf, isValidLevel, maxLevel, minLevel, normalizeLevel, parseCheckKey, parseCyvest, parseKeyType, parseObservableKey, parseThreatIntelKey, sortChecksByLevel, sortChecksByScore, sortObservablesByLevel, sortObservablesByScore, validateKey };