@ampsec/platform-client 69.7.0 → 70.1.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/FilterCriteria.d.ts +82 -45
- package/build/src/dto/actionExecution.dto.d.ts +3 -2
- package/build/src/dto/agents.dto.d.ts +3 -2
- package/build/src/dto/assets.dto.d.ts +31 -10
- package/build/src/dto/base.dto.d.ts +6 -4
- package/build/src/dto/coverage.dto.d.ts +144 -106
- package/build/src/dto/customActions.dto.d.ts +32 -28
- package/build/src/dto/customScores.dto.d.ts +8 -4
- package/build/src/dto/eng/coverage.dto.d.ts +8 -8
- package/build/src/dto/findings.dto.d.ts +41 -40
- package/build/src/dto/findings.dto.js +9 -0
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/flows.dto.d.ts +222 -179
- package/build/src/dto/notification.dto.d.ts +157 -134
- package/build/src/dto/page.dto.d.ts +5 -5
- package/build/src/dto/platform/platform.actionExecution.dto.d.ts +26 -12
- package/build/src/dto/platform/platform.agents.dto.d.ts +3 -2
- package/build/src/dto/platform/platform.customActions.dto.d.ts +36 -32
- package/build/src/dto/platform/platform.customScores.dto.d.ts +16 -9
- package/build/src/dto/platform/platform.findings.dto.d.ts +37 -34
- package/build/src/dto/platform/platform.flows.dto.d.ts +176 -136
- package/build/src/dto/platform/platform.saasAssets.dto.d.ts +29 -25
- package/build/src/dto/platform/platform.saasUsers.dto.d.ts +48 -44
- package/build/src/dto/platform/platform.tokens.dto.d.ts +21 -9
- package/build/src/dto/platform/tenant.based.dto.d.ts +6 -5
- package/build/src/dto/saasAssets.dto.d.ts +84 -58
- package/build/src/dto/saasUsers.dto.d.ts +131 -110
- package/build/src/dto/tokens.dto.d.ts +3 -2
- package/build/src/dto/users.dto.d.ts +8 -8
- package/build/src/services/AmpSdk.d.ts +3 -2
- package/build/src/services/AmpSdk.js +2 -1
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/contentful.service.d.ts +12 -12
- package/build/src/services/findings.service.d.ts +4 -4
- package/build/src/services/findings.service.js +5 -4
- package/build/src/services/findings.service.js.map +1 -1
- package/build/src/settings.d.ts +3 -0
- package/build/src/settings.js +3 -0
- package/build/src/settings.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/findings.dto.ts +10 -0
- package/src/services/AmpSdk.ts +3 -4
- package/src/services/findings.service.ts +6 -5
- package/src/settings.ts +3 -0
|
@@ -15,23 +15,23 @@ export declare const _SimpleUserDto: z.ZodObject<{
|
|
|
15
15
|
/** Last activity time for the user */
|
|
16
16
|
lastActivity: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
id?: string | undefined;
|
|
19
|
-
score?: number | undefined;
|
|
20
|
-
firstName?: string | undefined;
|
|
21
|
-
lastName?: string | undefined;
|
|
22
18
|
email?: string | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
23
20
|
organization?: string | undefined;
|
|
24
21
|
department?: string | undefined;
|
|
22
|
+
firstName?: string | undefined;
|
|
23
|
+
lastName?: string | undefined;
|
|
24
|
+
score?: number | undefined;
|
|
25
25
|
active?: boolean | undefined;
|
|
26
26
|
lastActivity?: string | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
id?: string | undefined;
|
|
29
|
-
score?: number | undefined;
|
|
30
|
-
firstName?: string | undefined;
|
|
31
|
-
lastName?: string | undefined;
|
|
32
28
|
email?: string | undefined;
|
|
29
|
+
id?: string | undefined;
|
|
33
30
|
organization?: string | undefined;
|
|
34
31
|
department?: string | undefined;
|
|
32
|
+
firstName?: string | undefined;
|
|
33
|
+
lastName?: string | undefined;
|
|
34
|
+
score?: number | undefined;
|
|
35
35
|
active?: boolean | undefined;
|
|
36
36
|
lastActivity?: string | undefined;
|
|
37
37
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformCustomActionDto, PlatformCustomActionUpsertDto, PlatformCustomScoreCohortDto, PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto,
|
|
1
|
+
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformCustomActionDto, PlatformCustomActionUpsertDto, PlatformCustomScoreCohortDto, PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto, PlatformFindingSpecDto, PlatformFindingSpecUpsertDto, PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto, PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto, PlatformJobSpecDto, PlatformJobSpecUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformStagedSaasAssetDto, PlatformStagedSaasAssetUpsertDto, PlatformStagedSaasUserDto, PlatformStagedSaasUserUpsertDto, PlatformTokenDto, PlatformTokenUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpSdkAssetService, AmpSdkTenantService, AmpSdkUserService, TruncatableAmpEntityService } from './entity.service';
|
|
3
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
4
4
|
import { EnumService } from './rest/EnumService';
|
|
@@ -8,6 +8,7 @@ import { ContentfulService } from './contentful.service';
|
|
|
8
8
|
import { FindingsInsightsService } from './findingsInsights.service';
|
|
9
9
|
import { PlatformConnectorService } from './connector.platform.service';
|
|
10
10
|
import { PlatformAgentService } from './AgentsService';
|
|
11
|
+
import { FindingsService } from './findings.service';
|
|
11
12
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
12
13
|
/**
|
|
13
14
|
* AMP API
|
|
@@ -28,7 +29,7 @@ export declare class AmpSdkServices {
|
|
|
28
29
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
29
30
|
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
30
31
|
readonly enums: EnumService;
|
|
31
|
-
readonly findings:
|
|
32
|
+
readonly findings: FindingsService;
|
|
32
33
|
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
33
34
|
readonly findingsInsights: FindingsInsightsService;
|
|
34
35
|
readonly flowSpecs: AmpSaaSEntityService<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>;
|
|
@@ -11,6 +11,7 @@ const contentful_service_1 = require("./contentful.service");
|
|
|
11
11
|
const findingsInsights_service_1 = require("./findingsInsights.service");
|
|
12
12
|
const connector_platform_service_1 = require("./connector.platform.service");
|
|
13
13
|
const AgentsService_1 = require("./AgentsService");
|
|
14
|
+
const findings_service_1 = require("./findings.service");
|
|
14
15
|
/**
|
|
15
16
|
* AMP API
|
|
16
17
|
* This client is a wrapper around the AMP REST API meant to be used by
|
|
@@ -31,7 +32,7 @@ class AmpSdkServices {
|
|
|
31
32
|
this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, constants_1.TARGET_API_PLATFORM);
|
|
32
33
|
this.customScoreValues = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES, constants_1.TARGET_API_PLATFORM);
|
|
33
34
|
this.enums = new EnumService_1.DefaultEnumService(rest, constants_1.TARGET_API_PLATFORM);
|
|
34
|
-
this.findings = new
|
|
35
|
+
this.findings = new findings_service_1.FindingsService(rest, constants_1.TARGET_API_PLATFORM);
|
|
35
36
|
this.findingSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS, constants_1.TARGET_API_PLATFORM);
|
|
36
37
|
this.findingsInsights = new findingsInsights_service_1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS, constants_1.TARGET_API_PLATFORM);
|
|
37
38
|
this.flowSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FLOW_SPECS, constants_1.TARGET_API_PLATFORM);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AAwCA,qDAQ0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AACnE,6EAAsE;AACtE,mDAAqD;AACrD,yDAAmD;AAInD;;;;;;;;GAQG;AACH,MAAa,cAAc;IAgCzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,qCAAoB,CAA+D,IAAI,EAAE,gBAAI,CAAC,gBAAgB,EAAE,+BAAmB,CAAC,CAAC;QACjK,IAAI,CAAC,MAAM,GAAG,IAAI,oCAAoB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,IAAI,qDAAwB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,IAAI,sCAAiB,EAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,qCAAoB,CAAyD,IAAI,EAAE,gBAAI,CAAC,cAAc,EAAE,+BAAmB,CAAC,CAAC;QACtJ,IAAI,CAAC,kBAAkB,GAAG,IAAI,qCAAoB,CAAmE,IAAI,EAAE,gBAAI,CAAC,oBAAoB,EAAE,+BAAmB,CAAC,CAAC;QAC3K,IAAI,C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,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AA1ED,wCA0EC"}
|
|
@@ -105,7 +105,7 @@ declare const _FindingContent: z.ZodObject<{
|
|
|
105
105
|
title: z.ZodString;
|
|
106
106
|
displayText: z.ZodOptional<z.ZodString>;
|
|
107
107
|
timeToComplete: z.ZodOptional<z.ZodString>;
|
|
108
|
-
instructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef,
|
|
108
|
+
instructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef, any>;
|
|
109
109
|
}, "strip", z.ZodTypeAny, {
|
|
110
110
|
title: string;
|
|
111
111
|
kind: string;
|
|
@@ -115,20 +115,20 @@ declare const _FindingContent: z.ZodObject<{
|
|
|
115
115
|
}, {
|
|
116
116
|
title: string;
|
|
117
117
|
kind: string;
|
|
118
|
-
instructions: EntryFieldTypes.RichText;
|
|
119
118
|
displayText?: string | undefined;
|
|
120
119
|
timeToComplete?: string | undefined;
|
|
120
|
+
instructions?: any;
|
|
121
121
|
}>;
|
|
122
122
|
export type FindingContent = z.infer<typeof _FindingContent>;
|
|
123
123
|
declare const _PromptTemplateContent: z.ZodObject<{
|
|
124
124
|
id: z.ZodString;
|
|
125
125
|
data: z.ZodString;
|
|
126
126
|
}, "strip", z.ZodTypeAny, {
|
|
127
|
-
data: string;
|
|
128
127
|
id: string;
|
|
129
|
-
}, {
|
|
130
128
|
data: string;
|
|
129
|
+
}, {
|
|
131
130
|
id: string;
|
|
131
|
+
data: string;
|
|
132
132
|
}>;
|
|
133
133
|
export type PromptTemplateContent = z.infer<typeof _PromptTemplateContent>;
|
|
134
134
|
declare const _Integration: z.ZodObject<{
|
|
@@ -138,7 +138,7 @@ declare const _Integration: z.ZodObject<{
|
|
|
138
138
|
icon: z.ZodOptional<z.ZodString>;
|
|
139
139
|
tileDescription: z.ZodString;
|
|
140
140
|
overview: z.ZodString;
|
|
141
|
-
installationInstructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef,
|
|
141
|
+
installationInstructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef, any>;
|
|
142
142
|
termsOfUseLink: z.ZodOptional<z.ZodString>;
|
|
143
143
|
privacyStatementLink: z.ZodOptional<z.ZodString>;
|
|
144
144
|
supportLink: z.ZodOptional<z.ZodString>;
|
|
@@ -146,13 +146,13 @@ declare const _Integration: z.ZodObject<{
|
|
|
146
146
|
tags: z.ZodDefault<z.ZodArray<z.ZodOptional<z.ZodString>, "many">>;
|
|
147
147
|
overviewLong: z.ZodString;
|
|
148
148
|
installModalDynamicTabs: z.ZodUnknown;
|
|
149
|
-
overviewRichText: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef,
|
|
149
|
+
overviewRichText: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef, any>;
|
|
150
150
|
findings: z.ZodObject<{
|
|
151
151
|
kind: z.ZodString;
|
|
152
152
|
title: z.ZodString;
|
|
153
153
|
displayText: z.ZodOptional<z.ZodString>;
|
|
154
154
|
timeToComplete: z.ZodOptional<z.ZodString>;
|
|
155
|
-
instructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef,
|
|
155
|
+
instructions: z.ZodType<EntryFieldTypes.RichText, z.ZodTypeDef, any>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
title: string;
|
|
158
158
|
kind: string;
|
|
@@ -162,9 +162,9 @@ declare const _Integration: z.ZodObject<{
|
|
|
162
162
|
}, {
|
|
163
163
|
title: string;
|
|
164
164
|
kind: string;
|
|
165
|
-
instructions: EntryFieldTypes.RichText;
|
|
166
165
|
displayText?: string | undefined;
|
|
167
166
|
timeToComplete?: string | undefined;
|
|
167
|
+
instructions?: any;
|
|
168
168
|
}>;
|
|
169
169
|
domains: z.ZodArray<z.ZodObject<{
|
|
170
170
|
name: z.ZodString;
|
|
@@ -208,28 +208,28 @@ declare const _Integration: z.ZodObject<{
|
|
|
208
208
|
findings: {
|
|
209
209
|
title: string;
|
|
210
210
|
kind: string;
|
|
211
|
-
instructions: EntryFieldTypes.RichText;
|
|
212
211
|
displayText?: string | undefined;
|
|
213
212
|
timeToComplete?: string | undefined;
|
|
213
|
+
instructions?: any;
|
|
214
214
|
};
|
|
215
215
|
logo: string;
|
|
216
216
|
providerKey: string;
|
|
217
217
|
tileDescription: string;
|
|
218
218
|
overview: string;
|
|
219
|
-
installationInstructions: EntryFieldTypes.RichText;
|
|
220
219
|
overviewLong: string;
|
|
221
|
-
overviewRichText: EntryFieldTypes.RichText;
|
|
222
220
|
domains: {
|
|
223
221
|
name: string;
|
|
224
222
|
domain: string;
|
|
225
223
|
}[];
|
|
224
|
+
tags?: (string | undefined)[] | undefined;
|
|
226
225
|
icon?: string | undefined;
|
|
226
|
+
installationInstructions?: any;
|
|
227
227
|
termsOfUseLink?: string | undefined;
|
|
228
228
|
privacyStatementLink?: string | undefined;
|
|
229
229
|
supportLink?: string | undefined;
|
|
230
230
|
formTextKeys?: unknown;
|
|
231
|
-
tags?: (string | undefined)[] | undefined;
|
|
232
231
|
installModalDynamicTabs?: unknown;
|
|
232
|
+
overviewRichText?: any;
|
|
233
233
|
}>;
|
|
234
234
|
export type Integration = z.infer<typeof _Integration>;
|
|
235
235
|
declare const _I18nContent: z.ZodObject<{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FindingBucketSummaryDto, FindingDto, FindingStatus, Page } from '../dto';
|
|
2
|
-
import { AmpDataServiceImpl } from './data.service';
|
|
1
|
+
import { FindingBucketSummaryDto, FindingDto, FindingStatus, Page, PlatformFindingDto, PlatformFindingUpsertDto } from '../dto';
|
|
3
2
|
import { RestClient, RestResponse } from './rest';
|
|
4
3
|
import { TargetApi } from './constants';
|
|
4
|
+
import { AmpEntityServiceImpl } from './entity.service';
|
|
5
5
|
export interface FindingPatchDto {
|
|
6
6
|
id?: string;
|
|
7
7
|
status: FindingStatus;
|
|
8
8
|
}
|
|
9
|
-
export declare class FindingsService extends
|
|
9
|
+
export declare class FindingsService extends AmpEntityServiceImpl<PlatformFindingUpsertDto, PlatformFindingDto> {
|
|
10
10
|
constructor(rest: RestClient, targetApi?: TargetApi);
|
|
11
11
|
patch(id: string, values: FindingPatchDto | FindingPatchDto[]): Promise<Page<FindingDto>>;
|
|
12
12
|
patchAll(values: FindingPatchDto[]): Promise<Page<FindingDto>>;
|
|
@@ -21,5 +21,5 @@ export declare class FindingsService extends AmpDataServiceImpl<FindingDto> {
|
|
|
21
21
|
* @param limit Optional limit for pagination. Default 50
|
|
22
22
|
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
23
23
|
*/
|
|
24
|
-
getFindingBuckets(tid: string, offset
|
|
24
|
+
getFindingBuckets(tid: string, offset: number | undefined, limit: number | undefined, keepOpenThresholdMs: number): Promise<Page<FindingBucketSummaryDto>>;
|
|
25
25
|
}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.FindingsService = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const dto_1 = require("../dto");
|
|
9
|
-
const data_service_1 = require("./data.service");
|
|
10
9
|
const constants_1 = require("./constants");
|
|
11
|
-
|
|
10
|
+
const entity_service_1 = require("./entity.service");
|
|
11
|
+
class FindingsService extends entity_service_1.AmpEntityServiceImpl {
|
|
12
12
|
constructor(rest, targetApi = 'api') {
|
|
13
13
|
super(rest, constants_1.KIND.FINDINGS, targetApi);
|
|
14
14
|
}
|
|
@@ -46,8 +46,8 @@ class FindingsService extends data_service_1.AmpDataServiceImpl {
|
|
|
46
46
|
* @param limit Optional limit for pagination. Default 50
|
|
47
47
|
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
48
48
|
*/
|
|
49
|
-
async getFindingBuckets(tid, offset = 0, limit = 50) {
|
|
50
|
-
const url = `/${
|
|
49
|
+
async getFindingBuckets(tid, offset = 0, limit = 50, keepOpenThresholdMs) {
|
|
50
|
+
const url = `/${this.targetApi}/v1/${this.kind}/_byUserBuckets`;
|
|
51
51
|
const res = await this.rest.call({
|
|
52
52
|
url,
|
|
53
53
|
method: 'GET',
|
|
@@ -55,6 +55,7 @@ class FindingsService extends data_service_1.AmpDataServiceImpl {
|
|
|
55
55
|
tid,
|
|
56
56
|
limit,
|
|
57
57
|
offset,
|
|
58
|
+
keepOpenThresholdMs,
|
|
58
59
|
},
|
|
59
60
|
});
|
|
60
61
|
return (0, dto_1.toTypedPage)(dto_1._FindingBucketSummaryDto, res.data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.service.js","sourceRoot":"","sources":["../../../src/services/findings.service.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,
|
|
1
|
+
{"version":3,"file":"findings.service.js","sourceRoot":"","sources":["../../../src/services/findings.service.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,gCAAqK;AAErK,2CAA+D;AAC/D,qDAAsD;AAOtD,MAAa,eAAgB,SAAQ,qCAAkE;IACrG,YAAY,IAAgB,EAAE,YAAuB,KAAK;QACxD,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,EAAU,EAAE,MAA2C;QAC3D,MAAM,GAAG,GAAG,gBAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QAClH,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,GAAG;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,MAAyB;QAChC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,GAAG;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED,eAAe,CAAC,OAAmB;QACjC,MAAM,GAAG,GAAG,IAAI,6BAAiB,OAAO,IAAI,CAAC,IAAI,eAAe,CAAC;QACjE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACpB,GAAG;YACH,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,iBAAiB,CAAC,GAAW,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,mBAA2B;QACtF,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,iBAAiB,CAAC;QAChE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,GAAG;YACH,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,GAAG;gBACH,KAAK;gBACL,MAAM;gBACN,mBAAmB;aACpB;SACF,CAAC,CAAC;QACH,OAAO,IAAA,iBAAW,EAAC,8BAAwB,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;CACF;AAxDD,0CAwDC"}
|
package/build/src/settings.d.ts
CHANGED
|
@@ -84,18 +84,21 @@ export declare const AMP_SETTINGS: {
|
|
|
84
84
|
GOOGLE_PROD_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
85
85
|
GOOGLE_PRIV_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
86
86
|
GOOGLE_SERV_ACCT_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
87
|
+
GOOGLE_IGNORED_EMAIL_LIST: import("./services").TypedAmpSettingsKey<string[]>;
|
|
87
88
|
};
|
|
88
89
|
okta: {
|
|
89
90
|
OKTA_EXECUTIVE_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
90
91
|
OKTA_PROD_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
91
92
|
OKTA_PRIV_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
92
93
|
OKTA_SERV_ACCT_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
94
|
+
OKTA_IGNORED_EMAIL_LIST: import("./services").TypedAmpSettingsKey<string[]>;
|
|
93
95
|
};
|
|
94
96
|
onelogin: {
|
|
95
97
|
ONELOGIN_EXECUTIVE_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
96
98
|
ONELOGIN_PROD_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
97
99
|
ONELOGIN_PRIV_ACCESS_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
98
100
|
ONELOGIN_SERV_ACCT_GROUPS: import("./services").TypedAmpSettingsKey<string[]>;
|
|
101
|
+
ONELOGIN_IGNORED_EMAIL_LIST: import("./services").TypedAmpSettingsKey<string[]>;
|
|
99
102
|
};
|
|
100
103
|
slack: {
|
|
101
104
|
/** Ideally this is populated at bot installtion time */
|
package/build/src/settings.js
CHANGED
|
@@ -69,6 +69,7 @@ const GOOGLE_SETTINGS = {
|
|
|
69
69
|
GOOGLE_PROD_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('google.groups.prod.extIds', []),
|
|
70
70
|
GOOGLE_PRIV_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('google.groups.priv.extIds', []),
|
|
71
71
|
GOOGLE_SERV_ACCT_GROUPS: services_1.AmpSettingsMap.asKey('google.groups.servAcct.extIds', []),
|
|
72
|
+
GOOGLE_IGNORED_EMAIL_LIST: services_1.AmpSettingsMap.asKey('google.emails.ignored', []),
|
|
72
73
|
};
|
|
73
74
|
const KNOWBE4_SETTINGS = {
|
|
74
75
|
KNOWBE4_PHISHING_EXP: services_1.AmpSettingsMap.asKey('knowbe4.phising.expiration', '90 days'),
|
|
@@ -78,12 +79,14 @@ const OKTA_SETTINGS = {
|
|
|
78
79
|
OKTA_PROD_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('okta.groups.prod.extIds', []),
|
|
79
80
|
OKTA_PRIV_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('okta.groups.priv.extIds', []),
|
|
80
81
|
OKTA_SERV_ACCT_GROUPS: services_1.AmpSettingsMap.asKey('okta.groups.servAcct.extIds', []),
|
|
82
|
+
OKTA_IGNORED_EMAIL_LIST: services_1.AmpSettingsMap.asKey('okta.emails.ignored', []),
|
|
81
83
|
};
|
|
82
84
|
const ONELOGIN_SETTINGS = {
|
|
83
85
|
ONELOGIN_EXECUTIVE_GROUPS: services_1.AmpSettingsMap.asKey('onelogin.groups.exec.extIds', []),
|
|
84
86
|
ONELOGIN_PROD_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('onelogin.groups.prod.extIds', []),
|
|
85
87
|
ONELOGIN_PRIV_ACCESS_GROUPS: services_1.AmpSettingsMap.asKey('onelogin.groups.priv.extIds', []),
|
|
86
88
|
ONELOGIN_SERV_ACCT_GROUPS: services_1.AmpSettingsMap.asKey('onelogin.groups.servAcct.extIds', []),
|
|
89
|
+
ONELOGIN_IGNORED_EMAIL_LIST: services_1.AmpSettingsMap.asKey('onelogin.emails.ignored', []),
|
|
87
90
|
};
|
|
88
91
|
const SLACK_SETTINGS = {
|
|
89
92
|
/** Ideally this is populated at bot installtion time */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/settings.ts"],"names":[],"mappings":";;;AACA,yCAA0C;AAE1C;;2BAE2B;AAC3B;;;;GAIG;AACH,MAAM,eAAe,GAAG;IACtB,kBAAkB;IAClB,UAAU,EAAE,yBAAc,CAAC,KAAK,CAAU,iCAAiC,EAAE,IAAI,CAAC;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AAG;IAC1B;;;;OAIG;IACH,MAAM,EAAE;QACN,GAAG,eAAe;QAClB,4EAA4E;QAC5E,iCAAiC,EAAE,yBAAc,CAAC,KAAK,CAAkC,kCAAkC,CAAC;KAC7H;IACD;;;OAGG;IACH,iBAAiB,EAAE;QACjB,GAAG,iCAAiC;KACrC;IACD;;0BAEsB;IACtB,WAAW,EAAE,EAAC,GAAG,oBAAoB,EAAC;IACtC,MAAM,EAAE,EAAC,GAAG,eAAe,EAAC;IAC5B,IAAI,EAAE,EAAC,GAAG,aAAa,EAAC;IACxB,QAAQ,EAAE,EAAC,GAAG,iBAAiB,EAAC;IAChC,KAAK,EAAE,EAAC,GAAG,cAAc,EAAC;IAC1B,OAAO,EAAE,EAAC,GAAG,gBAAgB,EAAC;IAC9B,OAAO,EAAE,EAAC,GAAG,gBAAgB,EAAC;IAC9B,WAAW,EAAE,EAAC,GAAG,oBAAoB,EAAC;CACvC,CAAC"}
|
package/package.json
CHANGED
package/src/dto/findings.dto.ts
CHANGED
|
@@ -83,6 +83,16 @@ export const _FindingBucketSummaryDto = z.object({
|
|
|
83
83
|
});
|
|
84
84
|
export type FindingBucketSummaryDto = z.infer<typeof _FindingBucketSummaryDto>;
|
|
85
85
|
|
|
86
|
+
// export const _PendingFindingFilter = z.object({
|
|
87
|
+
// tid: z.string().optional(),
|
|
88
|
+
// flowSpecIds: z.array(z.string()),
|
|
89
|
+
// eventTypes: z.array(z.string()).optional(),
|
|
90
|
+
// severities: z.array(z.nativeEnum(FindingSeverity)).optional(),
|
|
91
|
+
// limit: z.number().optional(),
|
|
92
|
+
// offset: z.number().optional(),
|
|
93
|
+
// });
|
|
94
|
+
// export type PendingFindingFilter = z.infer<typeof _PendingFindingFilter>;
|
|
95
|
+
|
|
86
96
|
const _FindingSpecDescription = z.unknown();
|
|
87
97
|
const _FindingSpecInsights = z.object({
|
|
88
98
|
meta: z
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -7,10 +7,8 @@ import {
|
|
|
7
7
|
PlatformCustomScoreCohortUpsertDto,
|
|
8
8
|
PlatformCustomScoreValueDto,
|
|
9
9
|
PlatformCustomScoreValueUpsertDto,
|
|
10
|
-
PlatformFindingDto,
|
|
11
10
|
PlatformFindingSpecDto,
|
|
12
11
|
PlatformFindingSpecUpsertDto,
|
|
13
|
-
PlatformFindingUpsertDto,
|
|
14
12
|
PlatformFlowSpecDto,
|
|
15
13
|
PlatformFlowSpecUpsertDto,
|
|
16
14
|
PlatformFlowStateDto,
|
|
@@ -58,6 +56,7 @@ import {ContentfulService} from './contentful.service';
|
|
|
58
56
|
import {FindingsInsightsService} from './findingsInsights.service';
|
|
59
57
|
import {PlatformConnectorService} from './connector.platform.service';
|
|
60
58
|
import {PlatformAgentService} from './AgentsService';
|
|
59
|
+
import {FindingsService} from './findings.service';
|
|
61
60
|
|
|
62
61
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
63
62
|
|
|
@@ -80,7 +79,7 @@ export class AmpSdkServices {
|
|
|
80
79
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
81
80
|
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
82
81
|
readonly enums: EnumService;
|
|
83
|
-
readonly findings:
|
|
82
|
+
readonly findings: FindingsService;
|
|
84
83
|
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
85
84
|
readonly findingsInsights: FindingsInsightsService;
|
|
86
85
|
readonly flowSpecs: AmpSaaSEntityService<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>;
|
|
@@ -112,7 +111,7 @@ export class AmpSdkServices {
|
|
|
112
111
|
this.customScoreCohorts = new AmpEntityServiceImpl<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS, TARGET_API_PLATFORM);
|
|
113
112
|
this.customScoreValues = new AmpEntityServiceImpl<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>(rest, KIND.CUSTOM_SCORE_VALUES, TARGET_API_PLATFORM);
|
|
114
113
|
this.enums = new DefaultEnumService(rest, TARGET_API_PLATFORM);
|
|
115
|
-
this.findings = new
|
|
114
|
+
this.findings = new FindingsService(rest, TARGET_API_PLATFORM);
|
|
116
115
|
this.findingSpecs = new AmpSaaSEntityServiceImpl<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>(rest, KIND.FINDING_SPECS, TARGET_API_PLATFORM);
|
|
117
116
|
this.findingsInsights = new FindingsInsightsService(rest, KIND.FINDINGS_INSIGHTS, TARGET_API_PLATFORM);
|
|
118
117
|
this.flowSpecs = new AmpSaaSEntityServiceImpl<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>(rest, KIND.FLOW_SPECS, TARGET_API_PLATFORM);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import {FindingBucketSummaryDto, FindingDto, FindingStatus, Page, _FindingBucketSummaryDto, toTypedPage} from '../dto';
|
|
3
|
-
import {AmpDataServiceImpl} from './data.service';
|
|
2
|
+
import {FindingBucketSummaryDto, FindingDto, FindingStatus, Page, PlatformFindingDto, PlatformFindingUpsertDto, _FindingBucketSummaryDto, toTypedPage} from '../dto';
|
|
4
3
|
import {RestClient, RestResponse} from './rest';
|
|
5
4
|
import {KIND, TARGET_API_ENGAGE, TargetApi} from './constants';
|
|
5
|
+
import {AmpEntityServiceImpl} from './entity.service';
|
|
6
6
|
|
|
7
7
|
export interface FindingPatchDto {
|
|
8
8
|
id?: string;
|
|
9
9
|
status: FindingStatus;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export class FindingsService extends
|
|
12
|
+
export class FindingsService extends AmpEntityServiceImpl<PlatformFindingUpsertDto, PlatformFindingDto> {
|
|
13
13
|
constructor(rest: RestClient, targetApi: TargetApi = 'api') {
|
|
14
14
|
super(rest, KIND.FINDINGS, targetApi);
|
|
15
15
|
}
|
|
@@ -51,8 +51,8 @@ export class FindingsService extends AmpDataServiceImpl<FindingDto> {
|
|
|
51
51
|
* @param limit Optional limit for pagination. Default 50
|
|
52
52
|
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
53
53
|
*/
|
|
54
|
-
async getFindingBuckets(tid: string, offset = 0, limit = 50): Promise<Page<FindingBucketSummaryDto>> {
|
|
55
|
-
const url = `/${
|
|
54
|
+
async getFindingBuckets(tid: string, offset = 0, limit = 50, keepOpenThresholdMs: number): Promise<Page<FindingBucketSummaryDto>> {
|
|
55
|
+
const url = `/${this.targetApi}/v1/${this.kind}/_byUserBuckets`;
|
|
56
56
|
const res = await this.rest.call({
|
|
57
57
|
url,
|
|
58
58
|
method: 'GET',
|
|
@@ -60,6 +60,7 @@ export class FindingsService extends AmpDataServiceImpl<FindingDto> {
|
|
|
60
60
|
tid,
|
|
61
61
|
limit,
|
|
62
62
|
offset,
|
|
63
|
+
keepOpenThresholdMs,
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
66
|
return toTypedPage(_FindingBucketSummaryDto, res.data);
|
package/src/settings.ts
CHANGED
|
@@ -71,6 +71,7 @@ const GOOGLE_SETTINGS = {
|
|
|
71
71
|
GOOGLE_PROD_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('google.groups.prod.extIds', []),
|
|
72
72
|
GOOGLE_PRIV_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('google.groups.priv.extIds', []),
|
|
73
73
|
GOOGLE_SERV_ACCT_GROUPS: AmpSettingsMap.asKey<string[]>('google.groups.servAcct.extIds', []),
|
|
74
|
+
GOOGLE_IGNORED_EMAIL_LIST: AmpSettingsMap.asKey<string[]>('google.emails.ignored', []),
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
const KNOWBE4_SETTINGS = {
|
|
@@ -82,6 +83,7 @@ const OKTA_SETTINGS = {
|
|
|
82
83
|
OKTA_PROD_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('okta.groups.prod.extIds', []),
|
|
83
84
|
OKTA_PRIV_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('okta.groups.priv.extIds', []),
|
|
84
85
|
OKTA_SERV_ACCT_GROUPS: AmpSettingsMap.asKey<string[]>('okta.groups.servAcct.extIds', []),
|
|
86
|
+
OKTA_IGNORED_EMAIL_LIST: AmpSettingsMap.asKey<string[]>('okta.emails.ignored', []),
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
const ONELOGIN_SETTINGS = {
|
|
@@ -89,6 +91,7 @@ const ONELOGIN_SETTINGS = {
|
|
|
89
91
|
ONELOGIN_PROD_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('onelogin.groups.prod.extIds', []),
|
|
90
92
|
ONELOGIN_PRIV_ACCESS_GROUPS: AmpSettingsMap.asKey<string[]>('onelogin.groups.priv.extIds', []),
|
|
91
93
|
ONELOGIN_SERV_ACCT_GROUPS: AmpSettingsMap.asKey<string[]>('onelogin.groups.servAcct.extIds', []),
|
|
94
|
+
ONELOGIN_IGNORED_EMAIL_LIST: AmpSettingsMap.asKey<string[]>('onelogin.emails.ignored', []),
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
const SLACK_SETTINGS = {
|