@cyvest/cyvest-js 4.2.0 → 4.3.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 +5 -12
- package/dist/index.d.ts +5 -12
- package/dist/index.js +8 -16
- package/dist/index.mjs +8 -16
- package/package.json +1 -1
- package/src/types.generated.ts +4 -11
- package/tests/getters-finders.test.ts +2 -6
- package/tests/graph.test.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -80,7 +80,6 @@ interface CyvestInvestigation {
|
|
|
80
80
|
event_log?: EventLog;
|
|
81
81
|
observables: Observables;
|
|
82
82
|
checks: Checks;
|
|
83
|
-
checks_by_level: ChecksByLevel;
|
|
84
83
|
threat_intels: ThreatIntels1;
|
|
85
84
|
enrichments: Enrichments;
|
|
86
85
|
containers: Containers;
|
|
@@ -194,12 +193,6 @@ interface ObservableLink {
|
|
|
194
193
|
observable_key: string;
|
|
195
194
|
propagation_mode?: PropagationMode;
|
|
196
195
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Check keys organized by level name.
|
|
199
|
-
*/
|
|
200
|
-
interface ChecksByLevel {
|
|
201
|
-
[k: string]: string[];
|
|
202
|
-
}
|
|
203
196
|
/**
|
|
204
197
|
* Threat intelligence entries keyed by their unique key.
|
|
205
198
|
*/
|
|
@@ -297,7 +290,7 @@ interface StatisticsSchema {
|
|
|
297
290
|
total_checks: number;
|
|
298
291
|
applied_checks: number;
|
|
299
292
|
checks_by_scope?: ChecksByScope;
|
|
300
|
-
checks_by_level?:
|
|
293
|
+
checks_by_level?: ChecksByLevel;
|
|
301
294
|
total_threat_intel: number;
|
|
302
295
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
303
296
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
@@ -315,10 +308,10 @@ interface ObservablesByTypeAndLevel {
|
|
|
315
308
|
};
|
|
316
309
|
}
|
|
317
310
|
interface ChecksByScope {
|
|
318
|
-
[k: string]:
|
|
311
|
+
[k: string]: string[];
|
|
319
312
|
}
|
|
320
|
-
interface
|
|
321
|
-
[k: string]:
|
|
313
|
+
interface ChecksByLevel {
|
|
314
|
+
[k: string]: string[];
|
|
322
315
|
}
|
|
323
316
|
interface ThreatIntelBySource {
|
|
324
317
|
[k: string]: number;
|
|
@@ -1362,4 +1355,4 @@ declare function getRelationshipsForObservable(inv: CyvestInvestigation, observa
|
|
|
1362
1355
|
}>;
|
|
1363
1356
|
};
|
|
1364
1357
|
|
|
1365
|
-
export { type Actor, type AuditEvent, type Check, type CheckLinks, type Checks, type Checks1, type ChecksByLevel, type
|
|
1358
|
+
export { type Actor, type AuditEvent, 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 EventLog, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,7 +80,6 @@ interface CyvestInvestigation {
|
|
|
80
80
|
event_log?: EventLog;
|
|
81
81
|
observables: Observables;
|
|
82
82
|
checks: Checks;
|
|
83
|
-
checks_by_level: ChecksByLevel;
|
|
84
83
|
threat_intels: ThreatIntels1;
|
|
85
84
|
enrichments: Enrichments;
|
|
86
85
|
containers: Containers;
|
|
@@ -194,12 +193,6 @@ interface ObservableLink {
|
|
|
194
193
|
observable_key: string;
|
|
195
194
|
propagation_mode?: PropagationMode;
|
|
196
195
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Check keys organized by level name.
|
|
199
|
-
*/
|
|
200
|
-
interface ChecksByLevel {
|
|
201
|
-
[k: string]: string[];
|
|
202
|
-
}
|
|
203
196
|
/**
|
|
204
197
|
* Threat intelligence entries keyed by their unique key.
|
|
205
198
|
*/
|
|
@@ -297,7 +290,7 @@ interface StatisticsSchema {
|
|
|
297
290
|
total_checks: number;
|
|
298
291
|
applied_checks: number;
|
|
299
292
|
checks_by_scope?: ChecksByScope;
|
|
300
|
-
checks_by_level?:
|
|
293
|
+
checks_by_level?: ChecksByLevel;
|
|
301
294
|
total_threat_intel: number;
|
|
302
295
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
303
296
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
@@ -315,10 +308,10 @@ interface ObservablesByTypeAndLevel {
|
|
|
315
308
|
};
|
|
316
309
|
}
|
|
317
310
|
interface ChecksByScope {
|
|
318
|
-
[k: string]:
|
|
311
|
+
[k: string]: string[];
|
|
319
312
|
}
|
|
320
|
-
interface
|
|
321
|
-
[k: string]:
|
|
313
|
+
interface ChecksByLevel {
|
|
314
|
+
[k: string]: string[];
|
|
322
315
|
}
|
|
323
316
|
interface ThreatIntelBySource {
|
|
324
317
|
[k: string]: number;
|
|
@@ -1362,4 +1355,4 @@ declare function getRelationshipsForObservable(inv: CyvestInvestigation, observa
|
|
|
1362
1355
|
}>;
|
|
1363
1356
|
};
|
|
1364
1357
|
|
|
1365
|
-
export { type Actor, type AuditEvent, type Check, type CheckLinks, type Checks, type Checks1, type ChecksByLevel, type
|
|
1358
|
+
export { type Actor, type AuditEvent, 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 EventLog, 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -676,16 +676,20 @@ var cyvest_schema_default = {
|
|
|
676
676
|
},
|
|
677
677
|
checks_by_scope: {
|
|
678
678
|
additionalProperties: {
|
|
679
|
-
|
|
680
|
-
|
|
679
|
+
items: {
|
|
680
|
+
type: "string"
|
|
681
|
+
},
|
|
682
|
+
type: "array"
|
|
681
683
|
},
|
|
682
684
|
title: "Checks By Scope",
|
|
683
685
|
type: "object"
|
|
684
686
|
},
|
|
685
687
|
checks_by_level: {
|
|
686
688
|
additionalProperties: {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
+
items: {
|
|
690
|
+
type: "string"
|
|
691
|
+
},
|
|
692
|
+
type: "array"
|
|
689
693
|
},
|
|
690
694
|
title: "Checks By Level",
|
|
691
695
|
type: "object"
|
|
@@ -891,17 +895,6 @@ var cyvest_schema_default = {
|
|
|
891
895
|
title: "Checks",
|
|
892
896
|
type: "object"
|
|
893
897
|
},
|
|
894
|
-
checks_by_level: {
|
|
895
|
-
additionalProperties: {
|
|
896
|
-
items: {
|
|
897
|
-
type: "string"
|
|
898
|
-
},
|
|
899
|
-
type: "array"
|
|
900
|
-
},
|
|
901
|
-
description: "Check keys organized by level name.",
|
|
902
|
-
title: "Checks By Level",
|
|
903
|
-
type: "object"
|
|
904
|
-
},
|
|
905
898
|
threat_intels: {
|
|
906
899
|
additionalProperties: {
|
|
907
900
|
$ref: "#/$defs/ThreatIntel"
|
|
@@ -950,7 +943,6 @@ var cyvest_schema_default = {
|
|
|
950
943
|
"whitelists",
|
|
951
944
|
"observables",
|
|
952
945
|
"checks",
|
|
953
|
-
"checks_by_level",
|
|
954
946
|
"threat_intels",
|
|
955
947
|
"enrichments",
|
|
956
948
|
"containers",
|
package/dist/index.mjs
CHANGED
|
@@ -543,16 +543,20 @@ var cyvest_schema_default = {
|
|
|
543
543
|
},
|
|
544
544
|
checks_by_scope: {
|
|
545
545
|
additionalProperties: {
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
items: {
|
|
547
|
+
type: "string"
|
|
548
|
+
},
|
|
549
|
+
type: "array"
|
|
548
550
|
},
|
|
549
551
|
title: "Checks By Scope",
|
|
550
552
|
type: "object"
|
|
551
553
|
},
|
|
552
554
|
checks_by_level: {
|
|
553
555
|
additionalProperties: {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
+
items: {
|
|
557
|
+
type: "string"
|
|
558
|
+
},
|
|
559
|
+
type: "array"
|
|
556
560
|
},
|
|
557
561
|
title: "Checks By Level",
|
|
558
562
|
type: "object"
|
|
@@ -758,17 +762,6 @@ var cyvest_schema_default = {
|
|
|
758
762
|
title: "Checks",
|
|
759
763
|
type: "object"
|
|
760
764
|
},
|
|
761
|
-
checks_by_level: {
|
|
762
|
-
additionalProperties: {
|
|
763
|
-
items: {
|
|
764
|
-
type: "string"
|
|
765
|
-
},
|
|
766
|
-
type: "array"
|
|
767
|
-
},
|
|
768
|
-
description: "Check keys organized by level name.",
|
|
769
|
-
title: "Checks By Level",
|
|
770
|
-
type: "object"
|
|
771
|
-
},
|
|
772
765
|
threat_intels: {
|
|
773
766
|
additionalProperties: {
|
|
774
767
|
$ref: "#/$defs/ThreatIntel"
|
|
@@ -817,7 +810,6 @@ var cyvest_schema_default = {
|
|
|
817
810
|
"whitelists",
|
|
818
811
|
"observables",
|
|
819
812
|
"checks",
|
|
820
|
-
"checks_by_level",
|
|
821
813
|
"threat_intels",
|
|
822
814
|
"enrichments",
|
|
823
815
|
"containers",
|
package/package.json
CHANGED
package/src/types.generated.ts
CHANGED
|
@@ -83,7 +83,6 @@ export interface CyvestInvestigation {
|
|
|
83
83
|
event_log?: EventLog;
|
|
84
84
|
observables: Observables;
|
|
85
85
|
checks: Checks;
|
|
86
|
-
checks_by_level: ChecksByLevel;
|
|
87
86
|
threat_intels: ThreatIntels1;
|
|
88
87
|
enrichments: Enrichments;
|
|
89
88
|
containers: Containers;
|
|
@@ -197,12 +196,6 @@ export interface ObservableLink {
|
|
|
197
196
|
observable_key: string;
|
|
198
197
|
propagation_mode?: PropagationMode;
|
|
199
198
|
}
|
|
200
|
-
/**
|
|
201
|
-
* Check keys organized by level name.
|
|
202
|
-
*/
|
|
203
|
-
export interface ChecksByLevel {
|
|
204
|
-
[k: string]: string[];
|
|
205
|
-
}
|
|
206
199
|
/**
|
|
207
200
|
* Threat intelligence entries keyed by their unique key.
|
|
208
201
|
*/
|
|
@@ -300,7 +293,7 @@ export interface StatisticsSchema {
|
|
|
300
293
|
total_checks: number;
|
|
301
294
|
applied_checks: number;
|
|
302
295
|
checks_by_scope?: ChecksByScope;
|
|
303
|
-
checks_by_level?:
|
|
296
|
+
checks_by_level?: ChecksByLevel;
|
|
304
297
|
total_threat_intel: number;
|
|
305
298
|
threat_intel_by_source?: ThreatIntelBySource;
|
|
306
299
|
threat_intel_by_level?: ThreatIntelByLevel;
|
|
@@ -318,10 +311,10 @@ export interface ObservablesByTypeAndLevel {
|
|
|
318
311
|
};
|
|
319
312
|
}
|
|
320
313
|
export interface ChecksByScope {
|
|
321
|
-
[k: string]:
|
|
314
|
+
[k: string]: string[];
|
|
322
315
|
}
|
|
323
|
-
export interface
|
|
324
|
-
[k: string]:
|
|
316
|
+
export interface ChecksByLevel {
|
|
317
|
+
[k: string]: string[];
|
|
325
318
|
}
|
|
326
319
|
export interface ThreatIntelBySource {
|
|
327
320
|
[k: string]: number;
|
|
@@ -176,10 +176,6 @@ function createTestInvestigation(): CyvestInvestigation {
|
|
|
176
176
|
},
|
|
177
177
|
],
|
|
178
178
|
},
|
|
179
|
-
checks_by_level: {
|
|
180
|
-
INFO: ["chk:ip_check:network", "chk:dns_lookup:dns"],
|
|
181
|
-
MALICIOUS: ["chk:domain_check:dns"],
|
|
182
|
-
},
|
|
183
179
|
threat_intels: {
|
|
184
180
|
"ti:virustotal:obs:domain-name:example.com": {
|
|
185
181
|
key: "ti:virustotal:obs:domain-name:example.com",
|
|
@@ -232,8 +228,8 @@ function createTestInvestigation(): CyvestInvestigation {
|
|
|
232
228
|
observables_by_type_and_level: {},
|
|
233
229
|
total_checks: 3,
|
|
234
230
|
applied_checks: 2,
|
|
235
|
-
checks_by_scope: { network:
|
|
236
|
-
checks_by_level: { INFO:
|
|
231
|
+
checks_by_scope: { network: ["chk:ip_check:network"], dns: ["chk:domain_check:dns", "chk:dns_lookup:dns"] },
|
|
232
|
+
checks_by_level: { INFO: ["chk:ip_check:network", "chk:dns_lookup:dns"], MALICIOUS: ["chk:domain_check:dns"] },
|
|
237
233
|
total_threat_intel: 1,
|
|
238
234
|
threat_intel_by_source: { virustotal: 1 },
|
|
239
235
|
threat_intel_by_level: { MALICIOUS: 1 },
|