@ampsec/platform-client 62.19.0 → 62.21.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/build/src/dto/enums/findingKind.d.ts +4 -0
- package/build/src/dto/enums/findingKind.js +63 -1
- package/build/src/dto/enums/findingKind.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +269 -1
- package/build/src/dto/findings.dto.js +28 -1
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/platform/platform.findings.dto.d.ts +268 -0
- package/package.json +1 -1
- package/src/dto/enums/findingKind.ts +62 -0
- package/src/dto/findings.dto.ts +27 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FindingOutcome } from './finding.outcome';
|
|
2
|
+
import { FindingSeverity } from './finding.severity';
|
|
2
3
|
export declare enum FindingKind {
|
|
3
4
|
NO_ACCOUNT = "NO_ACCOUNT",
|
|
4
5
|
MFA_NOT_ENABLED = "MFA_NOT_ENABLED",
|
|
@@ -12,3 +13,6 @@ export declare enum FindingKind {
|
|
|
12
13
|
WEB_GATEWAY_NOT_ACTIVE = "WEB_GATEWAY_NOT_ACTIVE"
|
|
13
14
|
}
|
|
14
15
|
export declare const lookupFindingOutcomeByKind: (kind: FindingKind) => FindingOutcome;
|
|
16
|
+
export declare const lookupFindingKindByCategory: (category: string) => FindingKind[];
|
|
17
|
+
export declare const lookupFindingSeverityByKind: (kind: string) => FindingSeverity | undefined;
|
|
18
|
+
export declare const lookupFindingDisplayValueByKind: (kind: string) => string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lookupFindingOutcomeByKind = exports.FindingKind = void 0;
|
|
3
|
+
exports.lookupFindingDisplayValueByKind = exports.lookupFindingSeverityByKind = exports.lookupFindingKindByCategory = exports.lookupFindingOutcomeByKind = exports.FindingKind = void 0;
|
|
4
|
+
const category_1 = require("./category");
|
|
4
5
|
const finding_outcome_1 = require("./finding.outcome");
|
|
6
|
+
const finding_severity_1 = require("./finding.severity");
|
|
5
7
|
var FindingKind;
|
|
6
8
|
(function (FindingKind) {
|
|
7
9
|
// ALL
|
|
@@ -44,4 +46,64 @@ const lookupFindingOutcomeByKind = (kind) => {
|
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
48
|
exports.lookupFindingOutcomeByKind = lookupFindingOutcomeByKind;
|
|
49
|
+
const lookupFindingKindByCategory = (category) => {
|
|
50
|
+
switch (category) {
|
|
51
|
+
case category_1.Category.IDENTITY: {
|
|
52
|
+
return [FindingKind.MFA_NOT_ENABLED, FindingKind.IS_EXECUTIVE, FindingKind.HAS_PRODUCTION_ACCESS, FindingKind.HAS_PRIVILEGED_ACCESS];
|
|
53
|
+
}
|
|
54
|
+
case category_1.Category.TRAINING: {
|
|
55
|
+
return [FindingKind.FAILED_PHISHING, FindingKind.TRAINING_OVERDUE];
|
|
56
|
+
}
|
|
57
|
+
case category_1.Category.EDR: {
|
|
58
|
+
return [FindingKind.DEVICE_NOT_MANAGED];
|
|
59
|
+
}
|
|
60
|
+
case category_1.Category.WEB_GATEWAY: {
|
|
61
|
+
return [FindingKind.WEB_GATEWAY_NOT_ACTIVE];
|
|
62
|
+
}
|
|
63
|
+
case category_1.Category.VULNERABILITY: {
|
|
64
|
+
return [FindingKind.VULNERABILITY_OUT_OF_SLA];
|
|
65
|
+
}
|
|
66
|
+
case category_1.Category.NOTIFICATION: {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
default: {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.lookupFindingKindByCategory = lookupFindingKindByCategory;
|
|
75
|
+
const lookupFindingSeverityByKind = (kind) => {
|
|
76
|
+
switch (kind) {
|
|
77
|
+
case FindingKind.MFA_NOT_ENABLED:
|
|
78
|
+
case FindingKind.IS_EXECUTIVE:
|
|
79
|
+
case FindingKind.HAS_PRODUCTION_ACCESS:
|
|
80
|
+
case FindingKind.HAS_PRIVILEGED_ACCESS:
|
|
81
|
+
case FindingKind.DEVICE_NOT_MANAGED:
|
|
82
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
83
|
+
case FindingKind.VULNERABILITY_OUT_OF_SLA: {
|
|
84
|
+
return finding_severity_1.FindingSeverity.HIGH;
|
|
85
|
+
}
|
|
86
|
+
case FindingKind.FAILED_PHISHING:
|
|
87
|
+
case FindingKind.TRAINING_OVERDUE: {
|
|
88
|
+
return finding_severity_1.FindingSeverity.MEDIUM;
|
|
89
|
+
}
|
|
90
|
+
default: {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
exports.lookupFindingSeverityByKind = lookupFindingSeverityByKind;
|
|
96
|
+
const lookupFindingDisplayValueByKind = (kind) => {
|
|
97
|
+
switch (kind) {
|
|
98
|
+
case FindingKind.FAILED_PHISHING:
|
|
99
|
+
return 'health_training_failed_phishing';
|
|
100
|
+
case FindingKind.TRAINING_OVERDUE:
|
|
101
|
+
return 'health_training_missed_training';
|
|
102
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
103
|
+
return 'web_gateway_not_logged_in';
|
|
104
|
+
default:
|
|
105
|
+
return kind.toLowerCase();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
exports.lookupFindingDisplayValueByKind = lookupFindingDisplayValueByKind;
|
|
47
109
|
//# sourceMappingURL=findingKind.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;
|
|
1
|
+
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,uDAAiD;AACjD,yDAAmD;AAEnD,IAAY,WAoBX;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AAO,kCAAe,CAAC,IAAI,CAAC;QAC9B,CAAC;QACD,KAAK,WAAW,CAAC,eAAe,CAAC;QACjC,KAAK,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAClC,OAAO,kCAAe,CAAC,MAAM,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAnBW,QAAA,2BAA2B,+BAmBtC;AAEK,MAAM,+BAA+B,GAAG,CAAC,IAAY,EAAU,EAAE;IACtE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW,CAAC,eAAe;YAC9B,OAAO,iCAAiC,CAAC;QAC3C,KAAK,WAAW,CAAC,gBAAgB;YAC/B,OAAO,iCAAiC,CAAC;QAC3C,KAAK,WAAW,CAAC,sBAAsB;YACrC,OAAO,2BAA2B,CAAC;QACrC;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,+BAA+B,mCAW1C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SimpleAssetDto } from './assets.dto';
|
|
3
3
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
4
|
-
import { Category, FindingKind } from './enums';
|
|
4
|
+
import { Category, FindingKind, SaasComponentKind } from './enums';
|
|
5
5
|
import { FindingOutcome, FindingSeverity, FindingStatus } from './enums';
|
|
6
6
|
import { SimpleProviderDto } from './providers.dto';
|
|
7
7
|
import { SaasComponentMeta } from './saasComponents.dto';
|
|
@@ -65,6 +65,100 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
65
65
|
eventType: z.ZodString;
|
|
66
66
|
description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
|
|
67
67
|
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
68
|
+
insights: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
meta: z.ZodObject<{
|
|
70
|
+
kind: z.ZodNativeEnum<typeof FindingKind>;
|
|
71
|
+
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
72
|
+
displayValue: z.ZodString;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
displayValue: string;
|
|
75
|
+
kind: FindingKind;
|
|
76
|
+
severity: FindingSeverity;
|
|
77
|
+
}, {
|
|
78
|
+
displayValue: string;
|
|
79
|
+
kind: FindingKind;
|
|
80
|
+
severity: FindingSeverity;
|
|
81
|
+
}>;
|
|
82
|
+
rule: z.ZodObject<{
|
|
83
|
+
category: z.ZodNativeEnum<typeof Category>;
|
|
84
|
+
kind: z.ZodNativeEnum<typeof SaasComponentKind>;
|
|
85
|
+
aid: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
$has: z.ZodBoolean;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
$has: boolean;
|
|
89
|
+
}, {
|
|
90
|
+
$has: boolean;
|
|
91
|
+
}>>;
|
|
92
|
+
uid: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
$has: z.ZodBoolean;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
$has: boolean;
|
|
96
|
+
}, {
|
|
97
|
+
$has: boolean;
|
|
98
|
+
}>>;
|
|
99
|
+
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
100
|
+
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
kind: SaasComponentKind;
|
|
103
|
+
category: Category;
|
|
104
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
105
|
+
aid?: {
|
|
106
|
+
$has: boolean;
|
|
107
|
+
} | undefined;
|
|
108
|
+
uid?: {
|
|
109
|
+
$has: boolean;
|
|
110
|
+
} | undefined;
|
|
111
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
kind: SaasComponentKind;
|
|
114
|
+
category: Category;
|
|
115
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
116
|
+
aid?: {
|
|
117
|
+
$has: boolean;
|
|
118
|
+
} | undefined;
|
|
119
|
+
uid?: {
|
|
120
|
+
$has: boolean;
|
|
121
|
+
} | undefined;
|
|
122
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
meta: {
|
|
126
|
+
displayValue: string;
|
|
127
|
+
kind: FindingKind;
|
|
128
|
+
severity: FindingSeverity;
|
|
129
|
+
};
|
|
130
|
+
rule: {
|
|
131
|
+
kind: SaasComponentKind;
|
|
132
|
+
category: Category;
|
|
133
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
134
|
+
aid?: {
|
|
135
|
+
$has: boolean;
|
|
136
|
+
} | undefined;
|
|
137
|
+
uid?: {
|
|
138
|
+
$has: boolean;
|
|
139
|
+
} | undefined;
|
|
140
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
141
|
+
};
|
|
142
|
+
}, {
|
|
143
|
+
meta: {
|
|
144
|
+
displayValue: string;
|
|
145
|
+
kind: FindingKind;
|
|
146
|
+
severity: FindingSeverity;
|
|
147
|
+
};
|
|
148
|
+
rule: {
|
|
149
|
+
kind: SaasComponentKind;
|
|
150
|
+
category: Category;
|
|
151
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
152
|
+
aid?: {
|
|
153
|
+
$has: boolean;
|
|
154
|
+
} | undefined;
|
|
155
|
+
uid?: {
|
|
156
|
+
$has: boolean;
|
|
157
|
+
} | undefined;
|
|
158
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
159
|
+
};
|
|
160
|
+
}>>;
|
|
161
|
+
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
68
162
|
}, "strip", z.ZodTypeAny, {
|
|
69
163
|
name: string;
|
|
70
164
|
id: string;
|
|
@@ -76,6 +170,26 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
76
170
|
severity: FindingSeverity;
|
|
77
171
|
cid?: string | undefined;
|
|
78
172
|
description?: unknown;
|
|
173
|
+
insights?: {
|
|
174
|
+
meta: {
|
|
175
|
+
displayValue: string;
|
|
176
|
+
kind: FindingKind;
|
|
177
|
+
severity: FindingSeverity;
|
|
178
|
+
};
|
|
179
|
+
rule: {
|
|
180
|
+
kind: SaasComponentKind;
|
|
181
|
+
category: Category;
|
|
182
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
183
|
+
aid?: {
|
|
184
|
+
$has: boolean;
|
|
185
|
+
} | undefined;
|
|
186
|
+
uid?: {
|
|
187
|
+
$has: boolean;
|
|
188
|
+
} | undefined;
|
|
189
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
190
|
+
};
|
|
191
|
+
} | undefined;
|
|
192
|
+
expireAfterDays?: number | null | undefined;
|
|
79
193
|
}, {
|
|
80
194
|
name: string;
|
|
81
195
|
id: string;
|
|
@@ -87,6 +201,26 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
87
201
|
severity: FindingSeverity;
|
|
88
202
|
cid?: string | undefined;
|
|
89
203
|
description?: unknown;
|
|
204
|
+
insights?: {
|
|
205
|
+
meta: {
|
|
206
|
+
displayValue: string;
|
|
207
|
+
kind: FindingKind;
|
|
208
|
+
severity: FindingSeverity;
|
|
209
|
+
};
|
|
210
|
+
rule: {
|
|
211
|
+
kind: SaasComponentKind;
|
|
212
|
+
category: Category;
|
|
213
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
214
|
+
aid?: {
|
|
215
|
+
$has: boolean;
|
|
216
|
+
} | undefined;
|
|
217
|
+
uid?: {
|
|
218
|
+
$has: boolean;
|
|
219
|
+
} | undefined;
|
|
220
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
221
|
+
};
|
|
222
|
+
} | undefined;
|
|
223
|
+
expireAfterDays?: number | null | undefined;
|
|
90
224
|
}>;
|
|
91
225
|
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
92
226
|
export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
@@ -100,6 +234,100 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
100
234
|
displayValue: z.ZodString;
|
|
101
235
|
eventType: z.ZodString;
|
|
102
236
|
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
237
|
+
insights: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
meta: z.ZodObject<{
|
|
239
|
+
kind: z.ZodNativeEnum<typeof FindingKind>;
|
|
240
|
+
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
241
|
+
displayValue: z.ZodString;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
displayValue: string;
|
|
244
|
+
kind: FindingKind;
|
|
245
|
+
severity: FindingSeverity;
|
|
246
|
+
}, {
|
|
247
|
+
displayValue: string;
|
|
248
|
+
kind: FindingKind;
|
|
249
|
+
severity: FindingSeverity;
|
|
250
|
+
}>;
|
|
251
|
+
rule: z.ZodObject<{
|
|
252
|
+
category: z.ZodNativeEnum<typeof Category>;
|
|
253
|
+
kind: z.ZodNativeEnum<typeof SaasComponentKind>;
|
|
254
|
+
aid: z.ZodOptional<z.ZodObject<{
|
|
255
|
+
$has: z.ZodBoolean;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
$has: boolean;
|
|
258
|
+
}, {
|
|
259
|
+
$has: boolean;
|
|
260
|
+
}>>;
|
|
261
|
+
uid: z.ZodOptional<z.ZodObject<{
|
|
262
|
+
$has: z.ZodBoolean;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
$has: boolean;
|
|
265
|
+
}, {
|
|
266
|
+
$has: boolean;
|
|
267
|
+
}>>;
|
|
268
|
+
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
269
|
+
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
kind: SaasComponentKind;
|
|
272
|
+
category: Category;
|
|
273
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
274
|
+
aid?: {
|
|
275
|
+
$has: boolean;
|
|
276
|
+
} | undefined;
|
|
277
|
+
uid?: {
|
|
278
|
+
$has: boolean;
|
|
279
|
+
} | undefined;
|
|
280
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
kind: SaasComponentKind;
|
|
283
|
+
category: Category;
|
|
284
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
285
|
+
aid?: {
|
|
286
|
+
$has: boolean;
|
|
287
|
+
} | undefined;
|
|
288
|
+
uid?: {
|
|
289
|
+
$has: boolean;
|
|
290
|
+
} | undefined;
|
|
291
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
292
|
+
}>;
|
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
|
294
|
+
meta: {
|
|
295
|
+
displayValue: string;
|
|
296
|
+
kind: FindingKind;
|
|
297
|
+
severity: FindingSeverity;
|
|
298
|
+
};
|
|
299
|
+
rule: {
|
|
300
|
+
kind: SaasComponentKind;
|
|
301
|
+
category: Category;
|
|
302
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
303
|
+
aid?: {
|
|
304
|
+
$has: boolean;
|
|
305
|
+
} | undefined;
|
|
306
|
+
uid?: {
|
|
307
|
+
$has: boolean;
|
|
308
|
+
} | undefined;
|
|
309
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
310
|
+
};
|
|
311
|
+
}, {
|
|
312
|
+
meta: {
|
|
313
|
+
displayValue: string;
|
|
314
|
+
kind: FindingKind;
|
|
315
|
+
severity: FindingSeverity;
|
|
316
|
+
};
|
|
317
|
+
rule: {
|
|
318
|
+
kind: SaasComponentKind;
|
|
319
|
+
category: Category;
|
|
320
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
321
|
+
aid?: {
|
|
322
|
+
$has: boolean;
|
|
323
|
+
} | undefined;
|
|
324
|
+
uid?: {
|
|
325
|
+
$has: boolean;
|
|
326
|
+
} | undefined;
|
|
327
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
328
|
+
};
|
|
329
|
+
}>>;
|
|
330
|
+
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
331
|
}, "strip", z.ZodTypeAny, {
|
|
104
332
|
name: string;
|
|
105
333
|
displayValue: string;
|
|
@@ -111,6 +339,26 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
111
339
|
createdAt?: string | undefined;
|
|
112
340
|
updatedAt?: string | undefined;
|
|
113
341
|
deletedAt?: string | null | undefined;
|
|
342
|
+
insights?: {
|
|
343
|
+
meta: {
|
|
344
|
+
displayValue: string;
|
|
345
|
+
kind: FindingKind;
|
|
346
|
+
severity: FindingSeverity;
|
|
347
|
+
};
|
|
348
|
+
rule: {
|
|
349
|
+
kind: SaasComponentKind;
|
|
350
|
+
category: Category;
|
|
351
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
352
|
+
aid?: {
|
|
353
|
+
$has: boolean;
|
|
354
|
+
} | undefined;
|
|
355
|
+
uid?: {
|
|
356
|
+
$has: boolean;
|
|
357
|
+
} | undefined;
|
|
358
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
359
|
+
};
|
|
360
|
+
} | undefined;
|
|
361
|
+
expireAfterDays?: number | null | undefined;
|
|
114
362
|
}, {
|
|
115
363
|
name: string;
|
|
116
364
|
displayValue: string;
|
|
@@ -122,6 +370,26 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
122
370
|
createdAt?: string | undefined;
|
|
123
371
|
updatedAt?: string | undefined;
|
|
124
372
|
deletedAt?: string | null | undefined;
|
|
373
|
+
insights?: {
|
|
374
|
+
meta: {
|
|
375
|
+
displayValue: string;
|
|
376
|
+
kind: FindingKind;
|
|
377
|
+
severity: FindingSeverity;
|
|
378
|
+
};
|
|
379
|
+
rule: {
|
|
380
|
+
kind: SaasComponentKind;
|
|
381
|
+
category: Category;
|
|
382
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
383
|
+
aid?: {
|
|
384
|
+
$has: boolean;
|
|
385
|
+
} | undefined;
|
|
386
|
+
uid?: {
|
|
387
|
+
$has: boolean;
|
|
388
|
+
} | undefined;
|
|
389
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
390
|
+
};
|
|
391
|
+
} | undefined;
|
|
392
|
+
expireAfterDays?: number | null | undefined;
|
|
125
393
|
}>;
|
|
126
394
|
export type FindingSpecUpsertDto = z.infer<typeof _FindingSpecUpsertDto>;
|
|
127
395
|
export declare const _FindingSummaryDto: z.ZodObject<{
|
|
@@ -4,6 +4,7 @@ exports._FindingSummaryDto = exports._FindingSpecUpsertDto = exports._FindingSpe
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
const enums_1 = require("./enums");
|
|
7
|
+
const enums_2 = require("./enums");
|
|
7
8
|
const _FindingSpecDescription = zod_1.z.unknown();
|
|
8
9
|
exports._FindingSpecDto = base_dto_1._BaseDto.extend({
|
|
9
10
|
cid: zod_1.z.string().optional(),
|
|
@@ -11,7 +12,33 @@ exports._FindingSpecDto = base_dto_1._BaseDto.extend({
|
|
|
11
12
|
displayValue: zod_1.z.string(),
|
|
12
13
|
eventType: zod_1.z.string(),
|
|
13
14
|
description: zod_1.z.union([zod_1.z.string(), _FindingSpecDescription]),
|
|
14
|
-
severity: zod_1.z.nativeEnum(
|
|
15
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
16
|
+
insights: zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
meta: zod_1.z.object({
|
|
19
|
+
kind: zod_1.z.nativeEnum(enums_1.FindingKind),
|
|
20
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
21
|
+
displayValue: zod_1.z.string(),
|
|
22
|
+
}),
|
|
23
|
+
rule: zod_1.z.object({
|
|
24
|
+
category: zod_1.z.nativeEnum(enums_1.Category),
|
|
25
|
+
kind: zod_1.z.nativeEnum(enums_1.SaasComponentKind),
|
|
26
|
+
aid: zod_1.z
|
|
27
|
+
.object({
|
|
28
|
+
$has: zod_1.z.boolean(),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
31
|
+
uid: zod_1.z
|
|
32
|
+
.object({
|
|
33
|
+
$has: zod_1.z.boolean(),
|
|
34
|
+
})
|
|
35
|
+
.optional(),
|
|
36
|
+
findingCondition: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.boolean(), zod_1.z.string(), zod_1.z.number(), zod_1.z.undefined()])),
|
|
37
|
+
remediatedCondition: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.boolean(), zod_1.z.string(), zod_1.z.number(), zod_1.z.undefined()])).optional(),
|
|
38
|
+
}),
|
|
39
|
+
})
|
|
40
|
+
.optional(),
|
|
41
|
+
expireAfterDays: zod_1.z.nullable(zod_1.z.number()).optional(),
|
|
15
42
|
});
|
|
16
43
|
exports._FindingSpecUpsertDto = exports._FindingSpecDto.partial({
|
|
17
44
|
id: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.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;
|
|
16
16
|
severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
|
|
17
|
+
insights: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
meta: z.ZodObject<{
|
|
19
|
+
kind: z.ZodNativeEnum<typeof import("..").FindingKind>;
|
|
20
|
+
severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
|
|
21
|
+
displayValue: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
displayValue: string;
|
|
24
|
+
kind: import("..").FindingKind;
|
|
25
|
+
severity: import("..").FindingSeverity;
|
|
26
|
+
}, {
|
|
27
|
+
displayValue: string;
|
|
28
|
+
kind: import("..").FindingKind;
|
|
29
|
+
severity: import("..").FindingSeverity;
|
|
30
|
+
}>;
|
|
31
|
+
rule: z.ZodObject<{
|
|
32
|
+
category: z.ZodNativeEnum<typeof import("..").Category>;
|
|
33
|
+
kind: z.ZodNativeEnum<typeof import("..").SaasComponentKind>;
|
|
34
|
+
aid: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
$has: z.ZodBoolean;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
$has: boolean;
|
|
38
|
+
}, {
|
|
39
|
+
$has: boolean;
|
|
40
|
+
}>>;
|
|
41
|
+
uid: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
$has: z.ZodBoolean;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
$has: boolean;
|
|
45
|
+
}, {
|
|
46
|
+
$has: boolean;
|
|
47
|
+
}>>;
|
|
48
|
+
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
49
|
+
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
kind: import("..").SaasComponentKind;
|
|
52
|
+
category: import("..").Category;
|
|
53
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
54
|
+
aid?: {
|
|
55
|
+
$has: boolean;
|
|
56
|
+
} | undefined;
|
|
57
|
+
uid?: {
|
|
58
|
+
$has: boolean;
|
|
59
|
+
} | undefined;
|
|
60
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
kind: import("..").SaasComponentKind;
|
|
63
|
+
category: import("..").Category;
|
|
64
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
65
|
+
aid?: {
|
|
66
|
+
$has: boolean;
|
|
67
|
+
} | undefined;
|
|
68
|
+
uid?: {
|
|
69
|
+
$has: boolean;
|
|
70
|
+
} | undefined;
|
|
71
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
meta: {
|
|
75
|
+
displayValue: string;
|
|
76
|
+
kind: import("..").FindingKind;
|
|
77
|
+
severity: import("..").FindingSeverity;
|
|
78
|
+
};
|
|
79
|
+
rule: {
|
|
80
|
+
kind: import("..").SaasComponentKind;
|
|
81
|
+
category: import("..").Category;
|
|
82
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
83
|
+
aid?: {
|
|
84
|
+
$has: boolean;
|
|
85
|
+
} | undefined;
|
|
86
|
+
uid?: {
|
|
87
|
+
$has: boolean;
|
|
88
|
+
} | undefined;
|
|
89
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
meta: {
|
|
93
|
+
displayValue: string;
|
|
94
|
+
kind: import("..").FindingKind;
|
|
95
|
+
severity: import("..").FindingSeverity;
|
|
96
|
+
};
|
|
97
|
+
rule: {
|
|
98
|
+
kind: import("..").SaasComponentKind;
|
|
99
|
+
category: import("..").Category;
|
|
100
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
101
|
+
aid?: {
|
|
102
|
+
$has: boolean;
|
|
103
|
+
} | undefined;
|
|
104
|
+
uid?: {
|
|
105
|
+
$has: boolean;
|
|
106
|
+
} | undefined;
|
|
107
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
108
|
+
};
|
|
109
|
+
}>>;
|
|
110
|
+
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
111
|
tid: z.ZodString;
|
|
18
112
|
}, "strip", z.ZodTypeAny, {
|
|
19
113
|
name: string;
|
|
@@ -27,6 +121,26 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
27
121
|
severity: import("..").FindingSeverity;
|
|
28
122
|
description?: unknown;
|
|
29
123
|
cid?: string | undefined;
|
|
124
|
+
insights?: {
|
|
125
|
+
meta: {
|
|
126
|
+
displayValue: string;
|
|
127
|
+
kind: import("..").FindingKind;
|
|
128
|
+
severity: import("..").FindingSeverity;
|
|
129
|
+
};
|
|
130
|
+
rule: {
|
|
131
|
+
kind: import("..").SaasComponentKind;
|
|
132
|
+
category: import("..").Category;
|
|
133
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
134
|
+
aid?: {
|
|
135
|
+
$has: boolean;
|
|
136
|
+
} | undefined;
|
|
137
|
+
uid?: {
|
|
138
|
+
$has: boolean;
|
|
139
|
+
} | undefined;
|
|
140
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
141
|
+
};
|
|
142
|
+
} | undefined;
|
|
143
|
+
expireAfterDays?: number | null | undefined;
|
|
30
144
|
}, {
|
|
31
145
|
name: string;
|
|
32
146
|
id: string;
|
|
@@ -39,6 +153,26 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
39
153
|
severity: import("..").FindingSeverity;
|
|
40
154
|
description?: unknown;
|
|
41
155
|
cid?: string | undefined;
|
|
156
|
+
insights?: {
|
|
157
|
+
meta: {
|
|
158
|
+
displayValue: string;
|
|
159
|
+
kind: import("..").FindingKind;
|
|
160
|
+
severity: import("..").FindingSeverity;
|
|
161
|
+
};
|
|
162
|
+
rule: {
|
|
163
|
+
kind: import("..").SaasComponentKind;
|
|
164
|
+
category: import("..").Category;
|
|
165
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
166
|
+
aid?: {
|
|
167
|
+
$has: boolean;
|
|
168
|
+
} | undefined;
|
|
169
|
+
uid?: {
|
|
170
|
+
$has: boolean;
|
|
171
|
+
} | undefined;
|
|
172
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
173
|
+
};
|
|
174
|
+
} | undefined;
|
|
175
|
+
expireAfterDays?: number | null | undefined;
|
|
42
176
|
}>;
|
|
43
177
|
export type PlatformFindingSpecDto = z.infer<typeof _PlatformFindingSpecDto>;
|
|
44
178
|
export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
@@ -52,6 +186,100 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
52
186
|
displayValue: z.ZodString;
|
|
53
187
|
eventType: z.ZodString;
|
|
54
188
|
severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
|
|
189
|
+
insights: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
meta: z.ZodObject<{
|
|
191
|
+
kind: z.ZodNativeEnum<typeof import("..").FindingKind>;
|
|
192
|
+
severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
|
|
193
|
+
displayValue: z.ZodString;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
displayValue: string;
|
|
196
|
+
kind: import("..").FindingKind;
|
|
197
|
+
severity: import("..").FindingSeverity;
|
|
198
|
+
}, {
|
|
199
|
+
displayValue: string;
|
|
200
|
+
kind: import("..").FindingKind;
|
|
201
|
+
severity: import("..").FindingSeverity;
|
|
202
|
+
}>;
|
|
203
|
+
rule: z.ZodObject<{
|
|
204
|
+
category: z.ZodNativeEnum<typeof import("..").Category>;
|
|
205
|
+
kind: z.ZodNativeEnum<typeof import("..").SaasComponentKind>;
|
|
206
|
+
aid: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
$has: z.ZodBoolean;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
$has: boolean;
|
|
210
|
+
}, {
|
|
211
|
+
$has: boolean;
|
|
212
|
+
}>>;
|
|
213
|
+
uid: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
$has: z.ZodBoolean;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
$has: boolean;
|
|
217
|
+
}, {
|
|
218
|
+
$has: boolean;
|
|
219
|
+
}>>;
|
|
220
|
+
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
221
|
+
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
kind: import("..").SaasComponentKind;
|
|
224
|
+
category: import("..").Category;
|
|
225
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
226
|
+
aid?: {
|
|
227
|
+
$has: boolean;
|
|
228
|
+
} | undefined;
|
|
229
|
+
uid?: {
|
|
230
|
+
$has: boolean;
|
|
231
|
+
} | undefined;
|
|
232
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
kind: import("..").SaasComponentKind;
|
|
235
|
+
category: import("..").Category;
|
|
236
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
237
|
+
aid?: {
|
|
238
|
+
$has: boolean;
|
|
239
|
+
} | undefined;
|
|
240
|
+
uid?: {
|
|
241
|
+
$has: boolean;
|
|
242
|
+
} | undefined;
|
|
243
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
244
|
+
}>;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
meta: {
|
|
247
|
+
displayValue: string;
|
|
248
|
+
kind: import("..").FindingKind;
|
|
249
|
+
severity: import("..").FindingSeverity;
|
|
250
|
+
};
|
|
251
|
+
rule: {
|
|
252
|
+
kind: import("..").SaasComponentKind;
|
|
253
|
+
category: import("..").Category;
|
|
254
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
255
|
+
aid?: {
|
|
256
|
+
$has: boolean;
|
|
257
|
+
} | undefined;
|
|
258
|
+
uid?: {
|
|
259
|
+
$has: boolean;
|
|
260
|
+
} | undefined;
|
|
261
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
262
|
+
};
|
|
263
|
+
}, {
|
|
264
|
+
meta: {
|
|
265
|
+
displayValue: string;
|
|
266
|
+
kind: import("..").FindingKind;
|
|
267
|
+
severity: import("..").FindingSeverity;
|
|
268
|
+
};
|
|
269
|
+
rule: {
|
|
270
|
+
kind: import("..").SaasComponentKind;
|
|
271
|
+
category: import("..").Category;
|
|
272
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
273
|
+
aid?: {
|
|
274
|
+
$has: boolean;
|
|
275
|
+
} | undefined;
|
|
276
|
+
uid?: {
|
|
277
|
+
$has: boolean;
|
|
278
|
+
} | undefined;
|
|
279
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
280
|
+
};
|
|
281
|
+
}>>;
|
|
282
|
+
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
55
283
|
tid: z.ZodString;
|
|
56
284
|
}, "strip", z.ZodTypeAny, {
|
|
57
285
|
name: string;
|
|
@@ -65,6 +293,26 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
65
293
|
createdAt?: string | undefined;
|
|
66
294
|
updatedAt?: string | undefined;
|
|
67
295
|
deletedAt?: string | null | undefined;
|
|
296
|
+
insights?: {
|
|
297
|
+
meta: {
|
|
298
|
+
displayValue: string;
|
|
299
|
+
kind: import("..").FindingKind;
|
|
300
|
+
severity: import("..").FindingSeverity;
|
|
301
|
+
};
|
|
302
|
+
rule: {
|
|
303
|
+
kind: import("..").SaasComponentKind;
|
|
304
|
+
category: import("..").Category;
|
|
305
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
306
|
+
aid?: {
|
|
307
|
+
$has: boolean;
|
|
308
|
+
} | undefined;
|
|
309
|
+
uid?: {
|
|
310
|
+
$has: boolean;
|
|
311
|
+
} | undefined;
|
|
312
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
313
|
+
};
|
|
314
|
+
} | undefined;
|
|
315
|
+
expireAfterDays?: number | null | undefined;
|
|
68
316
|
}, {
|
|
69
317
|
name: string;
|
|
70
318
|
tid: string;
|
|
@@ -77,5 +325,25 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
77
325
|
createdAt?: string | undefined;
|
|
78
326
|
updatedAt?: string | undefined;
|
|
79
327
|
deletedAt?: string | null | undefined;
|
|
328
|
+
insights?: {
|
|
329
|
+
meta: {
|
|
330
|
+
displayValue: string;
|
|
331
|
+
kind: import("..").FindingKind;
|
|
332
|
+
severity: import("..").FindingSeverity;
|
|
333
|
+
};
|
|
334
|
+
rule: {
|
|
335
|
+
kind: import("..").SaasComponentKind;
|
|
336
|
+
category: import("..").Category;
|
|
337
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
338
|
+
aid?: {
|
|
339
|
+
$has: boolean;
|
|
340
|
+
} | undefined;
|
|
341
|
+
uid?: {
|
|
342
|
+
$has: boolean;
|
|
343
|
+
} | undefined;
|
|
344
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
345
|
+
};
|
|
346
|
+
} | undefined;
|
|
347
|
+
expireAfterDays?: number | null | undefined;
|
|
80
348
|
}>;
|
|
81
349
|
export type PlatformFindingSpecUpsertDto = z.infer<typeof _PlatformFindingSpecUpsertDto>;
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import {Category} from './category';
|
|
1
2
|
import {FindingOutcome} from './finding.outcome';
|
|
3
|
+
import {FindingSeverity} from './finding.severity';
|
|
2
4
|
|
|
3
5
|
export enum FindingKind {
|
|
4
6
|
// ALL
|
|
@@ -45,3 +47,63 @@ export const lookupFindingOutcomeByKind = (kind: FindingKind): FindingOutcome =>
|
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
};
|
|
50
|
+
|
|
51
|
+
export const lookupFindingKindByCategory = (category: string): FindingKind[] => {
|
|
52
|
+
switch (category) {
|
|
53
|
+
case Category.IDENTITY: {
|
|
54
|
+
return [FindingKind.MFA_NOT_ENABLED, FindingKind.IS_EXECUTIVE, FindingKind.HAS_PRODUCTION_ACCESS, FindingKind.HAS_PRIVILEGED_ACCESS];
|
|
55
|
+
}
|
|
56
|
+
case Category.TRAINING: {
|
|
57
|
+
return [FindingKind.FAILED_PHISHING, FindingKind.TRAINING_OVERDUE];
|
|
58
|
+
}
|
|
59
|
+
case Category.EDR: {
|
|
60
|
+
return [FindingKind.DEVICE_NOT_MANAGED];
|
|
61
|
+
}
|
|
62
|
+
case Category.WEB_GATEWAY: {
|
|
63
|
+
return [FindingKind.WEB_GATEWAY_NOT_ACTIVE];
|
|
64
|
+
}
|
|
65
|
+
case Category.VULNERABILITY: {
|
|
66
|
+
return [FindingKind.VULNERABILITY_OUT_OF_SLA];
|
|
67
|
+
}
|
|
68
|
+
case Category.NOTIFICATION: {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
default: {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const lookupFindingSeverityByKind = (kind: string): FindingSeverity | undefined => {
|
|
78
|
+
switch (kind) {
|
|
79
|
+
case FindingKind.MFA_NOT_ENABLED:
|
|
80
|
+
case FindingKind.IS_EXECUTIVE:
|
|
81
|
+
case FindingKind.HAS_PRODUCTION_ACCESS:
|
|
82
|
+
case FindingKind.HAS_PRIVILEGED_ACCESS:
|
|
83
|
+
case FindingKind.DEVICE_NOT_MANAGED:
|
|
84
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
85
|
+
case FindingKind.VULNERABILITY_OUT_OF_SLA: {
|
|
86
|
+
return FindingSeverity.HIGH;
|
|
87
|
+
}
|
|
88
|
+
case FindingKind.FAILED_PHISHING:
|
|
89
|
+
case FindingKind.TRAINING_OVERDUE: {
|
|
90
|
+
return FindingSeverity.MEDIUM;
|
|
91
|
+
}
|
|
92
|
+
default: {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const lookupFindingDisplayValueByKind = (kind: string): string => {
|
|
99
|
+
switch (kind) {
|
|
100
|
+
case FindingKind.FAILED_PHISHING:
|
|
101
|
+
return 'health_training_failed_phishing';
|
|
102
|
+
case FindingKind.TRAINING_OVERDUE:
|
|
103
|
+
return 'health_training_missed_training';
|
|
104
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
105
|
+
return 'web_gateway_not_logged_in';
|
|
106
|
+
default:
|
|
107
|
+
return kind.toLowerCase();
|
|
108
|
+
}
|
|
109
|
+
};
|
package/src/dto/findings.dto.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
2
|
import {SimpleAssetDto} from './assets.dto';
|
|
3
3
|
import {BaseDto, BaseUpsertDto, _BaseDto} from './base.dto';
|
|
4
|
-
import {Category, FindingKind} from './enums';
|
|
4
|
+
import {Category, FindingKind, SaasComponentKind} from './enums';
|
|
5
5
|
import {FindingOutcome, FindingSeverity, FindingStatus} from './enums';
|
|
6
6
|
import {SimpleProviderDto} from './providers.dto';
|
|
7
7
|
import {SaasComponentMeta} from './saasComponents.dto';
|
|
@@ -67,6 +67,32 @@ export const _FindingSpecDto = _BaseDto.extend({
|
|
|
67
67
|
eventType: z.string(),
|
|
68
68
|
description: z.union([z.string(), _FindingSpecDescription]),
|
|
69
69
|
severity: z.nativeEnum(FindingSeverity),
|
|
70
|
+
insights: z
|
|
71
|
+
.object({
|
|
72
|
+
meta: z.object({
|
|
73
|
+
kind: z.nativeEnum(FindingKind),
|
|
74
|
+
severity: z.nativeEnum(FindingSeverity),
|
|
75
|
+
displayValue: z.string(),
|
|
76
|
+
}),
|
|
77
|
+
rule: z.object({
|
|
78
|
+
category: z.nativeEnum(Category),
|
|
79
|
+
kind: z.nativeEnum(SaasComponentKind),
|
|
80
|
+
aid: z
|
|
81
|
+
.object({
|
|
82
|
+
$has: z.boolean(),
|
|
83
|
+
})
|
|
84
|
+
.optional(),
|
|
85
|
+
uid: z
|
|
86
|
+
.object({
|
|
87
|
+
$has: z.boolean(),
|
|
88
|
+
})
|
|
89
|
+
.optional(),
|
|
90
|
+
findingCondition: z.record(z.string(), z.union([z.boolean(), z.string(), z.number(), z.undefined()])),
|
|
91
|
+
remediatedCondition: z.record(z.string(), z.union([z.boolean(), z.string(), z.number(), z.undefined()])).optional(),
|
|
92
|
+
}),
|
|
93
|
+
})
|
|
94
|
+
.optional(),
|
|
95
|
+
expireAfterDays: z.nullable(z.number()).optional(),
|
|
70
96
|
});
|
|
71
97
|
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
72
98
|
|