@cyvest/cyvest-js 3.2.0 → 4.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.mts +53 -16
- package/dist/index.d.ts +53 -16
- package/dist/index.js +184 -36
- package/dist/index.mjs +184 -35
- package/package.json +5 -5
- package/src/finders.ts +29 -20
- package/src/types.generated.ts +52 -8
- package/tests/getters-finders.test.ts +38 -18
- package/tests/graph.test.ts +19 -10
- package/vitest.config.ts +8 -0
package/tests/graph.test.ts
CHANGED
|
@@ -20,7 +20,11 @@ import {
|
|
|
20
20
|
// Test fixture with relationships
|
|
21
21
|
function createGraphTestInvestigation(): CyvestInvestigation {
|
|
22
22
|
return {
|
|
23
|
+
investigation_id: "01HXYZGRAPHINVESTIGATION",
|
|
24
|
+
investigation_name: "Graph Test Investigation",
|
|
25
|
+
started_at: "2024-01-01T00:00:00Z",
|
|
23
26
|
score: 5,
|
|
27
|
+
score_display: "5.00",
|
|
24
28
|
level: "MALICIOUS",
|
|
25
29
|
whitelisted: false,
|
|
26
30
|
whitelists: [],
|
|
@@ -32,8 +36,9 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
32
36
|
internal: false,
|
|
33
37
|
whitelisted: false,
|
|
34
38
|
comment: "",
|
|
35
|
-
extra:
|
|
39
|
+
extra: {},
|
|
36
40
|
score: 0,
|
|
41
|
+
score_display: "0.00",
|
|
37
42
|
level: "INFO",
|
|
38
43
|
relationships: [
|
|
39
44
|
{
|
|
@@ -48,7 +53,7 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
48
53
|
},
|
|
49
54
|
],
|
|
50
55
|
threat_intels: [],
|
|
51
|
-
|
|
56
|
+
check_links: [],
|
|
52
57
|
},
|
|
53
58
|
"obs:email-addr:sender@example.com": {
|
|
54
59
|
key: "obs:email-addr:sender@example.com",
|
|
@@ -57,8 +62,9 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
57
62
|
internal: false,
|
|
58
63
|
whitelisted: false,
|
|
59
64
|
comment: "",
|
|
60
|
-
extra:
|
|
65
|
+
extra: {},
|
|
61
66
|
score: 0,
|
|
67
|
+
score_display: "0.00",
|
|
62
68
|
level: "INFO",
|
|
63
69
|
relationships: [
|
|
64
70
|
{
|
|
@@ -68,7 +74,7 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
68
74
|
},
|
|
69
75
|
],
|
|
70
76
|
threat_intels: [],
|
|
71
|
-
|
|
77
|
+
check_links: [],
|
|
72
78
|
},
|
|
73
79
|
"obs:ipv4-addr:192.168.1.1": {
|
|
74
80
|
key: "obs:ipv4-addr:192.168.1.1",
|
|
@@ -77,12 +83,13 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
77
83
|
internal: true,
|
|
78
84
|
whitelisted: false,
|
|
79
85
|
comment: "",
|
|
80
|
-
extra:
|
|
86
|
+
extra: {},
|
|
81
87
|
score: 0,
|
|
88
|
+
score_display: "0.00",
|
|
82
89
|
level: "INFO",
|
|
83
90
|
relationships: [],
|
|
84
91
|
threat_intels: [],
|
|
85
|
-
|
|
92
|
+
check_links: [],
|
|
86
93
|
},
|
|
87
94
|
"obs:domain-name:example.com": {
|
|
88
95
|
key: "obs:domain-name:example.com",
|
|
@@ -91,12 +98,13 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
91
98
|
internal: false,
|
|
92
99
|
whitelisted: false,
|
|
93
100
|
comment: "",
|
|
94
|
-
extra:
|
|
101
|
+
extra: {},
|
|
95
102
|
score: 5,
|
|
103
|
+
score_display: "5.00",
|
|
96
104
|
level: "MALICIOUS",
|
|
97
105
|
relationships: [],
|
|
98
106
|
threat_intels: [],
|
|
99
|
-
|
|
107
|
+
check_links: [],
|
|
100
108
|
},
|
|
101
109
|
"obs:file-hash:abc123": {
|
|
102
110
|
key: "obs:file-hash:abc123",
|
|
@@ -105,12 +113,13 @@ function createGraphTestInvestigation(): CyvestInvestigation {
|
|
|
105
113
|
internal: false,
|
|
106
114
|
whitelisted: false,
|
|
107
115
|
comment: "",
|
|
108
|
-
extra:
|
|
116
|
+
extra: {},
|
|
109
117
|
score: 3,
|
|
118
|
+
score_display: "3.00",
|
|
110
119
|
level: "SUSPICIOUS",
|
|
111
120
|
relationships: [],
|
|
112
121
|
threat_intels: [],
|
|
113
|
-
|
|
122
|
+
check_links: [],
|
|
114
123
|
},
|
|
115
124
|
},
|
|
116
125
|
checks: {},
|