@ampsec/platform-client 45.3.0 → 45.4.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 +2 -0
- package/build/src/dto/enums/findingKind.js +26 -1
- package/build/src/dto/enums/findingKind.js.map +1 -1
- package/build/src/dto/enums/index.d.ts +5 -2
- package/build/src/dto/enums/index.js +5 -2
- package/build/src/dto/enums/index.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +1 -3
- package/package.json +2 -2
- package/src/dto/enums/findingKind.ts +26 -0
- package/src/dto/enums/index.ts +5 -2
- package/src/dto/findings.dto.ts +1 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FindingOutcome } from './finding.outcome';
|
|
1
2
|
export declare enum FindingKind {
|
|
2
3
|
NO_ACCOUNT = "NO_ACCOUNT",
|
|
3
4
|
MFA_NOT_ENABLED = "MFA_NOT_ENABLED",
|
|
@@ -10,3 +11,4 @@ export declare enum FindingKind {
|
|
|
10
11
|
VULNERABILITY_OUT_OF_SLA = "VULNERABILITY_OUT_OF_SLA",
|
|
11
12
|
WEB_GATEWAY_NOT_ACTIVE = "WEB_GATEWAY_NOT_ACTIVE"
|
|
12
13
|
}
|
|
14
|
+
export declare const lookupFindingOutcomeByKind: (kind: FindingKind) => FindingOutcome;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindingKind = void 0;
|
|
3
|
+
exports.lookupFindingOutcomeByKind = exports.FindingKind = void 0;
|
|
4
|
+
const finding_outcome_1 = require("./finding.outcome");
|
|
4
5
|
/* eslint-disable no-unused-vars */
|
|
5
6
|
var FindingKind;
|
|
6
7
|
(function (FindingKind) {
|
|
@@ -20,4 +21,28 @@ var FindingKind;
|
|
|
20
21
|
// WEB_GATEWAY
|
|
21
22
|
FindingKind["WEB_GATEWAY_NOT_ACTIVE"] = "WEB_GATEWAY_NOT_ACTIVE";
|
|
22
23
|
})(FindingKind || (exports.FindingKind = FindingKind = {}));
|
|
24
|
+
const lookupFindingOutcomeByKind = (kind) => {
|
|
25
|
+
switch (kind) {
|
|
26
|
+
case FindingKind.NO_ACCOUNT:
|
|
27
|
+
case FindingKind.MFA_NOT_ENABLED:
|
|
28
|
+
case FindingKind.TRAINING_OVERDUE:
|
|
29
|
+
case FindingKind.DEVICE_NOT_MANAGED:
|
|
30
|
+
case FindingKind.VULNERABILITY_OUT_OF_SLA:
|
|
31
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE: {
|
|
32
|
+
return finding_outcome_1.FindingOutcome.REMEDIATION;
|
|
33
|
+
}
|
|
34
|
+
case FindingKind.IS_EXECUTIVE:
|
|
35
|
+
case FindingKind.HAS_PRODUCTION_ACCESS:
|
|
36
|
+
case FindingKind.HAS_PRIVILEGED_ACCESS: {
|
|
37
|
+
return finding_outcome_1.FindingOutcome.AWARENESS;
|
|
38
|
+
}
|
|
39
|
+
case FindingKind.FAILED_PHISHING: {
|
|
40
|
+
return finding_outcome_1.FindingOutcome.EDUCATION;
|
|
41
|
+
}
|
|
42
|
+
default: {
|
|
43
|
+
throw new Error(`Unable to lookup desired outcome for finding kind: ${kind}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.lookupFindingOutcomeByKind = lookupFindingOutcomeByKind;
|
|
23
48
|
//# sourceMappingURL=findingKind.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,WAoBX;AApBD,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,oEAAqD,CAAA;IAErD,cAAc;IACd,gEAAiD,CAAA;AACnD,CAAC,EApBW,WAAW,2BAAX,WAAW,QAoBtB"}
|
|
1
|
+
{"version":3,"file":"findingKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/findingKind.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;AAEjD,mCAAmC;AACnC,IAAY,WAoBX;AApBD,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,oEAAqD,CAAA;IAErD,cAAc;IACd,gEAAiD,CAAA;AACnD,CAAC,EApBW,WAAW,2BAAX,WAAW,QAoBtB;AAEM,MAAM,0BAA0B,GAAG,CAAC,IAAiB,EAAkB,EAAE;IAC9E,QAAQ,IAAI,EAAE;QACZ,KAAK,WAAW,CAAC,UAAU,CAAC;QAC5B,KAAK,WAAW,CAAC,eAAe,CAAC;QACjC,KAAK,WAAW,CAAC,gBAAgB,CAAC;QAClC,KAAK,WAAW,CAAC,kBAAkB,CAAC;QACpC,KAAK,WAAW,CAAC,wBAAwB,CAAC;QAC1C,KAAK,WAAW,CAAC,sBAAsB,CAAC,CAAC;YACvC,OAAO,gCAAc,CAAC,WAAW,CAAC;SACnC;QACD,KAAK,WAAW,CAAC,YAAY,CAAC;QAC9B,KAAK,WAAW,CAAC,qBAAqB,CAAC;QACvC,KAAK,WAAW,CAAC,qBAAqB,CAAC,CAAC;YACtC,OAAO,gCAAc,CAAC,SAAS,CAAC;SACjC;QACD,KAAK,WAAW,CAAC,eAAe,CAAC,CAAC;YAChC,OAAO,gCAAc,CAAC,SAAS,CAAC;SACjC;QACD,OAAO,CAAC,CAAC;YACP,MAAM,IAAI,KAAK,CAAC,sDAAsD,IAAI,EAAE,CAAC,CAAC;SAC/E;KACF;AACH,CAAC,CAAC;AAtBW,QAAA,0BAA0B,8BAsBrC"}
|
|
@@ -3,14 +3,17 @@ export * from './agent.status';
|
|
|
3
3
|
export * from './ampSettingKeys.enum';
|
|
4
4
|
export * from './category';
|
|
5
5
|
export * from './connector.status';
|
|
6
|
+
export * from './contentStrategy.kind';
|
|
7
|
+
export * from './deliveryStrategy.kind';
|
|
6
8
|
export * from './findingKind';
|
|
7
9
|
export * from './finding.severity';
|
|
8
10
|
export * from './finding.status';
|
|
11
|
+
export * from './finding.outcome';
|
|
9
12
|
export * from './globalUser.type';
|
|
10
13
|
export * from './jobExecution.status';
|
|
11
14
|
export * from './notification.status';
|
|
15
|
+
export * from './requiredDataProperty.enum';
|
|
12
16
|
export * from './riskContributor.type';
|
|
13
17
|
export * from './saasComponentKind';
|
|
14
18
|
export * from './workflowStep.kind';
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './deliveryStrategy.kind';
|
|
19
|
+
export * from './workflowTrigger.kind';
|
|
@@ -19,15 +19,18 @@ __exportStar(require("./agent.status"), exports);
|
|
|
19
19
|
__exportStar(require("./ampSettingKeys.enum"), exports);
|
|
20
20
|
__exportStar(require("./category"), exports);
|
|
21
21
|
__exportStar(require("./connector.status"), exports);
|
|
22
|
+
__exportStar(require("./contentStrategy.kind"), exports);
|
|
23
|
+
__exportStar(require("./deliveryStrategy.kind"), exports);
|
|
22
24
|
__exportStar(require("./findingKind"), exports);
|
|
23
25
|
__exportStar(require("./finding.severity"), exports);
|
|
24
26
|
__exportStar(require("./finding.status"), exports);
|
|
27
|
+
__exportStar(require("./finding.outcome"), exports);
|
|
25
28
|
__exportStar(require("./globalUser.type"), exports);
|
|
26
29
|
__exportStar(require("./jobExecution.status"), exports);
|
|
27
30
|
__exportStar(require("./notification.status"), exports);
|
|
31
|
+
__exportStar(require("./requiredDataProperty.enum"), exports);
|
|
28
32
|
__exportStar(require("./riskContributor.type"), exports);
|
|
29
33
|
__exportStar(require("./saasComponentKind"), exports);
|
|
30
34
|
__exportStar(require("./workflowStep.kind"), exports);
|
|
31
|
-
__exportStar(require("./
|
|
32
|
-
__exportStar(require("./deliveryStrategy.kind"), exports);
|
|
35
|
+
__exportStar(require("./workflowTrigger.kind"), exports);
|
|
33
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,6CAA2B;AAC3B,qDAAmC;AACnC,yDAAuC;AACvC,0DAAwC;AACxC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,8DAA4C;AAC5C,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
2
2
|
import { Category, FindingKind } from './enums';
|
|
3
|
-
import { FindingOutcome } from './enums
|
|
4
|
-
import { FindingSeverity } from './enums/finding.severity';
|
|
5
|
-
import { FindingStatus } from './enums/finding.status';
|
|
3
|
+
import { FindingOutcome, FindingSeverity, FindingStatus } from './enums';
|
|
6
4
|
import { SimpleProviderDto } from './providers.dto';
|
|
7
5
|
import { SimpleUserDto } from './users.dto';
|
|
8
6
|
export type FindingsStatusPathDto = {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ampsec/platform-client",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"runkitExampleFilename": "example/main.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"dev": "tsc --watch",
|
|
8
|
+
"start:dev": "tsc --watch",
|
|
9
9
|
"prebuild": "rimraf build",
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"predocs": "rimraf public",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {FindingOutcome} from './finding.outcome';
|
|
2
|
+
|
|
1
3
|
/* eslint-disable no-unused-vars */
|
|
2
4
|
export enum FindingKind {
|
|
3
5
|
// ALL
|
|
@@ -20,3 +22,27 @@ export enum FindingKind {
|
|
|
20
22
|
// WEB_GATEWAY
|
|
21
23
|
WEB_GATEWAY_NOT_ACTIVE = 'WEB_GATEWAY_NOT_ACTIVE',
|
|
22
24
|
}
|
|
25
|
+
|
|
26
|
+
export const lookupFindingOutcomeByKind = (kind: FindingKind): FindingOutcome => {
|
|
27
|
+
switch (kind) {
|
|
28
|
+
case FindingKind.NO_ACCOUNT:
|
|
29
|
+
case FindingKind.MFA_NOT_ENABLED:
|
|
30
|
+
case FindingKind.TRAINING_OVERDUE:
|
|
31
|
+
case FindingKind.DEVICE_NOT_MANAGED:
|
|
32
|
+
case FindingKind.VULNERABILITY_OUT_OF_SLA:
|
|
33
|
+
case FindingKind.WEB_GATEWAY_NOT_ACTIVE: {
|
|
34
|
+
return FindingOutcome.REMEDIATION;
|
|
35
|
+
}
|
|
36
|
+
case FindingKind.IS_EXECUTIVE:
|
|
37
|
+
case FindingKind.HAS_PRODUCTION_ACCESS:
|
|
38
|
+
case FindingKind.HAS_PRIVILEGED_ACCESS: {
|
|
39
|
+
return FindingOutcome.AWARENESS;
|
|
40
|
+
}
|
|
41
|
+
case FindingKind.FAILED_PHISHING: {
|
|
42
|
+
return FindingOutcome.EDUCATION;
|
|
43
|
+
}
|
|
44
|
+
default: {
|
|
45
|
+
throw new Error(`Unable to lookup desired outcome for finding kind: ${kind}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
package/src/dto/enums/index.ts
CHANGED
|
@@ -3,14 +3,17 @@ export * from './agent.status';
|
|
|
3
3
|
export * from './ampSettingKeys.enum';
|
|
4
4
|
export * from './category';
|
|
5
5
|
export * from './connector.status';
|
|
6
|
+
export * from './contentStrategy.kind';
|
|
7
|
+
export * from './deliveryStrategy.kind';
|
|
6
8
|
export * from './findingKind';
|
|
7
9
|
export * from './finding.severity';
|
|
8
10
|
export * from './finding.status';
|
|
11
|
+
export * from './finding.outcome';
|
|
9
12
|
export * from './globalUser.type';
|
|
10
13
|
export * from './jobExecution.status';
|
|
11
14
|
export * from './notification.status';
|
|
15
|
+
export * from './requiredDataProperty.enum';
|
|
12
16
|
export * from './riskContributor.type';
|
|
13
17
|
export * from './saasComponentKind';
|
|
14
18
|
export * from './workflowStep.kind';
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './deliveryStrategy.kind';
|
|
19
|
+
export * from './workflowTrigger.kind';
|
package/src/dto/findings.dto.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
2
2
|
import {Category, FindingKind} from './enums';
|
|
3
|
-
import {FindingOutcome} from './enums
|
|
4
|
-
import {FindingSeverity} from './enums/finding.severity';
|
|
5
|
-
import {FindingStatus} from './enums/finding.status';
|
|
3
|
+
import {FindingOutcome, FindingSeverity, FindingStatus} from './enums';
|
|
6
4
|
import {SimpleProviderDto} from './providers.dto';
|
|
7
5
|
import {SimpleUserDto} from './users.dto';
|
|
8
6
|
|