@ampsec/platform-client 64.0.0 → 64.1.1
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/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/connector.platform.service.d.ts +7 -0
- package/build/src/services/connector.platform.service.js +19 -0
- package/build/src/services/connector.platform.service.js.map +1 -0
- package/build/src/settings.js +8 -8
- package/build/src/settings.js.map +1 -1
- package/package.json +1 -1
- package/src/services/AmpSdk.ts +3 -4
- package/src/services/connector.platform.service.ts +18 -0
- package/src/settings.ts +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformAgentDto, PlatformAgentUpsertDto,
|
|
1
|
+
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformAgentDto, PlatformAgentUpsertDto, PlatformCustomActionDto, PlatformCustomActionUpsertDto, PlatformCustomScoreCohortDto, PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto, PlatformFindingDto, PlatformFindingSpecDto, PlatformFindingSpecUpsertDto, PlatformFindingUpsertDto, 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';
|
|
@@ -6,6 +6,7 @@ import { AmpSdkSettingsService } from './settings.service';
|
|
|
6
6
|
import { AmpSaaSEntityService, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService } from './saasEntity.service';
|
|
7
7
|
import { ContentfulService } from './contentful.service';
|
|
8
8
|
import { FindingsInsightsService } from './findingsInsights.service';
|
|
9
|
+
import { PlatformConnectorService } from './connector.platform.service';
|
|
9
10
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
10
11
|
/**
|
|
11
12
|
* AMP API
|
|
@@ -20,7 +21,7 @@ export declare class AmpSdkServices {
|
|
|
20
21
|
readonly actionExecutions: AmpEntityService<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>;
|
|
21
22
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
22
23
|
readonly asset: AmpSdkAssetService;
|
|
23
|
-
readonly connectors:
|
|
24
|
+
readonly connectors: PlatformConnectorService;
|
|
24
25
|
readonly contentful: ContentfulService;
|
|
25
26
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
26
27
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
@@ -9,6 +9,7 @@ const settings_service_1 = require("./settings.service");
|
|
|
9
9
|
const saasEntity_service_1 = require("./saasEntity.service");
|
|
10
10
|
const contentful_service_1 = require("./contentful.service");
|
|
11
11
|
const findingsInsights_service_1 = require("./findingsInsights.service");
|
|
12
|
+
const connector_platform_service_1 = require("./connector.platform.service");
|
|
12
13
|
/**
|
|
13
14
|
* AMP API
|
|
14
15
|
* This client is a wrapper around the AMP REST API meant to be used by
|
|
@@ -23,7 +24,7 @@ class AmpSdkServices {
|
|
|
23
24
|
this.actionExecutions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.ACTION_EXECUTION, constants_1.TARGET_API_PLATFORM);
|
|
24
25
|
this.agents = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.AGENTS, constants_1.TARGET_API_PLATFORM);
|
|
25
26
|
this.asset = new entity_service_1.AmpSdkAssetService(rest, constants_1.TARGET_API_PLATFORM);
|
|
26
|
-
this.connectors = new
|
|
27
|
+
this.connectors = new connector_platform_service_1.PlatformConnectorService(rest);
|
|
27
28
|
this.contentful = new contentful_service_1.ContentfulService();
|
|
28
29
|
this.customActions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS, constants_1.TARGET_API_PLATFORM);
|
|
29
30
|
this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, 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":";;;AA4CA,qDAQ0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AACnE,6EAAsE;AAItE;;;;;;;;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,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,C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AAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,+BAAmB,CAAC,CAAC;QAC7G,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,kCAAiB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AA1ED,wCA0EC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PlatformConnectorDto, PlatformConnectorUpsertDto } from '../dto';
|
|
2
|
+
import { AmpEntityServiceImpl } from './entity.service';
|
|
3
|
+
import { RestClient } from './rest';
|
|
4
|
+
export declare class PlatformConnectorService extends AmpEntityServiceImpl<PlatformConnectorUpsertDto, PlatformConnectorDto> {
|
|
5
|
+
constructor(rest: RestClient);
|
|
6
|
+
seedFindings(id: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlatformConnectorService = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const entity_service_1 = require("./entity.service");
|
|
6
|
+
class PlatformConnectorService extends entity_service_1.AmpEntityServiceImpl {
|
|
7
|
+
constructor(rest) {
|
|
8
|
+
super(rest, constants_1.KIND.CONNECTORS, constants_1.TARGET_API_PLATFORM);
|
|
9
|
+
}
|
|
10
|
+
async seedFindings(id) {
|
|
11
|
+
await this.getPage({
|
|
12
|
+
url: `/${this.targetApi}/v1/${this.kind}/${id}/seed_findings`,
|
|
13
|
+
method: 'POST',
|
|
14
|
+
});
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.PlatformConnectorService = PlatformConnectorService;
|
|
19
|
+
//# sourceMappingURL=connector.platform.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.platform.service.js","sourceRoot":"","sources":["../../../src/services/connector.platform.service.ts"],"names":[],"mappings":";;;AACA,2CAAsD;AACtD,qDAAsD;AAGtD,MAAa,wBAAyB,SAAQ,qCAAsE;IAClH,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,UAAU,EAAE,+BAAmB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,EAAU;QAC3B,MAAM,IAAI,CAAC,OAAO,CAAC;YACjB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,gBAAgB;YAC7D,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;QACH,OAAO;IACT,CAAC;CACF;AAZD,4DAYC"}
|
package/build/src/settings.js
CHANGED
|
@@ -59,10 +59,10 @@ const GLOBAL_CONNECTOR_DEFAULT_SETTINGS = {
|
|
|
59
59
|
const CROWDSTRIKE_SETTINGS = {
|
|
60
60
|
CROWDSTRIKE_ETL_VULN_ENABLED: services_1.AmpSettingsMap.asKey('tenable.etl.vuln.enabled', true),
|
|
61
61
|
CROWDSTRIKE_ETL_VULN_FILTER_BLOB: services_1.AmpSettingsMap.asKey('_tenable.etl.vuln.filter.blob', { filter: "status:!'closed'" }),
|
|
62
|
-
CROWDSTRIKE_VULN_CRIT_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.crit.deadline', '
|
|
63
|
-
CROWDSTRIKE_VULN_HIGH_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.high.deadline', '
|
|
64
|
-
CROWDSTRIKE_VULN_MEDIUM_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.medium.deadline', '
|
|
65
|
-
CROWDSTRIKE_VULN_LOW_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.low.deadline', '
|
|
62
|
+
CROWDSTRIKE_VULN_CRIT_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.crit.deadline', '13 day'),
|
|
63
|
+
CROWDSTRIKE_VULN_HIGH_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.high.deadline', '30 day'),
|
|
64
|
+
CROWDSTRIKE_VULN_MEDIUM_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.medium.deadline', '90 day'),
|
|
65
|
+
CROWDSTRIKE_VULN_LOW_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('crowdstrike.vuln.low.deadline', '180 day'),
|
|
66
66
|
};
|
|
67
67
|
const GOOGLE_SETTINGS = {
|
|
68
68
|
GOOGLE_EXECUTIVE_GROUPS: services_1.AmpSettingsMap.asKey('google.groups.exec.extIds', []),
|
|
@@ -100,10 +100,10 @@ const TENABLE_SETTINGS = {
|
|
|
100
100
|
TENABLE_ACTIVE_LAST_SEEN_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.active.lastSeen.threshold', '14 day'),
|
|
101
101
|
TENABLE_ASSET_ARCHIVED_RULE: services_1.AmpSettingsMap.asKey('tenable.asset.archived.rule', { MATCH_NOTHING: true }),
|
|
102
102
|
TENABLE_ASSET_ARCHIVED_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.asset.archived.threshold', '1 year'),
|
|
103
|
-
TENABLE_VULN_CRIT_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.crit.deadline', '
|
|
104
|
-
TENABLE_VULN_HIGH_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.high.deadline', '
|
|
105
|
-
TENABLE_VULN_MEDIUM_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.medium.deadline', '
|
|
106
|
-
TENABLE_VULN_LOW_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.low.deadline', '
|
|
103
|
+
TENABLE_VULN_CRIT_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.crit.deadline', '14 day'),
|
|
104
|
+
TENABLE_VULN_HIGH_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.high.deadline', '30 day'),
|
|
105
|
+
TENABLE_VULN_MEDIUM_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.medium.deadline', '90 day'),
|
|
106
|
+
TENABLE_VULN_LOW_DEADLINE_THRESHOLD: services_1.AmpSettingsMap.asKey('tenable.vuln.low.deadline', '180 day'),
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* Collection of hard coded settings to be use centrally across services and user interfaces.
|
|
@@ -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;IAClF,oEAAoE;IACpE,qBAAqB,EAAE,yBAAc,CAAC,KAAK,CAAU,uBAAuB,EAAE,IAAI,CAAC;IACnF,4CAA4C;IAC5C,YAAY,EAAE,yBAAc,CAAC,KAAK,CAAU,eAAe,EAAE,KAAK,CAAC;IACnE,sDAAsD;IACtD,mBAAmB,EAAE,yBAAc,CAAC,KAAK,CAAsB,0BAA0B,CAAC;IAC1F;;;;;;;OAOG;IACH,cAA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AC;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;CAC/B,CAAC"}
|
package/package.json
CHANGED
package/src/services/AmpSdk.ts
CHANGED
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
PlatformActionExecutionUpsertDto,
|
|
4
4
|
PlatformAgentDto,
|
|
5
5
|
PlatformAgentUpsertDto,
|
|
6
|
-
PlatformConnectorDto,
|
|
7
|
-
PlatformConnectorUpsertDto,
|
|
8
6
|
PlatformCustomActionDto,
|
|
9
7
|
PlatformCustomActionUpsertDto,
|
|
10
8
|
PlatformCustomScoreCohortDto,
|
|
@@ -60,6 +58,7 @@ import {AmpSdkSettingsService} from './settings.service';
|
|
|
60
58
|
import {AmpSaaSEntityService, AmpSaaSEntityServiceImpl, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService} from './saasEntity.service';
|
|
61
59
|
import {ContentfulService} from './contentful.service';
|
|
62
60
|
import {FindingsInsightsService} from './findingsInsights.service';
|
|
61
|
+
import {PlatformConnectorService} from './connector.platform.service';
|
|
63
62
|
|
|
64
63
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
65
64
|
|
|
@@ -76,7 +75,7 @@ export class AmpSdkServices {
|
|
|
76
75
|
readonly actionExecutions: AmpEntityService<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>;
|
|
77
76
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
78
77
|
readonly asset: AmpSdkAssetService;
|
|
79
|
-
readonly connectors:
|
|
78
|
+
readonly connectors: PlatformConnectorService;
|
|
80
79
|
readonly contentful: ContentfulService;
|
|
81
80
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
82
81
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
@@ -108,7 +107,7 @@ export class AmpSdkServices {
|
|
|
108
107
|
this.actionExecutions = new AmpEntityServiceImpl<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>(rest, KIND.ACTION_EXECUTION, TARGET_API_PLATFORM);
|
|
109
108
|
this.agents = new AmpEntityServiceImpl<PlatformAgentUpsertDto, PlatformAgentDto>(rest, KIND.AGENTS, TARGET_API_PLATFORM);
|
|
110
109
|
this.asset = new AmpSdkAssetService(rest, TARGET_API_PLATFORM);
|
|
111
|
-
this.connectors = new
|
|
110
|
+
this.connectors = new PlatformConnectorService(rest);
|
|
112
111
|
this.contentful = new ContentfulService();
|
|
113
112
|
this.customActions = new AmpEntityServiceImpl<PlatformCustomActionUpsertDto, PlatformCustomActionDto>(rest, KIND.CUSTOM_ACTIONS, TARGET_API_PLATFORM);
|
|
114
113
|
this.customScoreCohorts = new AmpEntityServiceImpl<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS, TARGET_API_PLATFORM);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {PlatformConnectorDto, PlatformConnectorUpsertDto} from '../dto';
|
|
2
|
+
import {KIND, TARGET_API_PLATFORM} from './constants';
|
|
3
|
+
import {AmpEntityServiceImpl} from './entity.service';
|
|
4
|
+
import {RestClient} from './rest';
|
|
5
|
+
|
|
6
|
+
export class PlatformConnectorService extends AmpEntityServiceImpl<PlatformConnectorUpsertDto, PlatformConnectorDto> {
|
|
7
|
+
constructor(rest: RestClient) {
|
|
8
|
+
super(rest, KIND.CONNECTORS, TARGET_API_PLATFORM);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async seedFindings(id: string): Promise<void> {
|
|
12
|
+
await this.getPage({
|
|
13
|
+
url: `/${this.targetApi}/v1/${this.kind}/${id}/seed_findings`,
|
|
14
|
+
method: 'POST',
|
|
15
|
+
});
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/settings.ts
CHANGED
|
@@ -60,10 +60,10 @@ const GLOBAL_CONNECTOR_DEFAULT_SETTINGS = {
|
|
|
60
60
|
const CROWDSTRIKE_SETTINGS = {
|
|
61
61
|
CROWDSTRIKE_ETL_VULN_ENABLED: AmpSettingsMap.asKey<boolean>('tenable.etl.vuln.enabled', true),
|
|
62
62
|
CROWDSTRIKE_ETL_VULN_FILTER_BLOB: AmpSettingsMap.asKey<{filter: string}>('_tenable.etl.vuln.filter.blob', {filter: "status:!'closed'"}),
|
|
63
|
-
CROWDSTRIKE_VULN_CRIT_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.crit.deadline', '
|
|
64
|
-
CROWDSTRIKE_VULN_HIGH_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.high.deadline', '
|
|
65
|
-
CROWDSTRIKE_VULN_MEDIUM_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.medium.deadline', '
|
|
66
|
-
CROWDSTRIKE_VULN_LOW_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.low.deadline', '
|
|
63
|
+
CROWDSTRIKE_VULN_CRIT_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.crit.deadline', '13 day'),
|
|
64
|
+
CROWDSTRIKE_VULN_HIGH_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.high.deadline', '30 day'),
|
|
65
|
+
CROWDSTRIKE_VULN_MEDIUM_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.medium.deadline', '90 day'),
|
|
66
|
+
CROWDSTRIKE_VULN_LOW_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('crowdstrike.vuln.low.deadline', '180 day'),
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const GOOGLE_SETTINGS = {
|
|
@@ -110,10 +110,10 @@ const TENABLE_SETTINGS = {
|
|
|
110
110
|
TENABLE_ACTIVE_LAST_SEEN_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.active.lastSeen.threshold', '14 day'),
|
|
111
111
|
TENABLE_ASSET_ARCHIVED_RULE: AmpSettingsMap.asKey<unknown>('tenable.asset.archived.rule', {MATCH_NOTHING: true}),
|
|
112
112
|
TENABLE_ASSET_ARCHIVED_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.asset.archived.threshold', '1 year'),
|
|
113
|
-
TENABLE_VULN_CRIT_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.crit.deadline', '
|
|
114
|
-
TENABLE_VULN_HIGH_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.high.deadline', '
|
|
115
|
-
TENABLE_VULN_MEDIUM_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.medium.deadline', '
|
|
116
|
-
TENABLE_VULN_LOW_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.low.deadline', '
|
|
113
|
+
TENABLE_VULN_CRIT_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.crit.deadline', '14 day'),
|
|
114
|
+
TENABLE_VULN_HIGH_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.high.deadline', '30 day'),
|
|
115
|
+
TENABLE_VULN_MEDIUM_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.medium.deadline', '90 day'),
|
|
116
|
+
TENABLE_VULN_LOW_DEADLINE_THRESHOLD: AmpSettingsMap.asKey<string>('tenable.vuln.low.deadline', '180 day'),
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
/**
|