@ampsec/platform-client 67.0.2 → 68.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/build/src/dto/enums/findingKind.d.ts +6 -2
- package/build/src/dto/enums/findingKind.js +51 -21
- package/build/src/dto/enums/findingKind.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +120 -6
- package/build/src/dto/findings.dto.js +27 -27
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/platform/platform.findings.dto.d.ts +20 -6
- package/build/src/services/contentful.service.d.ts +20 -4
- package/build/src/services/contentful.service.js +12 -1
- package/build/src/services/contentful.service.js.map +1 -1
- package/build/src/services/settings.service.d.ts +6 -6
- package/package.json +1 -1
- package/src/dto/enums/findingKind.ts +51 -21
- package/src/dto/findings.dto.ts +29 -27
- package/src/services/contentful.service.ts +15 -1
|
@@ -11,13 +11,16 @@ export declare enum FindingKind {
|
|
|
11
11
|
FAILED_PHISHING = "FAILED_PHISHING",
|
|
12
12
|
TRAINING_OVERDUE = "TRAINING_OVERDUE",
|
|
13
13
|
DEVICE_NOT_MANAGED = "DEVICE_NOT_MANAGED",
|
|
14
|
-
|
|
14
|
+
CRITICAL_VULNERABILITY_OUT_OF_SLA = "CRITICAL_VULNERABILITY_OUT_OF_SLA",
|
|
15
|
+
HIGH_VULNERABILITY_OUT_OF_SLA = "HIGH_VULNERABILITY_OUT_OF_SLA",
|
|
16
|
+
MEDIUM_VULNERABILITY_OUT_OF_SLA = "MEDIUM_VULNERABILITY_OUT_OF_SLA",
|
|
17
|
+
LOW_VULNERABILITY_OUT_OF_SLA = "LOW_VULNERABILITY_OUT_OF_SLA",
|
|
15
18
|
WEB_GATEWAY_NOT_ACTIVE = "WEB_GATEWAY_NOT_ACTIVE"
|
|
16
19
|
}
|
|
17
20
|
export declare const lookupFindingOutcomeByKind: (kind: FindingKind) => FindingOutcome;
|
|
18
21
|
export declare const lookupFindingKindByCategory: (category: string) => FindingKind[];
|
|
19
22
|
export declare const lookupFindingSeverityByKind: (kind: string) => FindingSeverity | undefined;
|
|
20
|
-
export declare const lookupFindingScoreByCategoryKindAndSeverity: (category: Category, kind: string
|
|
23
|
+
export declare const lookupFindingScoreByCategoryKindAndSeverity: (category: Category, kind: string) => number;
|
|
21
24
|
export declare const lookupFindingDisplayValueByKind: (kind: string) => string;
|
|
22
25
|
export declare const generateInsights: (category: string, kind: string) => {
|
|
23
26
|
meta: {
|
|
@@ -34,6 +37,7 @@ export declare const generateInsights: (category: string, kind: string) => {
|
|
|
34
37
|
uid: {
|
|
35
38
|
$has: boolean;
|
|
36
39
|
};
|
|
40
|
+
severity: FindingSeverity;
|
|
37
41
|
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
38
42
|
remediatedCondition: Record<string, string | number | boolean | undefined>;
|
|
39
43
|
};
|
|
@@ -19,7 +19,10 @@ var FindingKind;
|
|
|
19
19
|
FindingKind["TRAINING_OVERDUE"] = "TRAINING_OVERDUE";
|
|
20
20
|
// EDR
|
|
21
21
|
FindingKind["DEVICE_NOT_MANAGED"] = "DEVICE_NOT_MANAGED";
|
|
22
|
-
FindingKind["
|
|
22
|
+
FindingKind["CRITICAL_VULNERABILITY_OUT_OF_SLA"] = "CRITICAL_VULNERABILITY_OUT_OF_SLA";
|
|
23
|
+
FindingKind["HIGH_VULNERABILITY_OUT_OF_SLA"] = "HIGH_VULNERABILITY_OUT_OF_SLA";
|
|
24
|
+
FindingKind["MEDIUM_VULNERABILITY_OUT_OF_SLA"] = "MEDIUM_VULNERABILITY_OUT_OF_SLA";
|
|
25
|
+
FindingKind["LOW_VULNERABILITY_OUT_OF_SLA"] = "LOW_VULNERABILITY_OUT_OF_SLA";
|
|
23
26
|
// WEB_GATEWAY
|
|
24
27
|
FindingKind["WEB_GATEWAY_NOT_ACTIVE"] = "WEB_GATEWAY_NOT_ACTIVE";
|
|
25
28
|
})(FindingKind || (exports.FindingKind = FindingKind = {}));
|
|
@@ -29,7 +32,10 @@ const lookupFindingOutcomeByKind = (kind) => {
|
|
|
29
32
|
case FindingKind.MFA_NOT_ENABLED:
|
|
30
33
|
case FindingKind.TRAINING_OVERDUE:
|
|
31
34
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
32
|
-
case FindingKind.
|
|
35
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
36
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
37
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
38
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
33
39
|
case FindingKind.WEB_GATEWAY_NOT_ACTIVE: {
|
|
34
40
|
return finding_outcome_1.FindingOutcome.REMEDIATION;
|
|
35
41
|
}
|
|
@@ -62,7 +68,12 @@ const lookupFindingKindByCategory = (category) => {
|
|
|
62
68
|
return [FindingKind.WEB_GATEWAY_NOT_ACTIVE];
|
|
63
69
|
}
|
|
64
70
|
case category_1.Category.VULNERABILITY: {
|
|
65
|
-
return [
|
|
71
|
+
return [
|
|
72
|
+
FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA,
|
|
73
|
+
FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA,
|
|
74
|
+
FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA,
|
|
75
|
+
FindingKind.LOW_VULNERABILITY_OUT_OF_SLA,
|
|
76
|
+
];
|
|
66
77
|
}
|
|
67
78
|
case category_1.Category.NOTIFICATION: {
|
|
68
79
|
return [];
|
|
@@ -81,9 +92,18 @@ const lookupFindingSeverityByKind = (kind) => {
|
|
|
81
92
|
case FindingKind.HAS_PRIVILEGED_ACCESS:
|
|
82
93
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
83
94
|
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
84
|
-
case FindingKind.
|
|
95
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA: {
|
|
96
|
+
return finding_severity_1.FindingSeverity.CRITICAL;
|
|
97
|
+
}
|
|
98
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA: {
|
|
85
99
|
return finding_severity_1.FindingSeverity.HIGH;
|
|
86
100
|
}
|
|
101
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA: {
|
|
102
|
+
return finding_severity_1.FindingSeverity.MEDIUM;
|
|
103
|
+
}
|
|
104
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA: {
|
|
105
|
+
return finding_severity_1.FindingSeverity.LOW;
|
|
106
|
+
}
|
|
87
107
|
case FindingKind.FAILED_PHISHING:
|
|
88
108
|
case FindingKind.TRAINING_OVERDUE: {
|
|
89
109
|
return finding_severity_1.FindingSeverity.MEDIUM;
|
|
@@ -95,7 +115,7 @@ const lookupFindingSeverityByKind = (kind) => {
|
|
|
95
115
|
};
|
|
96
116
|
exports.lookupFindingSeverityByKind = lookupFindingSeverityByKind;
|
|
97
117
|
// https://docs.google.com/spreadsheets/d/18Ow9GGBvioAx4agnpnJGV4qnOWeLK941L7SrF4tzZiM/edit#gid=0
|
|
98
|
-
const lookupFindingScoreByCategoryKindAndSeverity = (category, kind
|
|
118
|
+
const lookupFindingScoreByCategoryKindAndSeverity = (category, kind) => {
|
|
99
119
|
switch (category) {
|
|
100
120
|
case category_1.Category.EDR: {
|
|
101
121
|
switch (kind) {
|
|
@@ -109,21 +129,14 @@ const lookupFindingScoreByCategoryKindAndSeverity = (category, kind, severity) =
|
|
|
109
129
|
switch (kind) {
|
|
110
130
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
111
131
|
return 10;
|
|
112
|
-
case FindingKind.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
case finding_severity_1.FindingSeverity.LOW:
|
|
121
|
-
return 2;
|
|
122
|
-
case finding_severity_1.FindingSeverity.INFO:
|
|
123
|
-
default:
|
|
124
|
-
return 0;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
132
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
133
|
+
return 15;
|
|
134
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
135
|
+
return 9;
|
|
136
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
137
|
+
return 5;
|
|
138
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
139
|
+
return 2;
|
|
127
140
|
default:
|
|
128
141
|
return 0;
|
|
129
142
|
}
|
|
@@ -195,6 +208,7 @@ const generateInsights = (category, kind) => {
|
|
|
195
208
|
kind: '',
|
|
196
209
|
aid: { $has: false },
|
|
197
210
|
uid: { $has: false },
|
|
211
|
+
severity: undefined,
|
|
198
212
|
findingCondition: {},
|
|
199
213
|
remediatedCondition: {},
|
|
200
214
|
},
|
|
@@ -214,9 +228,25 @@ const generateInsights = (category, kind) => {
|
|
|
214
228
|
setCondition('meta._findings.loggedIn', false);
|
|
215
229
|
insights.rule.kind = saasComponentKind_1.SaasComponentKind.WEB_GATEWAY_SESSION;
|
|
216
230
|
break;
|
|
217
|
-
case FindingKind.
|
|
231
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
232
|
+
setCondition('meta._findings.overdue', true);
|
|
233
|
+
insights.rule.kind = saasComponentKind_1.SaasComponentKind.VULNERABILITY;
|
|
234
|
+
insights.rule.severity = finding_severity_1.FindingSeverity.CRITICAL;
|
|
235
|
+
break;
|
|
236
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
237
|
+
setCondition('meta._findings.overdue', true);
|
|
238
|
+
insights.rule.kind = saasComponentKind_1.SaasComponentKind.VULNERABILITY;
|
|
239
|
+
insights.rule.severity = finding_severity_1.FindingSeverity.HIGH;
|
|
240
|
+
break;
|
|
241
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
242
|
+
setCondition('meta._findings.overdue', true);
|
|
243
|
+
insights.rule.kind = saasComponentKind_1.SaasComponentKind.VULNERABILITY;
|
|
244
|
+
insights.rule.severity = finding_severity_1.FindingSeverity.MEDIUM;
|
|
245
|
+
break;
|
|
246
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
218
247
|
setCondition('meta._findings.overdue', true);
|
|
219
248
|
insights.rule.kind = saasComponentKind_1.SaasComponentKind.VULNERABILITY;
|
|
249
|
+
insights.rule.severity = finding_severity_1.FindingSeverity.LOW;
|
|
220
250
|
break;
|
|
221
251
|
case FindingKind.TRAINING_OVERDUE:
|
|
222
252
|
setCondition('meta._findings.overdue', true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,uDAAiD;AACjD,yDAAmD;AACnD,2DAAsD;AAEtD,IAAY,
|
|
1
|
+
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,uDAAiD;AACjD,yDAAmD;AACnD,2DAAsD;AAEtD,IAAY,WAuBX;AAvBD,WAAY,WAAW;IACrB,MAAM;IACN,wCAAyB,CAAA;IAEzB,WAAW;IACX,kDAAmC,CAAA;IACnC,4CAA6B,CAAA;IAC7B,8DAA+C,CAAA;IAC/C,8DAA+C,CAAA;IAE/C,WAAW;IACX,kDAAmC,CAAA;IACnC,oDAAqC,CAAA;IAErC,MAAM;IACN,wDAAyC,CAAA;IACzC,sFAAuE,CAAA;IACvE,8EAA+D,CAAA;IAC/D,kFAAmE,CAAA;IACnE,4EAA6D,CAAA;IAE7D,cAAc;IACd,gEAAiD,CAAA;AACnD,CAAC,EAvBW,WAAW,2BAAX,WAAW,QAuBtB;AAEM,MAAM,0BAA0B,GAAG,CAAC,IAAiB,EAAkB,EAAE;I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AAC;YAC3D,MAAM;QACR,KAAK,WAAW,CAAC,eAAe;YAC9B,YAAY,CAAC,+BAA+B,EAAE,IAAI,CAAC,CAAC;YACpD,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,eAAe,CAAC;YACvD,MAAM;QACR,KAAK,WAAW,CAAC,kBAAkB;YACjC,YAAY,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YAC7C,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,UAAU,CAAC;YAClD,MAAM;QACR,KAAK,WAAW,CAAC,eAAe;YAC9B,YAAY,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;YAC9C,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,UAAU,CAAC;YAClD,MAAM;QACR,KAAK,WAAW,CAAC,YAAY;YAC3B,YAAY,CAAC,4BAA4B,EAAE,IAAI,CAAC,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,gBAAgB,CAAC;YACxD,MAAM;QACR,KAAK,WAAW,CAAC,qBAAqB;YACpC,YAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,gBAAgB,CAAC;YACxD,MAAM;QACR,KAAK,WAAW,CAAC,qBAAqB;YACpC,YAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,CAAC;YACzD,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,qCAAiB,CAAC,gBAAgB,CAAC;YACxD,MAAM;QACR;YACE,MAAM;IACV,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AArFW,QAAA,gBAAgB,oBAqF3B"}
|
|
@@ -58,12 +58,110 @@ export type FindingDto = BaseDto & FindingUpsertDto & {
|
|
|
58
58
|
/** Optionally populated when requested through query param `include=meta`. Comes from `saasComp.meta` */
|
|
59
59
|
meta?: SaasComponentMeta;
|
|
60
60
|
};
|
|
61
|
+
declare const _FindingSpecInsights: z.ZodObject<{
|
|
62
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
kind: z.ZodNativeEnum<typeof FindingKind>;
|
|
64
|
+
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
65
|
+
displayValue: z.ZodString;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
displayValue: string;
|
|
68
|
+
kind: FindingKind;
|
|
69
|
+
severity: FindingSeverity;
|
|
70
|
+
}, {
|
|
71
|
+
displayValue: string;
|
|
72
|
+
kind: FindingKind;
|
|
73
|
+
severity: FindingSeverity;
|
|
74
|
+
}>>;
|
|
75
|
+
rule: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
category: z.ZodNativeEnum<typeof Category>;
|
|
77
|
+
kind: z.ZodNativeEnum<typeof SaasComponentKind>;
|
|
78
|
+
aid: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
$has: z.ZodBoolean;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
$has: boolean;
|
|
82
|
+
}, {
|
|
83
|
+
$has: boolean;
|
|
84
|
+
}>>;
|
|
85
|
+
uid: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
$has: z.ZodBoolean;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
$has: boolean;
|
|
89
|
+
}, {
|
|
90
|
+
$has: boolean;
|
|
91
|
+
}>>;
|
|
92
|
+
severity: z.ZodOptional<z.ZodNativeEnum<typeof FindingSeverity>>;
|
|
93
|
+
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
94
|
+
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
kind: SaasComponentKind;
|
|
97
|
+
category: Category;
|
|
98
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
99
|
+
aid?: {
|
|
100
|
+
$has: boolean;
|
|
101
|
+
} | undefined;
|
|
102
|
+
uid?: {
|
|
103
|
+
$has: boolean;
|
|
104
|
+
} | undefined;
|
|
105
|
+
severity?: FindingSeverity | undefined;
|
|
106
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
kind: SaasComponentKind;
|
|
109
|
+
category: Category;
|
|
110
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
111
|
+
aid?: {
|
|
112
|
+
$has: boolean;
|
|
113
|
+
} | undefined;
|
|
114
|
+
uid?: {
|
|
115
|
+
$has: boolean;
|
|
116
|
+
} | undefined;
|
|
117
|
+
severity?: FindingSeverity | undefined;
|
|
118
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
119
|
+
}>>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
meta?: {
|
|
122
|
+
displayValue: string;
|
|
123
|
+
kind: FindingKind;
|
|
124
|
+
severity: FindingSeverity;
|
|
125
|
+
} | undefined;
|
|
126
|
+
rule?: {
|
|
127
|
+
kind: SaasComponentKind;
|
|
128
|
+
category: Category;
|
|
129
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
130
|
+
aid?: {
|
|
131
|
+
$has: boolean;
|
|
132
|
+
} | undefined;
|
|
133
|
+
uid?: {
|
|
134
|
+
$has: boolean;
|
|
135
|
+
} | undefined;
|
|
136
|
+
severity?: FindingSeverity | undefined;
|
|
137
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
meta?: {
|
|
141
|
+
displayValue: string;
|
|
142
|
+
kind: FindingKind;
|
|
143
|
+
severity: FindingSeverity;
|
|
144
|
+
} | undefined;
|
|
145
|
+
rule?: {
|
|
146
|
+
kind: SaasComponentKind;
|
|
147
|
+
category: Category;
|
|
148
|
+
findingCondition: Record<string, string | number | boolean | undefined>;
|
|
149
|
+
aid?: {
|
|
150
|
+
$has: boolean;
|
|
151
|
+
} | undefined;
|
|
152
|
+
uid?: {
|
|
153
|
+
$has: boolean;
|
|
154
|
+
} | undefined;
|
|
155
|
+
severity?: FindingSeverity | undefined;
|
|
156
|
+
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
}>;
|
|
61
159
|
export declare const _FindingSpecDto: z.ZodObject<{
|
|
62
160
|
id: z.ZodString;
|
|
63
161
|
createdAt: z.ZodString;
|
|
64
162
|
updatedAt: z.ZodString;
|
|
65
163
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
66
|
-
cid: z.ZodOptional<z.ZodString
|
|
164
|
+
cid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
165
|
name: z.ZodString;
|
|
68
166
|
displayValue: z.ZodString;
|
|
69
167
|
eventType: z.ZodString;
|
|
@@ -100,6 +198,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
100
198
|
}, {
|
|
101
199
|
$has: boolean;
|
|
102
200
|
}>>;
|
|
201
|
+
severity: z.ZodOptional<z.ZodNativeEnum<typeof FindingSeverity>>;
|
|
103
202
|
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
104
203
|
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
105
204
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -112,6 +211,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
112
211
|
uid?: {
|
|
113
212
|
$has: boolean;
|
|
114
213
|
} | undefined;
|
|
214
|
+
severity?: FindingSeverity | undefined;
|
|
115
215
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
116
216
|
}, {
|
|
117
217
|
kind: SaasComponentKind;
|
|
@@ -123,6 +223,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
123
223
|
uid?: {
|
|
124
224
|
$has: boolean;
|
|
125
225
|
} | undefined;
|
|
226
|
+
severity?: FindingSeverity | undefined;
|
|
126
227
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
127
228
|
}>>;
|
|
128
229
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -141,6 +242,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
141
242
|
uid?: {
|
|
142
243
|
$has: boolean;
|
|
143
244
|
} | undefined;
|
|
245
|
+
severity?: FindingSeverity | undefined;
|
|
144
246
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
145
247
|
} | undefined;
|
|
146
248
|
}, {
|
|
@@ -159,6 +261,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
159
261
|
uid?: {
|
|
160
262
|
$has: boolean;
|
|
161
263
|
} | undefined;
|
|
264
|
+
severity?: FindingSeverity | undefined;
|
|
162
265
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
163
266
|
} | undefined;
|
|
164
267
|
}>>;
|
|
@@ -176,7 +279,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
176
279
|
kind: FindingSpecKind;
|
|
177
280
|
eventType: string;
|
|
178
281
|
severity: FindingSeverity;
|
|
179
|
-
cid?: string | undefined;
|
|
282
|
+
cid?: string | null | undefined;
|
|
180
283
|
description?: unknown;
|
|
181
284
|
insights?: {
|
|
182
285
|
meta?: {
|
|
@@ -194,6 +297,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
194
297
|
uid?: {
|
|
195
298
|
$has: boolean;
|
|
196
299
|
} | undefined;
|
|
300
|
+
severity?: FindingSeverity | undefined;
|
|
197
301
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
198
302
|
} | undefined;
|
|
199
303
|
} | undefined;
|
|
@@ -210,7 +314,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
210
314
|
kind: FindingSpecKind;
|
|
211
315
|
eventType: string;
|
|
212
316
|
severity: FindingSeverity;
|
|
213
|
-
cid?: string | undefined;
|
|
317
|
+
cid?: string | null | undefined;
|
|
214
318
|
description?: unknown;
|
|
215
319
|
insights?: {
|
|
216
320
|
meta?: {
|
|
@@ -228,6 +332,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
228
332
|
uid?: {
|
|
229
333
|
$has: boolean;
|
|
230
334
|
} | undefined;
|
|
335
|
+
severity?: FindingSeverity | undefined;
|
|
231
336
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
232
337
|
} | undefined;
|
|
233
338
|
} | undefined;
|
|
@@ -235,12 +340,13 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
235
340
|
outcome?: FindingOutcome | undefined;
|
|
236
341
|
score?: number | undefined;
|
|
237
342
|
}>;
|
|
343
|
+
export type FindingSpecInsights = z.infer<typeof _FindingSpecInsights>;
|
|
238
344
|
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
239
345
|
export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
240
346
|
name: z.ZodString;
|
|
241
347
|
description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
|
|
242
348
|
id: z.ZodOptional<z.ZodString>;
|
|
243
|
-
cid: z.ZodOptional<z.ZodString
|
|
349
|
+
cid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
350
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
245
351
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
246
352
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -280,6 +386,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
280
386
|
}, {
|
|
281
387
|
$has: boolean;
|
|
282
388
|
}>>;
|
|
389
|
+
severity: z.ZodOptional<z.ZodNativeEnum<typeof FindingSeverity>>;
|
|
283
390
|
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
284
391
|
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
285
392
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -292,6 +399,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
292
399
|
uid?: {
|
|
293
400
|
$has: boolean;
|
|
294
401
|
} | undefined;
|
|
402
|
+
severity?: FindingSeverity | undefined;
|
|
295
403
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
296
404
|
}, {
|
|
297
405
|
kind: SaasComponentKind;
|
|
@@ -303,6 +411,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
303
411
|
uid?: {
|
|
304
412
|
$has: boolean;
|
|
305
413
|
} | undefined;
|
|
414
|
+
severity?: FindingSeverity | undefined;
|
|
306
415
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
307
416
|
}>>;
|
|
308
417
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -321,6 +430,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
321
430
|
uid?: {
|
|
322
431
|
$has: boolean;
|
|
323
432
|
} | undefined;
|
|
433
|
+
severity?: FindingSeverity | undefined;
|
|
324
434
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
325
435
|
} | undefined;
|
|
326
436
|
}, {
|
|
@@ -339,6 +449,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
339
449
|
uid?: {
|
|
340
450
|
$has: boolean;
|
|
341
451
|
} | undefined;
|
|
452
|
+
severity?: FindingSeverity | undefined;
|
|
342
453
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
343
454
|
} | undefined;
|
|
344
455
|
}>>;
|
|
@@ -352,7 +463,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
352
463
|
severity: FindingSeverity;
|
|
353
464
|
description?: unknown;
|
|
354
465
|
id?: string | undefined;
|
|
355
|
-
cid?: string | undefined;
|
|
466
|
+
cid?: string | null | undefined;
|
|
356
467
|
createdAt?: string | undefined;
|
|
357
468
|
updatedAt?: string | undefined;
|
|
358
469
|
deletedAt?: string | null | undefined;
|
|
@@ -373,6 +484,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
373
484
|
uid?: {
|
|
374
485
|
$has: boolean;
|
|
375
486
|
} | undefined;
|
|
487
|
+
severity?: FindingSeverity | undefined;
|
|
376
488
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
377
489
|
} | undefined;
|
|
378
490
|
} | undefined;
|
|
@@ -386,7 +498,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
386
498
|
severity: FindingSeverity;
|
|
387
499
|
description?: unknown;
|
|
388
500
|
id?: string | undefined;
|
|
389
|
-
cid?: string | undefined;
|
|
501
|
+
cid?: string | null | undefined;
|
|
390
502
|
createdAt?: string | undefined;
|
|
391
503
|
updatedAt?: string | undefined;
|
|
392
504
|
deletedAt?: string | null | undefined;
|
|
@@ -407,6 +519,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
407
519
|
uid?: {
|
|
408
520
|
$has: boolean;
|
|
409
521
|
} | undefined;
|
|
522
|
+
severity?: FindingSeverity | undefined;
|
|
410
523
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
411
524
|
} | undefined;
|
|
412
525
|
} | undefined;
|
|
@@ -454,3 +567,4 @@ export declare const _CustomFindingPayload: z.ZodObject<{
|
|
|
454
567
|
context?: unknown;
|
|
455
568
|
}>;
|
|
456
569
|
export type CustomFindingPayload = z.infer<typeof _CustomFindingPayload>;
|
|
570
|
+
export {};
|
|
@@ -6,42 +6,42 @@ const base_dto_1 = require("./base.dto");
|
|
|
6
6
|
const enums_1 = require("./enums");
|
|
7
7
|
const enums_2 = require("./enums");
|
|
8
8
|
const _FindingSpecDescription = zod_1.z.unknown();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: zod_1.z.string(),
|
|
12
|
-
displayValue: zod_1.z.string(),
|
|
13
|
-
eventType: zod_1.z.string(),
|
|
14
|
-
description: zod_1.z.union([zod_1.z.string(), _FindingSpecDescription]),
|
|
15
|
-
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
16
|
-
insights: zod_1.z
|
|
9
|
+
const _FindingSpecInsights = zod_1.z.object({
|
|
10
|
+
meta: zod_1.z
|
|
17
11
|
.object({
|
|
18
|
-
|
|
12
|
+
kind: zod_1.z.nativeEnum(enums_1.FindingKind),
|
|
13
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
14
|
+
displayValue: zod_1.z.string(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
rule: zod_1.z
|
|
18
|
+
.object({
|
|
19
|
+
category: zod_1.z.nativeEnum(enums_1.Category),
|
|
20
|
+
kind: zod_1.z.nativeEnum(enums_1.SaasComponentKind),
|
|
21
|
+
aid: zod_1.z
|
|
19
22
|
.object({
|
|
20
|
-
|
|
21
|
-
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
22
|
-
displayValue: zod_1.z.string(),
|
|
23
|
+
$has: zod_1.z.boolean(),
|
|
23
24
|
})
|
|
24
25
|
.optional(),
|
|
25
|
-
|
|
26
|
+
uid: zod_1.z
|
|
26
27
|
.object({
|
|
27
|
-
|
|
28
|
-
kind: zod_1.z.nativeEnum(enums_1.SaasComponentKind),
|
|
29
|
-
aid: zod_1.z
|
|
30
|
-
.object({
|
|
31
|
-
$has: zod_1.z.boolean(),
|
|
32
|
-
})
|
|
33
|
-
.optional(),
|
|
34
|
-
uid: zod_1.z
|
|
35
|
-
.object({
|
|
36
|
-
$has: zod_1.z.boolean(),
|
|
37
|
-
})
|
|
38
|
-
.optional(),
|
|
39
|
-
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()])),
|
|
40
|
-
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(),
|
|
28
|
+
$has: zod_1.z.boolean(),
|
|
41
29
|
})
|
|
42
30
|
.optional(),
|
|
31
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity).optional(),
|
|
32
|
+
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()])),
|
|
33
|
+
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(),
|
|
43
34
|
})
|
|
44
35
|
.optional(),
|
|
36
|
+
});
|
|
37
|
+
exports._FindingSpecDto = base_dto_1._BaseDto.extend({
|
|
38
|
+
cid: zod_1.z.string().nullable().optional(),
|
|
39
|
+
name: zod_1.z.string(),
|
|
40
|
+
displayValue: zod_1.z.string(),
|
|
41
|
+
eventType: zod_1.z.string(),
|
|
42
|
+
description: zod_1.z.union([zod_1.z.string(), _FindingSpecDescription]),
|
|
43
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
44
|
+
insights: _FindingSpecInsights.optional(),
|
|
45
45
|
expireAfterDays: zod_1.z.nullable(zod_1.z.number()).optional(),
|
|
46
46
|
outcome: zod_1.z.nativeEnum(enums_2.FindingOutcome).optional(), // TODO add column and form field??? Or just default to REMEDIATION?
|
|
47
47
|
kind: zod_1.z.nativeEnum(enums_1.FindingSpecKind),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,yCAA6E;AAC7E,mCAAkF;AAClF,mCAAuE;AA6DvE,MAAM,uBAAuB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,yCAA6E;AAC7E,mCAAkF;AAClF,mCAAuE;AA6DvE,MAAM,uBAAuB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAC5C,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,mBAAW,CAAC;QAC/B,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,uBAAe,CAAC;QACvC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;KACzB,CAAC;SACD,QAAQ,EAAE;IACb,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,gBAAQ,CAAC;QAChC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,yBAAiB,CAAC;QACrC,GAAG,EAAE,OAAC;aACH,MAAM,CAAC;YACN,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE;SAClB,CAAC;aACD,QAAQ,EAAE;QACb,GAAG,EAAE,OAAC;aACH,MAAM,CAAC;YACN,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE;SAClB,CAAC;aACD,QAAQ,EAAE;QACb,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,uBAAe,CAAC,CAAC,QAAQ,EAAE;QAClD,gBAAgB,EAAE,OAAC,CA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,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAKU,QAAA,qBAAqB,GAAG,uBAAe,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC;AAGjE,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAGU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
|
|
9
9
|
id: z.ZodString;
|
|
10
|
-
cid: z.ZodOptional<z.ZodString
|
|
10
|
+
cid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
11
|
createdAt: z.ZodString;
|
|
12
12
|
updatedAt: z.ZodString;
|
|
13
13
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -47,6 +47,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
47
47
|
}, {
|
|
48
48
|
$has: boolean;
|
|
49
49
|
}>>;
|
|
50
|
+
severity: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingSeverity>>;
|
|
50
51
|
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
51
52
|
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
52
53
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -59,6 +60,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
59
60
|
uid?: {
|
|
60
61
|
$has: boolean;
|
|
61
62
|
} | undefined;
|
|
63
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
62
64
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
63
65
|
}, {
|
|
64
66
|
kind: import("..").SaasComponentKind;
|
|
@@ -70,6 +72,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
70
72
|
uid?: {
|
|
71
73
|
$has: boolean;
|
|
72
74
|
} | undefined;
|
|
75
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
73
76
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
74
77
|
}>>;
|
|
75
78
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -88,6 +91,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
88
91
|
uid?: {
|
|
89
92
|
$has: boolean;
|
|
90
93
|
} | undefined;
|
|
94
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
91
95
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
92
96
|
} | undefined;
|
|
93
97
|
}, {
|
|
@@ -106,6 +110,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
106
110
|
uid?: {
|
|
107
111
|
$has: boolean;
|
|
108
112
|
} | undefined;
|
|
113
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
109
114
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
110
115
|
} | undefined;
|
|
111
116
|
}>>;
|
|
@@ -124,7 +129,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
124
129
|
eventType: string;
|
|
125
130
|
severity: import("..").FindingSeverity;
|
|
126
131
|
description?: unknown;
|
|
127
|
-
cid?: string | undefined;
|
|
132
|
+
cid?: string | null | undefined;
|
|
128
133
|
score?: number | undefined;
|
|
129
134
|
insights?: {
|
|
130
135
|
meta?: {
|
|
@@ -142,6 +147,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
142
147
|
uid?: {
|
|
143
148
|
$has: boolean;
|
|
144
149
|
} | undefined;
|
|
150
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
145
151
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
146
152
|
} | undefined;
|
|
147
153
|
} | undefined;
|
|
@@ -159,7 +165,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
159
165
|
eventType: string;
|
|
160
166
|
severity: import("..").FindingSeverity;
|
|
161
167
|
description?: unknown;
|
|
162
|
-
cid?: string | undefined;
|
|
168
|
+
cid?: string | null | undefined;
|
|
163
169
|
score?: number | undefined;
|
|
164
170
|
insights?: {
|
|
165
171
|
meta?: {
|
|
@@ -177,6 +183,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
177
183
|
uid?: {
|
|
178
184
|
$has: boolean;
|
|
179
185
|
} | undefined;
|
|
186
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
180
187
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
181
188
|
} | undefined;
|
|
182
189
|
} | undefined;
|
|
@@ -188,7 +195,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
188
195
|
name: z.ZodString;
|
|
189
196
|
description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
|
|
190
197
|
id: z.ZodOptional<z.ZodString>;
|
|
191
|
-
cid: z.ZodOptional<z.ZodString
|
|
198
|
+
cid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
199
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
193
200
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
194
201
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -228,6 +235,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
228
235
|
}, {
|
|
229
236
|
$has: boolean;
|
|
230
237
|
}>>;
|
|
238
|
+
severity: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingSeverity>>;
|
|
231
239
|
findingCondition: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>;
|
|
232
240
|
remediatedCondition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodUndefined]>>>;
|
|
233
241
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -240,6 +248,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
240
248
|
uid?: {
|
|
241
249
|
$has: boolean;
|
|
242
250
|
} | undefined;
|
|
251
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
243
252
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
244
253
|
}, {
|
|
245
254
|
kind: import("..").SaasComponentKind;
|
|
@@ -251,6 +260,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
251
260
|
uid?: {
|
|
252
261
|
$has: boolean;
|
|
253
262
|
} | undefined;
|
|
263
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
254
264
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
255
265
|
}>>;
|
|
256
266
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -269,6 +279,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
269
279
|
uid?: {
|
|
270
280
|
$has: boolean;
|
|
271
281
|
} | undefined;
|
|
282
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
272
283
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
273
284
|
} | undefined;
|
|
274
285
|
}, {
|
|
@@ -287,6 +298,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
287
298
|
uid?: {
|
|
288
299
|
$has: boolean;
|
|
289
300
|
} | undefined;
|
|
301
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
290
302
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
291
303
|
} | undefined;
|
|
292
304
|
}>>;
|
|
@@ -302,7 +314,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
302
314
|
severity: import("..").FindingSeverity;
|
|
303
315
|
description?: unknown;
|
|
304
316
|
id?: string | undefined;
|
|
305
|
-
cid?: string | undefined;
|
|
317
|
+
cid?: string | null | undefined;
|
|
306
318
|
createdAt?: string | undefined;
|
|
307
319
|
updatedAt?: string | undefined;
|
|
308
320
|
deletedAt?: string | null | undefined;
|
|
@@ -323,6 +335,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
323
335
|
uid?: {
|
|
324
336
|
$has: boolean;
|
|
325
337
|
} | undefined;
|
|
338
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
326
339
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
327
340
|
} | undefined;
|
|
328
341
|
} | undefined;
|
|
@@ -337,7 +350,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
337
350
|
severity: import("..").FindingSeverity;
|
|
338
351
|
description?: unknown;
|
|
339
352
|
id?: string | undefined;
|
|
340
|
-
cid?: string | undefined;
|
|
353
|
+
cid?: string | null | undefined;
|
|
341
354
|
createdAt?: string | undefined;
|
|
342
355
|
updatedAt?: string | undefined;
|
|
343
356
|
deletedAt?: string | null | undefined;
|
|
@@ -358,6 +371,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
358
371
|
uid?: {
|
|
359
372
|
$has: boolean;
|
|
360
373
|
} | undefined;
|
|
374
|
+
severity?: import("..").FindingSeverity | undefined;
|
|
361
375
|
remediatedCondition?: Record<string, string | number | boolean | undefined> | undefined;
|
|
362
376
|
} | undefined;
|
|
363
377
|
} | undefined;
|
|
@@ -46,7 +46,8 @@ export declare enum ContentType {
|
|
|
46
46
|
INTEGRATION = "integration",
|
|
47
47
|
INTEGRATION_DOMAIN = "integrationDomain",
|
|
48
48
|
FINDING = "finding",
|
|
49
|
-
SECURITY_HUB_I18N = "securityHubI18n"
|
|
49
|
+
SECURITY_HUB_I18N = "securityHubI18n",
|
|
50
|
+
SECURITY_HUB_RICH_I18N = "securityHubRichI18n"
|
|
50
51
|
}
|
|
51
52
|
export type ContentOptions = {
|
|
52
53
|
include?: number;
|
|
@@ -222,17 +223,31 @@ export type Integration = z.infer<typeof _Integration>;
|
|
|
222
223
|
declare const _I18nContent: z.ZodObject<{
|
|
223
224
|
key: z.ZodString;
|
|
224
225
|
value: z.ZodString;
|
|
225
|
-
useCaseFilter: z.ZodArray<z.ZodString, "many"
|
|
226
|
+
useCaseFilter: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
226
227
|
}, "strip", z.ZodTypeAny, {
|
|
227
228
|
value: string;
|
|
228
229
|
key: string;
|
|
229
|
-
useCaseFilter
|
|
230
|
+
useCaseFilter?: string[] | undefined;
|
|
230
231
|
}, {
|
|
231
232
|
value: string;
|
|
232
233
|
key: string;
|
|
233
|
-
useCaseFilter
|
|
234
|
+
useCaseFilter?: string[] | undefined;
|
|
234
235
|
}>;
|
|
235
236
|
export type I18nContent = z.infer<typeof _I18nContent>;
|
|
237
|
+
declare const _I18nRichContent: z.ZodObject<{
|
|
238
|
+
key: z.ZodString;
|
|
239
|
+
value: z.ZodUnknown;
|
|
240
|
+
useCaseFilter: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
key: string;
|
|
243
|
+
value?: unknown;
|
|
244
|
+
useCaseFilter?: string[] | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
key: string;
|
|
247
|
+
value?: unknown;
|
|
248
|
+
useCaseFilter?: string[] | undefined;
|
|
249
|
+
}>;
|
|
250
|
+
export type I18nRichContent = z.infer<typeof _I18nRichContent>;
|
|
236
251
|
declare const _MessageTemplateContent: z.ZodObject<{
|
|
237
252
|
id: z.ZodString;
|
|
238
253
|
body: z.ZodString;
|
|
@@ -260,6 +275,7 @@ export declare class ContentService {
|
|
|
260
275
|
getIntegrations: (options?: ContentOptions) => Promise<Integration[]>;
|
|
261
276
|
getServiceProfiles: (options?: ContentOptions) => Promise<ServiceProfile[]>;
|
|
262
277
|
getI18nContent: (options?: ContentOptions) => Promise<I18nContent[]>;
|
|
278
|
+
getI18nRichContent: (options?: ContentOptions) => Promise<I18nRichContent[]>;
|
|
263
279
|
static instance(): ContentService;
|
|
264
280
|
}
|
|
265
281
|
export declare class I18nContentService {
|
|
@@ -96,6 +96,7 @@ var ContentType;
|
|
|
96
96
|
ContentType["INTEGRATION_DOMAIN"] = "integrationDomain";
|
|
97
97
|
ContentType["FINDING"] = "finding";
|
|
98
98
|
ContentType["SECURITY_HUB_I18N"] = "securityHubI18n";
|
|
99
|
+
ContentType["SECURITY_HUB_RICH_I18N"] = "securityHubRichI18n";
|
|
99
100
|
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
100
101
|
const ContentfulRichText = zod_1.z.any();
|
|
101
102
|
const _BackendContent = zod_1.z.object({
|
|
@@ -143,7 +144,12 @@ const _Integration = zod_1.z.object({
|
|
|
143
144
|
const _I18nContent = zod_1.z.object({
|
|
144
145
|
key: zod_1.z.string(),
|
|
145
146
|
value: zod_1.z.string(),
|
|
146
|
-
useCaseFilter: zod_1.z.array(zod_1.z.string()),
|
|
147
|
+
useCaseFilter: zod_1.z.array(zod_1.z.string()).optional(),
|
|
148
|
+
});
|
|
149
|
+
const _I18nRichContent = zod_1.z.object({
|
|
150
|
+
key: zod_1.z.string(),
|
|
151
|
+
value: zod_1.z.unknown(),
|
|
152
|
+
useCaseFilter: zod_1.z.array(zod_1.z.string()).optional(),
|
|
147
153
|
});
|
|
148
154
|
const _MessageTemplateContent = zod_1.z.object({
|
|
149
155
|
id: zod_1.z.string(),
|
|
@@ -214,6 +220,11 @@ class ContentService {
|
|
|
214
220
|
const entries = rawEntries.map(entry => _I18nContent.parse(entry));
|
|
215
221
|
return entries;
|
|
216
222
|
};
|
|
223
|
+
this.getI18nRichContent = async (options) => {
|
|
224
|
+
const rawEntries = await this.getEntries(ContentType.SECURITY_HUB_RICH_I18N, options || {});
|
|
225
|
+
const entries = rawEntries.map(entry => _I18nRichContent.parse(entry));
|
|
226
|
+
return entries;
|
|
227
|
+
};
|
|
217
228
|
}
|
|
218
229
|
static instance() {
|
|
219
230
|
return new ContentService(new ContentfulService());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentful.service.js","sourceRoot":"","sources":["../../../src/services/contentful.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAAsB;AAEtB,uDAAyC;AACzC,oDAAuB;AAevB;;;;;;;;;;;IAWI;AACJ,MAAa,iBAAiB;IAE5B;;;;;;;OAOG;IACH;QAWA,wBAAmB,GAAG,KAAK,IAA+C,EAAE;YAC1E,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAkB,iBAAiB,EAAE,CAAC,CAAC,CAAC;YAChG,OAAO,gBAAgB,CAAC;QAC1B,CAAC,CAAC;QAEF,yBAAoB,GAAG,KAAK,EAA+B,WAAmB,EAAE,OAAgB,EAAE,IAAa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AAG,CAAC,CAAC;QAClE,CAAC,CAAC;QAEF;;;;;;;;;;;;;;WAcG;QACH,sBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QA5C/B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACjD,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAChD,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;IA2CD,MAAM,CAAC,QAAQ,CAAC,QAA6D;QAC3E,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,CAAC;YAClC,kBAAkB,CAAC,SAAS,GAAG,IAAI,kBAAkB,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,kBAAkB,CAAC,SAAS,CAAC;IACtC,CAAC;CACF;AAzDD,gDAyDC"}
|
|
@@ -17,14 +17,14 @@ export declare class AmpSettingsService {
|
|
|
17
17
|
protected readonly targetApi: string;
|
|
18
18
|
constructor(rest: RestClient, targetApi?: TargetApi);
|
|
19
19
|
getSettingsMap: (tid?: string) => Promise<AmpSettingsMap>;
|
|
20
|
-
createMultiple: <T>(keyValues: {
|
|
20
|
+
createMultiple: <T>(keyValues: Array<{
|
|
21
21
|
key: T;
|
|
22
22
|
value: T;
|
|
23
|
-
}
|
|
23
|
+
}> | Array<{
|
|
24
24
|
key: string;
|
|
25
25
|
value: unknown;
|
|
26
|
-
}
|
|
27
|
-
create: <T>(key: string | T, value: unknown, cid?: string) => Promise<AmpSettingDto>;
|
|
26
|
+
}>, cid?: string) => Promise<AmpSettingDto[]>;
|
|
27
|
+
create: <T>(key: string | T, value: unknown | T, cid?: string) => Promise<AmpSettingDto>;
|
|
28
28
|
update: (id: string, entity: AmpSettingUpsertDto) => Promise<AmpSettingDto>;
|
|
29
29
|
updateAll: (data: {
|
|
30
30
|
id: string;
|
|
@@ -43,7 +43,7 @@ export declare class AmpSdkSettingsService {
|
|
|
43
43
|
cid: string | null;
|
|
44
44
|
tid: string;
|
|
45
45
|
}>) => Promise<AmpSettingDto[]>;
|
|
46
|
-
create: <T>(key: string | T, value: unknown, tid: string, cid: string | null) => Promise<AmpSettingDto>;
|
|
46
|
+
create: <T>(key: string | T, value: unknown | T, tid: string, cid: string | null) => Promise<AmpSettingDto>;
|
|
47
47
|
update: (id: string, entity: AmpSettingUpsertDto) => Promise<AmpSettingDto>;
|
|
48
48
|
delete: (id: string) => Promise<AmpSettingDto>;
|
|
49
49
|
}
|
|
@@ -58,5 +58,5 @@ export declare class AmpSettingsMap {
|
|
|
58
58
|
getConnectorSettings: (cid: string) => RawAmpSettingsMap | undefined;
|
|
59
59
|
getConnectorDtos: (cid: string) => AmpSettingDto[];
|
|
60
60
|
getRawMap: () => TenantSettingsMap<AmpSettingDto>;
|
|
61
|
-
static asKey: <T>(key: AmpSettingKey, defaultValue?: T
|
|
61
|
+
static asKey: <T>(key: AmpSettingKey, defaultValue?: T) => TypedAmpSettingsKey<T>;
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -19,7 +19,10 @@ export enum FindingKind {
|
|
|
19
19
|
|
|
20
20
|
// EDR
|
|
21
21
|
DEVICE_NOT_MANAGED = 'DEVICE_NOT_MANAGED',
|
|
22
|
-
|
|
22
|
+
CRITICAL_VULNERABILITY_OUT_OF_SLA = 'CRITICAL_VULNERABILITY_OUT_OF_SLA',
|
|
23
|
+
HIGH_VULNERABILITY_OUT_OF_SLA = 'HIGH_VULNERABILITY_OUT_OF_SLA',
|
|
24
|
+
MEDIUM_VULNERABILITY_OUT_OF_SLA = 'MEDIUM_VULNERABILITY_OUT_OF_SLA',
|
|
25
|
+
LOW_VULNERABILITY_OUT_OF_SLA = 'LOW_VULNERABILITY_OUT_OF_SLA',
|
|
23
26
|
|
|
24
27
|
// WEB_GATEWAY
|
|
25
28
|
WEB_GATEWAY_NOT_ACTIVE = 'WEB_GATEWAY_NOT_ACTIVE',
|
|
@@ -31,7 +34,10 @@ export const lookupFindingOutcomeByKind = (kind: FindingKind): FindingOutcome =>
|
|
|
31
34
|
case FindingKind.MFA_NOT_ENABLED:
|
|
32
35
|
case FindingKind.TRAINING_OVERDUE:
|
|
33
36
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
34
|
-
case FindingKind.
|
|
37
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
38
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
39
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
40
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
35
41
|
case FindingKind.WEB_GATEWAY_NOT_ACTIVE: {
|
|
36
42
|
return FindingOutcome.REMEDIATION;
|
|
37
43
|
}
|
|
@@ -64,7 +70,12 @@ export const lookupFindingKindByCategory = (category: string): FindingKind[] =>
|
|
|
64
70
|
return [FindingKind.WEB_GATEWAY_NOT_ACTIVE];
|
|
65
71
|
}
|
|
66
72
|
case Category.VULNERABILITY: {
|
|
67
|
-
return [
|
|
73
|
+
return [
|
|
74
|
+
FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA,
|
|
75
|
+
FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA,
|
|
76
|
+
FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA,
|
|
77
|
+
FindingKind.LOW_VULNERABILITY_OUT_OF_SLA,
|
|
78
|
+
];
|
|
68
79
|
}
|
|
69
80
|
case Category.NOTIFICATION: {
|
|
70
81
|
return [];
|
|
@@ -83,9 +94,18 @@ export const lookupFindingSeverityByKind = (kind: string): FindingSeverity | und
|
|
|
83
94
|
case FindingKind.HAS_PRIVILEGED_ACCESS:
|
|
84
95
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
85
96
|
case FindingKind.WEB_GATEWAY_NOT_ACTIVE:
|
|
86
|
-
case FindingKind.
|
|
97
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA: {
|
|
98
|
+
return FindingSeverity.CRITICAL;
|
|
99
|
+
}
|
|
100
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA: {
|
|
87
101
|
return FindingSeverity.HIGH;
|
|
88
102
|
}
|
|
103
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA: {
|
|
104
|
+
return FindingSeverity.MEDIUM;
|
|
105
|
+
}
|
|
106
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA: {
|
|
107
|
+
return FindingSeverity.LOW;
|
|
108
|
+
}
|
|
89
109
|
case FindingKind.FAILED_PHISHING:
|
|
90
110
|
case FindingKind.TRAINING_OVERDUE: {
|
|
91
111
|
return FindingSeverity.MEDIUM;
|
|
@@ -97,7 +117,7 @@ export const lookupFindingSeverityByKind = (kind: string): FindingSeverity | und
|
|
|
97
117
|
};
|
|
98
118
|
|
|
99
119
|
// https://docs.google.com/spreadsheets/d/18Ow9GGBvioAx4agnpnJGV4qnOWeLK941L7SrF4tzZiM/edit#gid=0
|
|
100
|
-
export const lookupFindingScoreByCategoryKindAndSeverity = (category: Category, kind: string
|
|
120
|
+
export const lookupFindingScoreByCategoryKindAndSeverity = (category: Category, kind: string): number => {
|
|
101
121
|
switch (category) {
|
|
102
122
|
case Category.EDR: {
|
|
103
123
|
switch (kind) {
|
|
@@ -111,21 +131,14 @@ export const lookupFindingScoreByCategoryKindAndSeverity = (category: Category,
|
|
|
111
131
|
switch (kind) {
|
|
112
132
|
case FindingKind.DEVICE_NOT_MANAGED:
|
|
113
133
|
return 10;
|
|
114
|
-
case FindingKind.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
case FindingSeverity.LOW:
|
|
123
|
-
return 2;
|
|
124
|
-
case FindingSeverity.INFO:
|
|
125
|
-
default:
|
|
126
|
-
return 0;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
134
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
135
|
+
return 15;
|
|
136
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
137
|
+
return 9;
|
|
138
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
139
|
+
return 5;
|
|
140
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
141
|
+
return 2;
|
|
129
142
|
default:
|
|
130
143
|
return 0;
|
|
131
144
|
}
|
|
@@ -198,6 +211,7 @@ export const generateInsights = (category: string, kind: string) => {
|
|
|
198
211
|
kind: '' as SaasComponentKind,
|
|
199
212
|
aid: {$has: false},
|
|
200
213
|
uid: {$has: false},
|
|
214
|
+
severity: undefined as unknown as FindingSeverity,
|
|
201
215
|
findingCondition: {} as Condition,
|
|
202
216
|
remediatedCondition: {} as Condition,
|
|
203
217
|
},
|
|
@@ -217,9 +231,25 @@ export const generateInsights = (category: string, kind: string) => {
|
|
|
217
231
|
setCondition('meta._findings.loggedIn', false);
|
|
218
232
|
insights.rule.kind = SaasComponentKind.WEB_GATEWAY_SESSION;
|
|
219
233
|
break;
|
|
220
|
-
case FindingKind.
|
|
234
|
+
case FindingKind.CRITICAL_VULNERABILITY_OUT_OF_SLA:
|
|
235
|
+
setCondition('meta._findings.overdue', true);
|
|
236
|
+
insights.rule.kind = SaasComponentKind.VULNERABILITY;
|
|
237
|
+
insights.rule.severity = FindingSeverity.CRITICAL;
|
|
238
|
+
break;
|
|
239
|
+
case FindingKind.HIGH_VULNERABILITY_OUT_OF_SLA:
|
|
240
|
+
setCondition('meta._findings.overdue', true);
|
|
241
|
+
insights.rule.kind = SaasComponentKind.VULNERABILITY;
|
|
242
|
+
insights.rule.severity = FindingSeverity.HIGH;
|
|
243
|
+
break;
|
|
244
|
+
case FindingKind.MEDIUM_VULNERABILITY_OUT_OF_SLA:
|
|
245
|
+
setCondition('meta._findings.overdue', true);
|
|
246
|
+
insights.rule.kind = SaasComponentKind.VULNERABILITY;
|
|
247
|
+
insights.rule.severity = FindingSeverity.MEDIUM;
|
|
248
|
+
break;
|
|
249
|
+
case FindingKind.LOW_VULNERABILITY_OUT_OF_SLA:
|
|
221
250
|
setCondition('meta._findings.overdue', true);
|
|
222
251
|
insights.rule.kind = SaasComponentKind.VULNERABILITY;
|
|
252
|
+
insights.rule.severity = FindingSeverity.LOW;
|
|
223
253
|
break;
|
|
224
254
|
case FindingKind.TRAINING_OVERDUE:
|
|
225
255
|
setCondition('meta._findings.overdue', true);
|
package/src/dto/findings.dto.ts
CHANGED
|
@@ -64,47 +64,49 @@ export type FindingDto = BaseDto &
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
const _FindingSpecDescription = z.unknown();
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
const _FindingSpecInsights = z.object({
|
|
68
|
+
meta: z
|
|
69
|
+
.object({
|
|
70
|
+
kind: z.nativeEnum(FindingKind),
|
|
71
|
+
severity: z.nativeEnum(FindingSeverity),
|
|
72
|
+
displayValue: z.string(),
|
|
73
|
+
})
|
|
74
|
+
.optional(),
|
|
75
|
+
rule: z
|
|
75
76
|
.object({
|
|
76
|
-
|
|
77
|
+
category: z.nativeEnum(Category),
|
|
78
|
+
kind: z.nativeEnum(SaasComponentKind),
|
|
79
|
+
aid: z
|
|
77
80
|
.object({
|
|
78
|
-
|
|
79
|
-
severity: z.nativeEnum(FindingSeverity),
|
|
80
|
-
displayValue: z.string(),
|
|
81
|
+
$has: z.boolean(),
|
|
81
82
|
})
|
|
82
83
|
.optional(),
|
|
83
|
-
|
|
84
|
+
uid: z
|
|
84
85
|
.object({
|
|
85
|
-
|
|
86
|
-
kind: z.nativeEnum(SaasComponentKind),
|
|
87
|
-
aid: z
|
|
88
|
-
.object({
|
|
89
|
-
$has: z.boolean(),
|
|
90
|
-
})
|
|
91
|
-
.optional(),
|
|
92
|
-
uid: z
|
|
93
|
-
.object({
|
|
94
|
-
$has: z.boolean(),
|
|
95
|
-
})
|
|
96
|
-
.optional(),
|
|
97
|
-
findingCondition: z.record(z.string(), z.union([z.boolean(), z.string(), z.number(), z.undefined()])),
|
|
98
|
-
remediatedCondition: z.record(z.string(), z.union([z.boolean(), z.string(), z.number(), z.undefined()])).optional(),
|
|
86
|
+
$has: z.boolean(),
|
|
99
87
|
})
|
|
100
88
|
.optional(),
|
|
89
|
+
severity: z.nativeEnum(FindingSeverity).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(),
|
|
101
92
|
})
|
|
102
93
|
.optional(),
|
|
94
|
+
});
|
|
95
|
+
export const _FindingSpecDto = _BaseDto.extend({
|
|
96
|
+
cid: z.string().nullable().optional(),
|
|
97
|
+
name: z.string(),
|
|
98
|
+
displayValue: z.string(),
|
|
99
|
+
eventType: z.string(),
|
|
100
|
+
description: z.union([z.string(), _FindingSpecDescription]),
|
|
101
|
+
severity: z.nativeEnum(FindingSeverity),
|
|
102
|
+
insights: _FindingSpecInsights.optional(),
|
|
103
103
|
expireAfterDays: z.nullable(z.number()).optional(),
|
|
104
104
|
outcome: z.nativeEnum(FindingOutcome).optional(), // TODO add column and form field??? Or just default to REMEDIATION?
|
|
105
105
|
kind: z.nativeEnum(FindingSpecKind),
|
|
106
106
|
score: z.number().optional(),
|
|
107
107
|
});
|
|
108
|
+
|
|
109
|
+
export type FindingSpecInsights = z.infer<typeof _FindingSpecInsights>;
|
|
108
110
|
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
109
111
|
|
|
110
112
|
export const _FindingSpecUpsertDto = _FindingSpecDto.partial(UPSERT_DTO_MASK);
|
|
@@ -84,6 +84,7 @@ export enum ContentType {
|
|
|
84
84
|
INTEGRATION_DOMAIN = 'integrationDomain',
|
|
85
85
|
FINDING = 'finding',
|
|
86
86
|
SECURITY_HUB_I18N = 'securityHubI18n',
|
|
87
|
+
SECURITY_HUB_RICH_I18N = 'securityHubRichI18n',
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
const ContentfulRichText: z.ZodType<EntryFieldTypes.RichText> = z.any();
|
|
@@ -149,10 +150,17 @@ export type Integration = z.infer<typeof _Integration>;
|
|
|
149
150
|
const _I18nContent = z.object({
|
|
150
151
|
key: z.string(),
|
|
151
152
|
value: z.string(),
|
|
152
|
-
useCaseFilter: z.array(z.string()),
|
|
153
|
+
useCaseFilter: z.array(z.string()).optional(),
|
|
153
154
|
});
|
|
154
155
|
export type I18nContent = z.infer<typeof _I18nContent>;
|
|
155
156
|
|
|
157
|
+
const _I18nRichContent = z.object({
|
|
158
|
+
key: z.string(),
|
|
159
|
+
value: z.unknown(),
|
|
160
|
+
useCaseFilter: z.array(z.string()).optional(),
|
|
161
|
+
});
|
|
162
|
+
export type I18nRichContent = z.infer<typeof _I18nRichContent>;
|
|
163
|
+
|
|
156
164
|
const _MessageTemplateContent = z.object({
|
|
157
165
|
id: z.string(),
|
|
158
166
|
body: z.string(),
|
|
@@ -240,6 +248,12 @@ export class ContentService {
|
|
|
240
248
|
return entries;
|
|
241
249
|
};
|
|
242
250
|
|
|
251
|
+
getI18nRichContent = async (options?: ContentOptions): Promise<I18nRichContent[]> => {
|
|
252
|
+
const rawEntries = await this.getEntries(ContentType.SECURITY_HUB_RICH_I18N, options || {});
|
|
253
|
+
const entries = rawEntries.map(entry => _I18nRichContent.parse(entry));
|
|
254
|
+
return entries;
|
|
255
|
+
};
|
|
256
|
+
|
|
243
257
|
static instance(): ContentService {
|
|
244
258
|
return new ContentService(new ContentfulService());
|
|
245
259
|
}
|