mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Cloud Security] Misconfiguration preview & Refactor CSP Plugin to include new package PHASE 2 (#190933)
## Summary The previous https://github.com/elastic/kibana/pull/190105 was way too big and made it hard to review without missing any bugs or potential bugs, Thus we decided we are going to make series of smaller PR to make things more manageable We will be splitting it into 4 PR Phase 1: Creating empty packages for csp and csp-common Phase 2: Move Types from CSP plugin to the Package + Deleting duplicates in the CSP plugin where possible Phase 3: Move Functions, Utils or Helpers, Hooks to Package Phase 4: Misconfiguration Preview feature (with Cypress test and other required test) This is **Phase 2** of the Process --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
985468064a
commit
6d3721a493
95 changed files with 392 additions and 303 deletions
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
export const KSPM_POLICY_TEMPLATE = 'kspm';
|
||||
export const CSPM_POLICY_TEMPLATE = 'cspm';
|
||||
export const CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN =
|
||||
'logs-cloud_security_posture.findings_latest-default';
|
||||
export const CDR_LATEST_THIRD_PARTY_MISCONFIGURATIONS_INDEX_PATTERN =
|
||||
'logs-*_latest_misconfigurations_cdr';
|
||||
export const CDR_MISCONFIGURATIONS_INDEX_PATTERN = `${CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN},${CDR_LATEST_THIRD_PARTY_MISCONFIGURATIONS_INDEX_PATTERN}`;
|
||||
export const LATEST_FINDINGS_RETENTION_POLICY = '26h';
|
||||
export const MAX_FINDINGS_TO_LOAD = 500;
|
||||
export const CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH =
|
||||
'/internal/cloud_security_posture/rules/_get_states';
|
||||
export const CSP_GET_BENCHMARK_RULES_STATE_API_CURRENT_VERSION = '1';
|
||||
export const STATUS_ROUTE_PATH = '/internal/cloud_security_posture/status';
|
||||
export const STATUS_API_CURRENT_VERSION = '1';
|
22
x-pack/packages/kbn-cloud-security-posture-common/index.ts
Normal file
22
x-pack/packages/kbn-cloud-security-posture-common/index.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase.
|
||||
// If you're using functions/types/etc... internally or within integration tests it's best to import directly from their paths
|
||||
// than expose the functions/types/etc... here. You should _only_ expose functions/types/etc... that need to be shared with other plugins here.
|
||||
|
||||
export type {
|
||||
CspStatusCode,
|
||||
IndexStatus,
|
||||
IndexDetails,
|
||||
BaseCspSetupBothPolicy,
|
||||
BaseCspSetupStatus,
|
||||
CspSetupStatus,
|
||||
CspFinding,
|
||||
} from './types';
|
||||
export * from './constants';
|
||||
export type { CspBenchmarkRuleMetadata, CspBenchmarkRulesStates } from './schema/rules';
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export { ruleStateAttributes, cspBenchmarkRuleMetadataSchema, rulesStates } from './rules';
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { TypeOf, schema } from '@kbn/config-schema';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../constants';
|
||||
|
||||
export type CspBenchmarkRuleMetadata = TypeOf<typeof cspBenchmarkRuleMetadataSchema>;
|
||||
|
||||
export const cspBenchmarkRuleMetadataSchema = schema.object({
|
||||
audit: schema.string(),
|
||||
benchmark: schema.object({
|
||||
name: schema.string(),
|
||||
posture_type: schema.maybe(
|
||||
schema.oneOf([schema.literal(CSPM_POLICY_TEMPLATE), schema.literal(KSPM_POLICY_TEMPLATE)])
|
||||
),
|
||||
id: schema.string(),
|
||||
version: schema.string(),
|
||||
rule_number: schema.maybe(schema.string()),
|
||||
}),
|
||||
default_value: schema.maybe(schema.string()),
|
||||
description: schema.string(),
|
||||
id: schema.string(),
|
||||
impact: schema.maybe(schema.string()),
|
||||
name: schema.string(),
|
||||
profile_applicability: schema.string(),
|
||||
rationale: schema.string(),
|
||||
references: schema.maybe(schema.string()),
|
||||
rego_rule_id: schema.string(),
|
||||
remediation: schema.string(),
|
||||
section: schema.string(),
|
||||
tags: schema.arrayOf(schema.string()),
|
||||
version: schema.string(),
|
||||
});
|
||||
|
||||
export const ruleStateAttributes = schema.object({
|
||||
muted: schema.boolean(),
|
||||
benchmark_id: schema.string(),
|
||||
benchmark_version: schema.string(),
|
||||
rule_number: schema.string(),
|
||||
rule_id: schema.string(),
|
||||
});
|
||||
|
||||
export const rulesStates = schema.recordOf(schema.string(), ruleStateAttributes);
|
||||
|
||||
export type CspBenchmarkRulesStates = TypeOf<typeof rulesStates>;
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": [
|
||||
"jest",
|
||||
"node",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
],
|
||||
"kbn_references": [
|
||||
"@kbn/config-schema",
|
||||
]
|
||||
}
|
|
@ -4,10 +4,46 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// TODO: this needs to be defined in a versioned schema
|
||||
import type { EcsDataStream, EcsEvent } from '@elastic/ecs';
|
||||
import { CspBenchmarkRuleMetadata } from '../types/latest';
|
||||
import type { CspBenchmarkRuleMetadata } from './schema/rules';
|
||||
|
||||
export type CspStatusCode =
|
||||
| 'indexed' // latest findings index exists and has results
|
||||
| 'indexing' // index timeout was not surpassed since installation, assumes data is being indexed
|
||||
| 'unprivileged' // user lacks privileges for the latest findings index
|
||||
| 'index-timeout' // index timeout was surpassed since installation
|
||||
| 'not-deployed' // no healthy agents were deployed
|
||||
| 'not-installed' // number of installed csp integrations is 0;
|
||||
| 'waiting_for_results'; // have healthy agents but no findings at all, assumes data is being indexed for the 1st time
|
||||
|
||||
export type IndexStatus =
|
||||
| 'not-empty' // Index contains documents
|
||||
| 'empty' // Index doesn't contain documents (or doesn't exist)
|
||||
| 'unprivileged'; // User doesn't have access to query the index
|
||||
|
||||
export interface IndexDetails {
|
||||
index: string;
|
||||
status: IndexStatus;
|
||||
}
|
||||
|
||||
export interface BaseCspSetupBothPolicy {
|
||||
status: CspStatusCode;
|
||||
installedPackagePolicies: number;
|
||||
healthyAgents: number;
|
||||
}
|
||||
|
||||
export interface BaseCspSetupStatus {
|
||||
indicesDetails: IndexDetails[];
|
||||
latestPackageVersion: string;
|
||||
cspm: BaseCspSetupBothPolicy;
|
||||
kspm: BaseCspSetupBothPolicy;
|
||||
vuln_mgmt: BaseCspSetupBothPolicy;
|
||||
isPluginInitialized: boolean;
|
||||
installedPackageVersion?: string | undefined;
|
||||
hasMisconfigurationsFindings?: boolean;
|
||||
}
|
||||
|
||||
export type CspSetupStatus = BaseCspSetupStatus;
|
||||
|
||||
export interface CspFinding {
|
||||
'@timestamp': string;
|
8
x-pack/packages/kbn-cloud-security-posture/index.ts
Normal file
8
x-pack/packages/kbn-cloud-security-posture/index.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './type';
|
37
x-pack/packages/kbn-cloud-security-posture/tsconfig.json
Normal file
37
x-pack/packages/kbn-cloud-security-posture/tsconfig.json
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": [
|
||||
"jest",
|
||||
"node",
|
||||
"react"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
],
|
||||
"kbn_references": [
|
||||
"@kbn/core",
|
||||
"@kbn/licensing-plugin",
|
||||
"@kbn/data-views-plugin",
|
||||
"@kbn/unified-search-plugin",
|
||||
"@kbn/ui-actions-plugin",
|
||||
"@kbn/field-formats-plugin",
|
||||
"@kbn/data-view-field-editor-plugin",
|
||||
"@kbn/data-plugin",
|
||||
"@kbn/kibana-utils-plugin",
|
||||
"@kbn/charts-plugin",
|
||||
"@kbn/discover-plugin",
|
||||
"@kbn/fleet-plugin",
|
||||
"@kbn/usage-collection-plugin",
|
||||
"@kbn/share-plugin",
|
||||
"@kbn/es-query",
|
||||
"@kbn/cloud-plugin",
|
||||
"@kbn/spaces-plugin",
|
||||
]
|
||||
}
|
53
x-pack/packages/kbn-cloud-security-posture/type.ts
Normal file
53
x-pack/packages/kbn-cloud-security-posture/type.ts
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { CloudSetup } from '@kbn/cloud-plugin/public';
|
||||
import type { LicensingPluginStart } from '@kbn/licensing-plugin/public';
|
||||
import { DataViewsServicePublic } from '@kbn/data-views-plugin/public';
|
||||
import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
|
||||
import { UiActionsStart } from '@kbn/ui-actions-plugin/public';
|
||||
import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
|
||||
import { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public';
|
||||
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import { ToastsStart } from '@kbn/core/public';
|
||||
import { Storage } from '@kbn/kibana-utils-plugin/public';
|
||||
|
||||
import type { ChartsPluginStart } from '@kbn/charts-plugin/public';
|
||||
import type { DiscoverStart } from '@kbn/discover-plugin/public';
|
||||
import type { FleetStart } from '@kbn/fleet-plugin/public';
|
||||
import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
|
||||
import { SharePluginStart } from '@kbn/share-plugin/public';
|
||||
import { SpacesPluginStart } from '@kbn/spaces-plugin/public';
|
||||
|
||||
import type { BoolQuery } from '@kbn/es-query';
|
||||
export interface FindingsBaseEsQuery {
|
||||
query?: {
|
||||
bool: BoolQuery;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CspClientPluginStartDeps {
|
||||
// required
|
||||
data: DataPublicPluginStart;
|
||||
dataViews: DataViewsServicePublic;
|
||||
dataViewFieldEditor: IndexPatternFieldEditorStart;
|
||||
unifiedSearch: UnifiedSearchPublicPluginStart;
|
||||
uiActions: UiActionsStart;
|
||||
fieldFormats: FieldFormatsStart;
|
||||
toastNotifications: ToastsStart;
|
||||
charts: ChartsPluginStart;
|
||||
discover: DiscoverStart;
|
||||
fleet: FleetStart;
|
||||
licensing: LicensingPluginStart;
|
||||
share: SharePluginStart;
|
||||
storage: Storage;
|
||||
spaces: SpacesPluginStart;
|
||||
cloud: CloudSetup;
|
||||
|
||||
// optional
|
||||
usageCollection?: UsageCollectionStart;
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { KSPM_POLICY_TEMPLATE, CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
AwsCredentialsTypeFieldMap,
|
||||
GcpCredentialsTypeFieldMap,
|
||||
|
@ -13,8 +14,6 @@ import {
|
|||
} from './types_old';
|
||||
|
||||
export const CLOUD_SECURITY_INTERTAL_PREFIX_ROUTE_PATH = '/internal/cloud_security_posture/';
|
||||
export const STATUS_ROUTE_PATH = '/internal/cloud_security_posture/status';
|
||||
export const STATUS_API_CURRENT_VERSION = '1';
|
||||
|
||||
export const STATS_ROUTE_PATH = '/internal/cloud_security_posture/stats/{policy_template}';
|
||||
|
||||
|
@ -31,10 +30,6 @@ export const CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH =
|
|||
'/internal/cloud_security_posture/rules/_bulk_action';
|
||||
export const CSP_BENCHMARK_RULES_BULK_ACTION_API_CURRENT_VERSION = '1';
|
||||
|
||||
export const CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH =
|
||||
'/internal/cloud_security_posture/rules/_get_states';
|
||||
export const CSP_GET_BENCHMARK_RULES_STATE_API_CURRENT_VERSION = '1';
|
||||
|
||||
export const GET_DETECTION_RULE_ALERTS_STATUS_PATH =
|
||||
'/internal/cloud_security_posture/detection_engine_rules/alerts/_status';
|
||||
export const DETECTION_RULE_ALERTS_STATUS_API_CURRENT_VERSION = '1';
|
||||
|
@ -45,11 +40,6 @@ export const CLOUD_SECURITY_POSTURE_PACKAGE_NAME = 'cloud_security_posture';
|
|||
export const CDR_MISCONFIGURATIONS_DATA_VIEW_NAME = 'Latest Cloud Security Misconfigurations';
|
||||
export const CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX =
|
||||
'security_solution_cdr_latest_misconfigurations';
|
||||
export const CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN =
|
||||
'logs-cloud_security_posture.findings_latest-default';
|
||||
export const CDR_LATEST_THIRD_PARTY_MISCONFIGURATIONS_INDEX_PATTERN =
|
||||
'logs-*_latest_misconfigurations_cdr';
|
||||
export const CDR_MISCONFIGURATIONS_INDEX_PATTERN = `${CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN},${CDR_LATEST_THIRD_PARTY_MISCONFIGURATIONS_INDEX_PATTERN}`;
|
||||
|
||||
export const CDR_VULNERABILITIES_DATA_VIEW_NAME = 'Latest Cloud Security Vulnerabilities';
|
||||
export const CDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX =
|
||||
|
@ -65,8 +55,6 @@ export const LATEST_FINDINGS_INDEX_TEMPLATE_NAME = 'logs-cloud_security_posture.
|
|||
export const LATEST_FINDINGS_INDEX_DEFAULT_NS =
|
||||
'logs-cloud_security_posture.findings_latest-default';
|
||||
|
||||
export const LATEST_FINDINGS_RETENTION_POLICY = '26h';
|
||||
|
||||
export const BENCHMARK_SCORE_INDEX_TEMPLATE_NAME = 'logs-cloud_security_posture.scores';
|
||||
export const BENCHMARK_SCORE_INDEX_PATTERN = 'logs-cloud_security_posture.scores-*';
|
||||
export const BENCHMARK_SCORE_INDEX_DEFAULT_NS = 'logs-cloud_security_posture.scores-default';
|
||||
|
@ -127,8 +115,6 @@ export const CIS_GCP = 'cis_gcp';
|
|||
export const CIS_K8S = 'cis_k8s';
|
||||
export const CIS_EKS = 'cis_eks';
|
||||
export const CIS_AZURE = 'cis_azure';
|
||||
export const KSPM_POLICY_TEMPLATE = 'kspm';
|
||||
export const CSPM_POLICY_TEMPLATE = 'cspm';
|
||||
export const VULN_MGMT_POLICY_TEMPLATE = 'vuln_mgmt';
|
||||
export const CNVM_POLICY_TEMPLATE = 'cnvm';
|
||||
export const SUPPORTED_POLICY_TEMPLATES = [
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../constants';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
// this pages follows versioning interface strategy https://docs.elastic.dev/kibana-dev-docs/versioning-interfaces
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ export * as benchmarkV2 from './benchmarks/v2';
|
|||
|
||||
// Explicit export of everything from latest
|
||||
export type {
|
||||
cspBenchmarkRuleMetadataSchema,
|
||||
CspBenchmarkRuleMetadata,
|
||||
CspBenchmarkRule,
|
||||
FindCspBenchmarkRuleRequest,
|
||||
FindCspBenchmarkRuleResponse,
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../constants';
|
||||
|
||||
import { cspBenchmarkRuleMetadataSchema } from '@kbn/cloud-security-posture-common/schema';
|
||||
|
||||
export const DEFAULT_BENCHMARK_RULES_PER_PAGE = 25;
|
||||
|
||||
|
@ -14,36 +15,8 @@ export const DEFAULT_BENCHMARK_RULES_PER_PAGE = 25;
|
|||
|
||||
export type FindCspBenchmarkRuleRequest = TypeOf<typeof findCspBenchmarkRuleRequestSchema>;
|
||||
|
||||
export type CspBenchmarkRuleMetadata = TypeOf<typeof cspBenchmarkRuleMetadataSchema>;
|
||||
|
||||
export type CspBenchmarkRule = TypeOf<typeof cspBenchmarkRuleSchema>;
|
||||
|
||||
export const cspBenchmarkRuleMetadataSchema = schema.object({
|
||||
audit: schema.string(),
|
||||
benchmark: schema.object({
|
||||
name: schema.string(),
|
||||
posture_type: schema.maybe(
|
||||
schema.oneOf([schema.literal(CSPM_POLICY_TEMPLATE), schema.literal(KSPM_POLICY_TEMPLATE)])
|
||||
),
|
||||
id: schema.string(),
|
||||
version: schema.string(),
|
||||
rule_number: schema.maybe(schema.string()),
|
||||
}),
|
||||
default_value: schema.maybe(schema.string()),
|
||||
description: schema.string(),
|
||||
id: schema.string(),
|
||||
impact: schema.maybe(schema.string()),
|
||||
name: schema.string(),
|
||||
profile_applicability: schema.string(),
|
||||
rationale: schema.string(),
|
||||
references: schema.maybe(schema.string()),
|
||||
rego_rule_id: schema.string(),
|
||||
remediation: schema.string(),
|
||||
section: schema.string(),
|
||||
tags: schema.arrayOf(schema.string()),
|
||||
version: schema.string(),
|
||||
});
|
||||
|
||||
export const cspBenchmarkRuleSchema = schema.object({
|
||||
metadata: cspBenchmarkRuleMetadataSchema,
|
||||
});
|
||||
|
|
|
@ -6,15 +6,11 @@
|
|||
*/
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import { ruleStateAttributes, rulesStates } from '@kbn/cloud-security-posture-common/schema';
|
||||
import { BenchmarksCisId } from '../latest';
|
||||
import { DEFAULT_BENCHMARK_RULES_PER_PAGE } from './v3';
|
||||
export type {
|
||||
cspBenchmarkRuleMetadataSchema,
|
||||
CspBenchmarkRuleMetadata,
|
||||
cspBenchmarkRuleSchema,
|
||||
CspBenchmarkRule,
|
||||
FindCspBenchmarkRuleResponse,
|
||||
} from './v3';
|
||||
export type { cspBenchmarkRuleSchema, CspBenchmarkRule, FindCspBenchmarkRuleResponse } from './v3';
|
||||
|
||||
export type FindCspBenchmarkRuleRequest = TypeOf<typeof findCspBenchmarkRuleRequestSchema>;
|
||||
|
||||
|
@ -26,8 +22,6 @@ export type CspBenchmarkRulesBulkActionRequestSchema = TypeOf<
|
|||
|
||||
export type RuleStateAttributes = TypeOf<typeof ruleStateAttributes>;
|
||||
|
||||
export type CspBenchmarkRulesStates = TypeOf<typeof rulesStates>;
|
||||
|
||||
export type CspSettings = TypeOf<typeof cspSettingsSchema>;
|
||||
|
||||
export const findCspBenchmarkRuleRequestSchema = schema.object({
|
||||
|
@ -143,16 +137,6 @@ export interface CspBenchmarkRulesBulkActionResponse {
|
|||
message: string;
|
||||
}
|
||||
|
||||
const ruleStateAttributes = schema.object({
|
||||
muted: schema.boolean(),
|
||||
benchmark_id: schema.string(),
|
||||
benchmark_version: schema.string(),
|
||||
rule_number: schema.string(),
|
||||
rule_id: schema.string(),
|
||||
});
|
||||
|
||||
const rulesStates = schema.recordOf(schema.string(), ruleStateAttributes);
|
||||
|
||||
export const cspSettingsSchema = schema.object({
|
||||
rules: rulesStates,
|
||||
});
|
||||
|
|
|
@ -7,20 +7,13 @@
|
|||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
import { DEFAULT_BENCHMARK_RULES_PER_PAGE } from './v3';
|
||||
|
||||
export type {
|
||||
cspBenchmarkRuleMetadataSchema,
|
||||
CspBenchmarkRuleMetadata,
|
||||
cspBenchmarkRuleSchema,
|
||||
CspBenchmarkRule,
|
||||
FindCspBenchmarkRuleResponse,
|
||||
} from './v3';
|
||||
export type { cspBenchmarkRuleSchema, CspBenchmarkRule, FindCspBenchmarkRuleResponse } from './v3';
|
||||
export type {
|
||||
PageUrlParams,
|
||||
rulesToUpdate,
|
||||
CspBenchmarkRulesBulkActionRequestSchema,
|
||||
CspBenchmarkRulesBulkActionResponse,
|
||||
RuleStateAttributes,
|
||||
CspBenchmarkRulesStates,
|
||||
cspSettingsSchema,
|
||||
CspSettings,
|
||||
BulkActionBenchmarkRulesResponse,
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { type TypeOf } from '@kbn/config-schema';
|
||||
import { CspFinding } from './schemas/csp_finding';
|
||||
import type { CspBenchmarkRuleMetadata } from '@kbn/cloud-security-posture-common';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { SUPPORTED_CLOUDBEAT_INPUTS, SUPPORTED_POLICY_TEMPLATES } from './constants';
|
||||
|
||||
import { getComplianceDashboardSchema } from './schemas/stats';
|
||||
import type { CspBenchmarkRuleMetadata } from './types/latest';
|
||||
|
||||
export type AwsCredentialsType =
|
||||
| 'assume_role'
|
||||
|
@ -100,44 +100,6 @@ export interface ComplianceDashboardDataV2 {
|
|||
benchmarks: BenchmarkData[];
|
||||
}
|
||||
|
||||
export type CspStatusCode =
|
||||
| 'indexed' // latest findings index exists and has results
|
||||
| 'indexing' // index timeout was not surpassed since installation, assumes data is being indexed
|
||||
| 'unprivileged' // user lacks privileges for the latest findings index
|
||||
| 'index-timeout' // index timeout was surpassed since installation
|
||||
| 'not-deployed' // no healthy agents were deployed
|
||||
| 'not-installed' // number of installed csp integrations is 0;
|
||||
| 'waiting_for_results'; // have healthy agents but no findings at all, assumes data is being indexed for the 1st time
|
||||
|
||||
export type IndexStatus =
|
||||
| 'not-empty' // Index contains documents
|
||||
| 'empty' // Index doesn't contain documents (or doesn't exist)
|
||||
| 'unprivileged'; // User doesn't have access to query the index
|
||||
|
||||
export interface IndexDetails {
|
||||
index: string;
|
||||
status: IndexStatus;
|
||||
}
|
||||
|
||||
export interface BaseCspSetupBothPolicy {
|
||||
status: CspStatusCode;
|
||||
installedPackagePolicies: number;
|
||||
healthyAgents: number;
|
||||
}
|
||||
|
||||
export interface BaseCspSetupStatus {
|
||||
indicesDetails: IndexDetails[];
|
||||
latestPackageVersion: string;
|
||||
cspm: BaseCspSetupBothPolicy;
|
||||
kspm: BaseCspSetupBothPolicy;
|
||||
vuln_mgmt: BaseCspSetupBothPolicy;
|
||||
isPluginInitialized: boolean;
|
||||
installedPackageVersion?: string | undefined;
|
||||
hasMisconfigurationsFindings?: boolean;
|
||||
}
|
||||
|
||||
export type CspSetupStatus = BaseCspSetupStatus;
|
||||
|
||||
export type BenchmarkId = CspBenchmarkRuleMetadata['benchmark']['id'];
|
||||
export type BenchmarkName = CspBenchmarkRuleMetadata['benchmark']['name'];
|
||||
export type RuleSection = CspBenchmarkRuleMetadata['section'];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CspBenchmarkRuleMetadata } from '../types';
|
||||
import type { CspBenchmarkRuleMetadata } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
convertRuleTagsToMatchAllKQL,
|
||||
convertRuleTagsToMatchAnyKQL,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CspBenchmarkRuleMetadata } from '../types/latest';
|
||||
import type { CspBenchmarkRuleMetadata } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
const CSP_RULE_TAG = 'Cloud Security';
|
||||
const CSP_RULE_TAG_USE_CASE = 'Use Case: Configuration Audit';
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import { Truthy } from 'lodash';
|
||||
import type { BaseCspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
NewPackagePolicy,
|
||||
NewPackagePolicyInput,
|
||||
|
@ -25,7 +26,6 @@ import {
|
|||
import type {
|
||||
BenchmarkId,
|
||||
Score,
|
||||
BaseCspSetupStatus,
|
||||
AwsCredentialsType,
|
||||
GcpCredentialsType,
|
||||
AzureCredentialsType,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types';
|
||||
import { CspBenchmarkRulesStates } from '../types/latest';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
export const buildMutedRulesFilter = (
|
||||
rulesStates: CspBenchmarkRulesStates
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common';
|
||||
import { CspClientPluginStartDeps } from '../../types';
|
||||
import { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
|
||||
/**
|
||||
* Hook to retrieve a Data View by it's Index Pattern title
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
|
||||
import { useQuery, type UseQueryOptions } from '@tanstack/react-query';
|
||||
import { STATUS_API_CURRENT_VERSION, STATUS_ROUTE_PATH } from '@kbn/cloud-security-posture-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../hooks/use_kibana';
|
||||
import { type CspSetupStatus } from '../../../common/types_old';
|
||||
import { STATUS_API_CURRENT_VERSION, STATUS_ROUTE_PATH } from '../../../common/constants';
|
||||
|
||||
const getCspSetupStatusQueryKey = 'csp_status_key';
|
||||
|
||||
|
|
|
@ -6,13 +6,10 @@
|
|||
*/
|
||||
|
||||
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../hooks/use_kibana';
|
||||
import { ComplianceDashboardDataV2, PosturePolicyTemplate } from '../../../common/types_old';
|
||||
import {
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
STATS_ROUTE_PATH,
|
||||
} from '../../../common/constants';
|
||||
import { STATS_ROUTE_PATH } from '../../../common/constants';
|
||||
|
||||
// TODO: consolidate both hooks into one hook with a dynamic key
|
||||
export const CSPM_STATS_QUERY_KEY = ['csp_cspm_dashboard_stats'];
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { euiThemeVars } from '@kbn/ui-theme';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { CloudSecurityPolicyTemplate, PostureInput } from '../../common/types_old';
|
||||
import {
|
||||
CLOUDBEAT_EKS,
|
||||
|
@ -15,8 +16,6 @@ import {
|
|||
CLOUDBEAT_GCP,
|
||||
CLOUDBEAT_AZURE,
|
||||
CLOUDBEAT_VULN_MGMT_AWS,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
VULN_MGMT_POLICY_TEMPLATE,
|
||||
CLOUDBEAT_VULN_MGMT_GCP,
|
||||
CLOUDBEAT_VULN_MGMT_AZURE,
|
||||
|
@ -35,7 +34,6 @@ export const statusColors = {
|
|||
};
|
||||
|
||||
export const CSP_MOMENT_FORMAT = 'MMMM D, YYYY @ HH:mm:ss.SSS';
|
||||
export const MAX_FINDINGS_TO_LOAD = 500;
|
||||
export const DEFAULT_VISIBLE_ROWS_PER_PAGE = 25;
|
||||
|
||||
export const LOCAL_STORAGE_DATA_TABLE_PAGE_SIZE_KEY = 'cloudPosture:dataTable:pageSize';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { useCspIntegrationLink } from '../navigation/use_csp_integration_link';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { BenchmarksCisId } from '../../../common/types/benchmarks/v2';
|
||||
|
||||
type BenchmarkDynamicNames =
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import { useKibana as useKibanaBase } from '@kbn/kibana-react-plugin/public';
|
||||
import type { CspClientPluginStartDeps } from '../../types';
|
||||
import type { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
|
||||
type CspKibanaContext = CoreStart & CspClientPluginStartDeps;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarksPage, CspPage, CspPageNavigationItem } from './types';
|
||||
|
||||
const NAV_ITEMS_NAMES = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import type { Criteria } from '@elastic/eui';
|
||||
import type { BoolQuery, Filter, Query, EsQueryConfig } from '@kbn/es-query';
|
||||
import type { Filter, Query, EsQueryConfig } from '@kbn/es-query';
|
||||
|
||||
export interface FindingsBaseURLQuery {
|
||||
query: Query;
|
||||
|
@ -24,12 +24,6 @@ export interface FindingsBaseESQueryConfig {
|
|||
config: EsQueryConfig;
|
||||
}
|
||||
|
||||
export interface FindingsBaseEsQuery {
|
||||
query?: {
|
||||
bool: BoolQuery;
|
||||
};
|
||||
}
|
||||
|
||||
export type Sort<T> = NonNullable<Criteria<T>['sort']>;
|
||||
|
||||
interface RuleSeverityMapping {
|
||||
|
|
|
@ -27,10 +27,10 @@ import { AddFieldFilterHandler } from '@kbn/unified-field-list';
|
|||
import { generateFilters } from '@kbn/data-plugin/public';
|
||||
import { DocViewFilterFn } from '@kbn/unified-doc-viewer/types';
|
||||
import useLocalStorage from 'react-use/lib/useLocalStorage';
|
||||
import { MAX_FINDINGS_TO_LOAD } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../../common/hooks/use_kibana';
|
||||
import { CloudPostureDataTableResult } from '../../common/hooks/use_cloud_posture_data_table';
|
||||
import { EmptyState } from '../empty_state';
|
||||
import { MAX_FINDINGS_TO_LOAD } from '../../common/constants';
|
||||
import { useStyles } from './use_styles';
|
||||
import { AdditionalControls } from './additional_controls';
|
||||
import { useDataViewContext } from '../../common/contexts/data_view_context';
|
||||
|
|
|
@ -28,6 +28,7 @@ import type {
|
|||
PackagePolicyReplaceDefineStepExtensionComponentProps,
|
||||
} from '@kbn/fleet-plugin/public/types';
|
||||
import { PackageInfo, PackagePolicy } from '@kbn/fleet-plugin/common';
|
||||
import { CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useIsSubscriptionStatusValid } from '../../common/hooks/use_is_subscription_status_valid';
|
||||
|
@ -39,7 +40,6 @@ import {
|
|||
CLOUDBEAT_AWS,
|
||||
CLOUDBEAT_VANILLA,
|
||||
CLOUDBEAT_VULN_MGMT_AWS,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
SUPPORTED_POLICY_TEMPLATES,
|
||||
} from '../../../common/constants';
|
||||
import {
|
||||
|
|
|
@ -10,12 +10,8 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import type { NewPackagePolicy, PackageInfo } from '@kbn/fleet-plugin/common';
|
||||
import { SetupTechnology } from '@kbn/fleet-plugin/public';
|
||||
import { PackagePolicyReplaceDefineStepExtensionComponentProps } from '@kbn/fleet-plugin/public/types';
|
||||
import {
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
VULN_MGMT_POLICY_TEMPLATE,
|
||||
CNVM_POLICY_TEMPLATE,
|
||||
} from '../../../common/constants';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { VULN_MGMT_POLICY_TEMPLATE, CNVM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import type { PostureInput, CloudSecurityPolicyTemplate } from '../../../common/types_old';
|
||||
import { getPolicyTemplateInputOptions, type NewPackagePolicyPostureInput } from './utils';
|
||||
import { RadioGroup } from './csp_boxed_radio_group';
|
||||
|
|
|
@ -13,6 +13,7 @@ import type {
|
|||
RegistryVarsEntry,
|
||||
} from '@kbn/fleet-plugin/common';
|
||||
import { SetupTechnology } from '@kbn/fleet-plugin/public';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import merge from 'lodash/merge';
|
||||
import semverValid from 'semver/functions/valid';
|
||||
import semverCoerce from 'semver/functions/coerce';
|
||||
|
@ -24,8 +25,6 @@ import {
|
|||
CLOUDBEAT_GCP,
|
||||
CLOUDBEAT_VANILLA,
|
||||
CLOUDBEAT_VULN_MGMT_AWS,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
SUPPORTED_CLOUDBEAT_INPUTS,
|
||||
SUPPORTED_POLICY_TEMPLATES,
|
||||
VULN_MGMT_POLICY_TEMPLATE,
|
||||
|
|
|
@ -20,7 +20,8 @@ import {
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { css } from '@emotion/react';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { IndexDetails, CspStatusCode } from '@kbn/cloud-security-posture-common';
|
||||
import { FullSizeCenteredPage } from '../full_size_centered_page';
|
||||
import { useCISIntegrationPoliciesLink } from '../../common/navigation/use_navigate_to_cis_integration_policies';
|
||||
import {
|
||||
|
@ -30,7 +31,7 @@ import {
|
|||
} from '../test_subjects';
|
||||
import { CloudPosturePage, PACKAGE_NOT_INSTALLED_TEST_SUBJECT } from '../cloud_posture_page';
|
||||
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
|
||||
import type { IndexDetails, PostureTypes, CspStatusCode } from '../../../common/types_old';
|
||||
import type { PostureTypes } from '../../../common/types_old';
|
||||
import noDataIllustration from '../../assets/illustrations/no_data_illustration.svg';
|
||||
import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
|
||||
import { NO_FINDINGS_STATUS_REFRESH_INTERVAL_MS } from '../../common/constants';
|
||||
|
|
|
@ -21,11 +21,11 @@ import {
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { css } from '@emotion/react';
|
||||
import type { IndexDetails } from '@kbn/cloud-security-posture-common';
|
||||
import { VULN_MGMT_POLICY_TEMPLATE } from '../../common/constants';
|
||||
import { FullSizeCenteredPage } from './full_size_centered_page';
|
||||
import { CloudPosturePage } from './cloud_posture_page';
|
||||
import { useCspSetupStatusApi } from '../common/api/use_setup_status_api';
|
||||
import type { IndexDetails } from '../../common/types_old';
|
||||
import {
|
||||
NO_VULNERABILITIES_STATUS_TEST_SUBJ,
|
||||
CNVM_NOT_INSTALLED_ACTION_SUBJ,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import React from 'react';
|
||||
|
||||
import { coreMock } from '@kbn/core/public/mocks';
|
||||
import type { BaseCspSetupStatus, CspStatusCode } from '@kbn/cloud-security-posture-common';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { TestProvider } from '../../test/test_provider';
|
||||
import { ComplianceDashboard, getDefaultTab } from '.';
|
||||
|
@ -31,11 +32,7 @@ import {
|
|||
KSPM_INTEGRATION_NOT_INSTALLED_TEST_SUBJECT,
|
||||
PACKAGE_NOT_INSTALLED_TEST_SUBJECT,
|
||||
} from '../../components/cloud_posture_page';
|
||||
import {
|
||||
BaseCspSetupStatus,
|
||||
ComplianceDashboardDataV2,
|
||||
CspStatusCode,
|
||||
} from '../../../common/types_old';
|
||||
import { ComplianceDashboardDataV2 } from '../../../common/types_old';
|
||||
import { cloudPosturePages } from '../../common/navigation/constants';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -13,13 +13,11 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { Route, Routes } from '@kbn/shared-ux-router';
|
||||
import { Redirect, useHistory, useLocation } from 'react-router-dom';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { BaseCspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { NO_FINDINGS_STATUS_TEST_SUBJ } from '../../components/test_subjects';
|
||||
import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
|
||||
import type {
|
||||
PosturePolicyTemplate,
|
||||
ComplianceDashboardDataV2,
|
||||
BaseCspSetupStatus,
|
||||
} from '../../../common/types_old';
|
||||
import type { PosturePolicyTemplate, ComplianceDashboardDataV2 } from '../../../common/types_old';
|
||||
import { CloudPosturePageTitle } from '../../components/cloud_posture_page_title';
|
||||
import {
|
||||
CloudPosturePage,
|
||||
|
@ -41,7 +39,6 @@ import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
|
|||
import { NoFindingsStates } from '../../components/no_findings_states';
|
||||
import { SummarySection } from './dashboard_sections/summary_section';
|
||||
import { BenchmarksSection } from './dashboard_sections/benchmarks_section';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { cloudPosturePages, cspIntegrationDocsNavigation } from '../../common/navigation/constants';
|
||||
import { NO_FINDINGS_STATUS_REFRESH_INTERVAL_MS } from '../../common/constants';
|
||||
import { encodeQuery } from '../../common/navigation/query_utils';
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { BenchmarksSection } from './benchmarks_section';
|
||||
import { getMockDashboardData, getBenchmarkMockData } from '../mock';
|
||||
import { TestProvider } from '../../../test/test_provider';
|
||||
import { KSPM_POLICY_TEMPLATE } from '../../../../common/constants';
|
||||
import {
|
||||
DASHBOARD_TABLE_COLUMN_SCORE_TEST_ID,
|
||||
DASHBOARD_TABLE_HEADER_SCORE_TEST_ID,
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { expectIdsInDoc } from '../../../test/utils';
|
||||
import { DASHBOARD_COUNTER_CARDS } from '../test_subjects';
|
||||
import { SummarySection } from './summary_section';
|
||||
import { mockDashboardData } from '../mock';
|
||||
import { TestProvider } from '../../../test/test_provider';
|
||||
import { KSPM_POLICY_TEMPLATE } from '../../../../common/constants';
|
||||
|
||||
describe('<CloudSummarySection />', () => {
|
||||
const renderCloudSummarySection = (alterMockData = {}) => {
|
||||
|
|
|
@ -15,6 +15,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { css } from '@emotion/react';
|
||||
import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { useCspIntegrationLink } from '../../../common/navigation/use_csp_integration_link';
|
||||
import { DASHBOARD_COUNTER_CARDS, DASHBOARD_SUMMARY_CONTAINER } from '../test_subjects';
|
||||
import { CspCounterCard, CspCounterCardProps } from '../../../components/csp_counter_card';
|
||||
|
@ -28,12 +29,7 @@ import type {
|
|||
} from '../../../../common/types_old';
|
||||
import { RisksTable } from '../compliance_charts/risks_table';
|
||||
import { NavFilter, useNavigateFindings } from '../../../common/hooks/use_navigate_findings';
|
||||
import {
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
RULE_FAILED,
|
||||
RULE_PASSED,
|
||||
} from '../../../../common/constants';
|
||||
import { RULE_FAILED, RULE_PASSED } from '../../../../common/constants';
|
||||
import { AccountsEvaluatedWidget } from '../../../components/accounts_evaluated_widget';
|
||||
import { FINDINGS_GROUPING_OPTIONS } from '../../../common/constants';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
export const mockFindingsHit: CspFinding = {
|
||||
result: {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { estypes } from '@elastic/elasticsearch';
|
||||
import { CspFinding } from '../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { isArray } from 'lodash';
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import { v4 as uuidV4 } from 'uuid';
|
||||
|
|
|
@ -17,7 +17,7 @@ import { MemoryRouter } from '@kbn/shared-ux-router';
|
|||
import { findingsNavigation } from '../../common/navigation/constants';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { FilterManager } from '@kbn/data-plugin/public';
|
||||
import { CspClientPluginStartDeps } from '../../types';
|
||||
import { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import * as statusHandlers from '../../../server/routes/status/status.handlers.mock';
|
||||
import {
|
||||
bsearchFindingsHandler,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { HttpSetup } from '@kbn/core/public';
|
||||
import React from 'react';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { DetectionRuleCounter } from '../../../components/detection_rule_counter';
|
||||
import { getFindingsDetectionRuleSearchTags } from '../../../../common/utils/detection_rules';
|
||||
import { createDetectionRuleFromBenchmarkRule } from '../utils/create_detection_rule_from_benchmark';
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { FindingsRuleFlyout } from './findings_flyout';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { TestProvider } from '../../../test/test_provider';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '../../../../common/constants';
|
||||
import { mockFindingsHit, mockWizFinding } from '../__mocks__/findings';
|
||||
|
||||
const onPaginate = jest.fn();
|
||||
|
|
|
@ -35,11 +35,11 @@ import type { HttpSetup } from '@kbn/core/public';
|
|||
import { generatePath } from 'react-router-dom';
|
||||
import { css } from '@emotion/react';
|
||||
import { euiThemeVars } from '@kbn/ui-theme';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { CSP_DATASET, getDatasetDisplayName } from '../../../common/utils/get_dataset_display_name';
|
||||
import { truthy } from '../../../../common/utils/helpers';
|
||||
import { benchmarksNavigation } from '../../../common/navigation/constants';
|
||||
import cisLogoIcon from '../../../assets/icons/cis_logo.svg';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import { CspEvaluationBadge } from '../../../components/csp_evaluation_badge';
|
||||
import { TakeAction } from '../../../components/take_action';
|
||||
import { TableTab } from './table_tab';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import { CodeEditor } from '@kbn/code-editor';
|
||||
import { XJsonLang } from '@kbn/monaco';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
export const JsonTab = ({ data }: { data: CspFinding }) => (
|
||||
<div style={{ position: 'absolute', inset: 0 }}>
|
||||
|
|
|
@ -18,19 +18,19 @@ import React, { useMemo } from 'react';
|
|||
import moment from 'moment';
|
||||
import type { EuiDescriptionListProps, EuiAccordionProps } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { isEmpty } from 'lodash';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { getDatasetDisplayName } from '../../../common/utils/get_dataset_display_name';
|
||||
import { truthy } from '../../../../common/utils/helpers';
|
||||
import { CSP_MOMENT_FORMAT } from '../../../common/constants';
|
||||
import {
|
||||
INTERNAL_FEATURE_FLAGS,
|
||||
CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX,
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
} from '../../../../common/constants';
|
||||
import { useDataView } from '../../../common/api/use_data_view';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import {
|
||||
BenchmarkIcons,
|
||||
CodeBlock,
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiBadge, EuiDescriptionList } from '@elastic/eui';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { RulesDetectionRuleCounter } from '../../rules/rules_detection_rule_counter';
|
||||
import { BenchmarkIcons, CspFlyoutMarkdown, EMPTY_VALUE, RuleNameLink } from './findings_flyout';
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
import React from 'react';
|
||||
import { getFlattenedObject } from '@kbn/std';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
interface FlattenedItem {
|
||||
key: string; // flattened dot notation object path for CspFinding;
|
||||
|
|
|
@ -11,7 +11,7 @@ import { DataTableRecord } from '@kbn/discover-utils/types';
|
|||
import { HttpSetup } from '@kbn/core-http-browser';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { EuiDataGridCellValueElementProps, EuiFlexItem, EuiSpacer } from '@elastic/eui';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import { getDatasetDisplayName } from '../../../common/utils/get_dataset_display_name';
|
||||
import * as TEST_SUBJECTS from '../test_subjects';
|
||||
import { FindingsDistributionBar } from '../layout/findings_distribution_bar';
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { CspBenchmarkRulesStates } from '../../../../common/types/latest';
|
||||
import {
|
||||
CSP_GET_BENCHMARK_RULES_STATE_API_CURRENT_VERSION,
|
||||
CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH,
|
||||
} from '../../../../common/constants';
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
|
||||
export const getRuleStatesKey = ['get_rules_state_key'];
|
||||
|
|
|
@ -10,7 +10,7 @@ import type { IKibanaSearchResponse } from '@kbn/search-types';
|
|||
import { GenericBuckets, GroupingQuery, RootAggregation } from '@kbn/grouping/src';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '../../../../common/constants';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
import { showErrorToast } from '../../../common/utils/show_error_toast';
|
||||
|
||||
|
|
|
@ -11,18 +11,17 @@ import type { IKibanaSearchResponse, IKibanaSearchRequest } from '@kbn/search-ty
|
|||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { buildDataTableRecord } from '@kbn/discover-utils';
|
||||
import { EsHitRecord } from '@kbn/discover-utils/types';
|
||||
import { CspFinding } from '../../../../common/schemas/csp_finding';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
import type { FindingsBaseEsQuery } from '../../../common/types';
|
||||
import { getAggregationCount, getFindingsCountAggQuery } from '../utils/utils';
|
||||
import { MAX_FINDINGS_TO_LOAD } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
LATEST_FINDINGS_RETENTION_POLICY,
|
||||
} from '../../../../common/constants';
|
||||
import { MAX_FINDINGS_TO_LOAD } from '../../../common/constants';
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarkRulesStates, CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import type { FindingsBaseEsQuery } from '@kbn/cloud-security-posture';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
import { getAggregationCount, getFindingsCountAggQuery } from '../utils/utils';
|
||||
import { showErrorToast } from '../../../common/utils/show_error_toast';
|
||||
import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api';
|
||||
import { CspBenchmarkRulesStates } from '../../../../common/types/latest';
|
||||
import { buildMutedRulesFilter } from '../../../../common/utils/rules_states';
|
||||
|
||||
interface UseFindingsOptions extends FindingsBaseEsQuery {
|
||||
|
|
|
@ -15,13 +15,13 @@ import {
|
|||
} from '@kbn/grouping/src';
|
||||
import { useMemo } from 'react';
|
||||
import { buildEsQuery, Filter } from '@kbn/es-query';
|
||||
import { LATEST_FINDINGS_RETENTION_POLICY } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_GROUPING_OPTIONS,
|
||||
LOCAL_STORAGE_FINDINGS_GROUPING_KEY,
|
||||
} from '../../../common/constants';
|
||||
import { useDataViewContext } from '../../../common/contexts/data_view_context';
|
||||
import { Evaluation } from '../../../../common/types_old';
|
||||
import { LATEST_FINDINGS_RETENTION_POLICY } from '../../../../common/constants';
|
||||
import {
|
||||
FindingsGroupingAggregation,
|
||||
FindingsRootGroupingAggregation,
|
||||
|
|
|
@ -10,10 +10,10 @@ import { EuiThemeComputed, useEuiTheme } from '@elastic/eui';
|
|||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { Filter } from '@kbn/es-query';
|
||||
import type { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import { useDataViewContext } from '../../../common/contexts/data_view_context';
|
||||
import { SecuritySolutionContext } from '../../../application/security_solution_context';
|
||||
import type { FindingsBaseURLQuery } from '../../../common/types';
|
||||
import type { CspClientPluginStartDeps } from '../../../types';
|
||||
import { PLUGIN_NAME } from '../../../../common';
|
||||
|
||||
type SearchBarQueryProps = Pick<FindingsBaseURLQuery, 'query' | 'filters'>;
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
*/
|
||||
|
||||
import { HttpSetup } from '@kbn/core/public';
|
||||
import { LATEST_FINDINGS_RETENTION_POLICY } from '@kbn/cloud-security-posture-common';
|
||||
import { CspBenchmarkRule } from '../../../../common/types/latest';
|
||||
import {
|
||||
FINDINGS_INDEX_PATTERN,
|
||||
LATEST_FINDINGS_RETENTION_POLICY,
|
||||
} from '../../../../common/constants';
|
||||
import { FINDINGS_INDEX_PATTERN } from '../../../../common/constants';
|
||||
|
||||
import { createDetectionRule } from '../../../common/api/create_detection_rule';
|
||||
import { generateBenchmarkRuleTags } from '../../../../common/utils/detection_rules';
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { HttpSetup } from '@kbn/core/public';
|
||||
import { CspBenchmarkRuleMetadata } from '../../../common/types/latest';
|
||||
import type { CspBenchmarkRuleMetadata } from '@kbn/cloud-security-posture-common';
|
||||
import { getRuleList } from '../configurations/findings_flyout/rule_tab';
|
||||
import { getRemediationList } from '../configurations/findings_flyout/overview_tab';
|
||||
import * as TEST_SUBJECTS from './test_subjects';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { CspBenchmarkRulesStates } from '../../../common/types/latest';
|
||||
import { CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH } from '../../../common/constants';
|
||||
import { CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH } from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import { useKibana } from '../../common/hooks/use_kibana';
|
||||
|
||||
export const CSP_RULES_STATES_QUERY_KEY = ['csp_rules_states_v1'];
|
||||
|
|
|
@ -16,7 +16,9 @@ import {
|
|||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { buildDataTableRecord } from '@kbn/discover-utils';
|
||||
import { EsHitRecord } from '@kbn/discover-utils/types';
|
||||
import { MAX_FINDINGS_TO_LOAD, VULNERABILITY_FIELDS } from '../../../common/constants';
|
||||
import { MAX_FINDINGS_TO_LOAD } from '@kbn/cloud-security-posture-common';
|
||||
import { FindingsBaseEsQuery } from '@kbn/cloud-security-posture';
|
||||
import { VULNERABILITY_FIELDS } from '../../../common/constants';
|
||||
import { CspVulnerabilityFinding } from '../../../../common/schemas';
|
||||
import {
|
||||
LATEST_VULNERABILITIES_INDEX_PATTERN,
|
||||
|
@ -24,7 +26,6 @@ import {
|
|||
} from '../../../../common/constants';
|
||||
import { useKibana } from '../../../common/hooks/use_kibana';
|
||||
import { showErrorToast } from '../../../common/utils/show_error_toast';
|
||||
import { FindingsBaseEsQuery } from '../../../common/types';
|
||||
import { getCaseInsensitiveSortScript } from '../utils/custom_sort_script';
|
||||
type LatestFindingsRequest = IKibanaSearchRequest<SearchRequest>;
|
||||
type LatestFindingsResponse = IKibanaSearchResponse<
|
||||
|
|
|
@ -9,14 +9,10 @@ import type { CoreSetup, CoreStart, Plugin } from '@kbn/core/public';
|
|||
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
||||
import { Storage } from '@kbn/kibana-utils-plugin/public';
|
||||
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
||||
import type { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import { CspLoadingState } from './components/csp_loading_state';
|
||||
import type { CspRouterProps } from './application/csp_router';
|
||||
import type {
|
||||
CspClientPluginSetup,
|
||||
CspClientPluginStart,
|
||||
CspClientPluginSetupDeps,
|
||||
CspClientPluginStartDeps,
|
||||
} from './types';
|
||||
import type { CspClientPluginSetup, CspClientPluginStart, CspClientPluginSetupDeps } from './types';
|
||||
import { CLOUD_SECURITY_POSTURE_PACKAGE_NAME } from '../common/constants';
|
||||
import { SetupContext } from './application/setup_context';
|
||||
|
||||
|
|
|
@ -6,10 +6,8 @@
|
|||
*/
|
||||
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import {
|
||||
CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX,
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
} from '../../../../common/constants';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import { CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX } from '../../../../common/constants';
|
||||
|
||||
const generateDataViewField = (name: string, type: 'string' | 'date' = 'string') => ({
|
||||
name,
|
||||
|
|
|
@ -13,9 +13,9 @@ import { createStubDataView } from '@kbn/data-views-plugin/common/stubs';
|
|||
import { indexPatternFieldEditorPluginMock as dataViewFieldEditorMock } from '@kbn/data-view-field-editor-plugin/public/mocks';
|
||||
import SearchBar from '@kbn/unified-search-plugin/public/search_bar/search_bar';
|
||||
import { http, HttpResponse, JsonBodyType } from 'msw';
|
||||
import { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import { defaultHandlers } from './handlers';
|
||||
import { getMockDependencies } from '../fixtures/get_mock_dependencies';
|
||||
import { CspClientPluginStartDeps } from '../../types';
|
||||
import { MOCK_SERVER_LICENSING_INFO_URL } from './handlers/licensing.handlers.mock';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import { CspClientPluginStartDeps } from '../../types';
|
||||
import { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import { TestProvider } from '../test_provider';
|
||||
import { getMockServerDependencies } from './mock_server';
|
||||
interface MockServerDependencies {
|
||||
|
|
|
@ -14,7 +14,7 @@ import { Route, Routes } from '@kbn/shared-ux-router';
|
|||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { coreMock } from '@kbn/core/public/mocks';
|
||||
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
||||
import type { CspClientPluginStartDeps } from '../types';
|
||||
import type { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
|
||||
import { getMockDependencies } from './fixtures/get_mock_dependencies';
|
||||
|
||||
interface CspAppDeps {
|
||||
|
|
|
@ -6,26 +6,12 @@
|
|||
*/
|
||||
|
||||
import type { CloudSetup } from '@kbn/cloud-plugin/public';
|
||||
import type { LicensingPluginStart } from '@kbn/licensing-plugin/public';
|
||||
import { DataViewsServicePublic } from '@kbn/data-views-plugin/public';
|
||||
import type { ComponentType, ReactNode } from 'react';
|
||||
import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
|
||||
import { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public';
|
||||
import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
|
||||
import { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public';
|
||||
import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import { CoreStart, ToastsStart } from '@kbn/core/public';
|
||||
import { Storage } from '@kbn/kibana-utils-plugin/public';
|
||||
|
||||
import type { ChartsPluginStart } from '@kbn/charts-plugin/public';
|
||||
import type { DiscoverStart } from '@kbn/discover-plugin/public';
|
||||
import type { FleetSetup, FleetStart } from '@kbn/fleet-plugin/public';
|
||||
import type {
|
||||
UsageCollectionSetup,
|
||||
UsageCollectionStart,
|
||||
} from '@kbn/usage-collection-plugin/public';
|
||||
import { SharePluginStart } from '@kbn/share-plugin/public';
|
||||
import { SpacesPluginStart } from '@kbn/spaces-plugin/public';
|
||||
import { UiActionsSetup } from '@kbn/ui-actions-plugin/public';
|
||||
import type { DataPublicPluginSetup } from '@kbn/data-plugin/public';
|
||||
import { CoreStart } from '@kbn/core/public';
|
||||
import type { FleetSetup } from '@kbn/fleet-plugin/public';
|
||||
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
|
||||
import type { CspRouterProps } from './application/csp_router';
|
||||
import type { CloudSecurityPosturePageId } from './common/navigation/types';
|
||||
|
||||
|
@ -53,28 +39,6 @@ export interface CspClientPluginSetupDeps {
|
|||
usageCollection?: UsageCollectionSetup;
|
||||
}
|
||||
|
||||
export interface CspClientPluginStartDeps {
|
||||
// required
|
||||
data: DataPublicPluginStart;
|
||||
dataViews: DataViewsServicePublic;
|
||||
dataViewFieldEditor: IndexPatternFieldEditorStart;
|
||||
unifiedSearch: UnifiedSearchPublicPluginStart;
|
||||
uiActions: UiActionsStart;
|
||||
fieldFormats: FieldFormatsStart;
|
||||
toastNotifications: ToastsStart;
|
||||
charts: ChartsPluginStart;
|
||||
discover: DiscoverStart;
|
||||
fleet: FleetStart;
|
||||
licensing: LicensingPluginStart;
|
||||
share: SharePluginStart;
|
||||
storage: Storage;
|
||||
spaces: SpacesPluginStart;
|
||||
cloud: CloudSetup;
|
||||
|
||||
// optional
|
||||
usageCollection?: UsageCollectionStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods exposed from the security solution to the cloud security posture application.
|
||||
*/
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_INDEX_NAME,
|
||||
CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
LATEST_FINDINGS_INDEX_TEMPLATE_NAME,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
VULNERABILITIES_INDEX_NAME,
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import type { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { LATEST_FINDINGS_RETENTION_POLICY } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
CLOUD_SECURITY_POSTURE_PACKAGE_NAME,
|
||||
FINDINGS_INDEX_PATTERN,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_RETENTION_POLICY,
|
||||
} from '../../common/constants';
|
||||
|
||||
const LATEST_FINDINGS_TRANSFORM_V830 = 'cloud_security_posture.findings_latest-default-0.0.1';
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
*/
|
||||
|
||||
import { ElasticsearchClient, type Logger } from '@kbn/core/server';
|
||||
import type { IndexStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { getSafePostureTypeRuntimeMapping } from '../../common/runtime_mappings/get_safe_posture_type_runtime_mapping';
|
||||
import { IndexStatus, PostureTypes } from '../../common/types_old';
|
||||
import { PostureTypes } from '../../common/types_old';
|
||||
|
||||
export interface PostureTypeAndRetention {
|
||||
postureType?: PostureTypes;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { flatMap, uniq } from 'lodash';
|
||||
import { KSPM_POLICY_TEMPLATE, CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { SavedObjectsClientContract, Logger } from '@kbn/core/server';
|
||||
import type {
|
||||
AgentPolicyServiceInterface,
|
||||
|
@ -23,8 +24,6 @@ import { CloudSecurityPolicyTemplate, PostureTypes } from '../../common/types_ol
|
|||
import {
|
||||
SUPPORTED_POLICY_TEMPLATES,
|
||||
CLOUD_SECURITY_POSTURE_PACKAGE_NAME,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
} from '../../common/constants';
|
||||
import { CSP_FLEET_PACKAGE_KUERY } from '../../common/utils/helpers';
|
||||
import {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||
import type { ISavedObjectsRepository, Logger } from '@kbn/core/server';
|
||||
import { KSPM_POLICY_TEMPLATE, CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import type { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { getPackagePolicyIdRuntimeMapping } from '../../../../common/runtime_mappings/get_package_policy_id_mapping';
|
||||
import { getIdentifierRuntimeMapping } from '../../../../common/runtime_mappings/get_identifier_runtime_mapping';
|
||||
|
@ -17,8 +18,6 @@ import type {
|
|||
CloudSecurityAccountsStats,
|
||||
} from './types';
|
||||
import {
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_VULNERABILITIES_INDEX_DEFAULT_NS,
|
||||
VULN_MGMT_POLICY_TEMPLATE,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { AggregationsMultiBucketBase } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { CspStatusCode } from '../../../../common/types_old';
|
||||
import { CspStatusCode } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
export type CloudSecurityUsageCollectorType =
|
||||
| 'Indices'
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*/
|
||||
|
||||
import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import type { FindResult, RulesClient } from '@kbn/alerting-plugin/server';
|
||||
import type { RuleParams } from '@kbn/alerting-plugin/server/application/rule/types';
|
||||
import type {
|
||||
CspBenchmarkRule,
|
||||
RulesToUpdate,
|
||||
CspBenchmarkRulesStates,
|
||||
CspSettings,
|
||||
} from '../../../../common/types/rules/v4';
|
||||
import {
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
|
||||
import { transformError } from '@kbn/securitysolution-es-utils';
|
||||
import { CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH } from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import { CspRouter } from '../../../types';
|
||||
import { CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH } from '../../../../common/constants';
|
||||
import { CspBenchmarkRulesStates } from '../../../../common/types/rules/v4';
|
||||
import { getCspBenchmarkRulesStatesHandler } from './v1';
|
||||
|
||||
export const defineGetCspBenchmarkRulesStatesRoute = (router: CspRouter) =>
|
||||
|
|
|
@ -10,7 +10,8 @@ import {
|
|||
} from '@kbn/core-saved-objects-api-server';
|
||||
import { transformError } from '@kbn/securitysolution-es-utils';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { CspBenchmarkRulesStates, CspSettings } from '../../../../common/types/rules/v4';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common';
|
||||
import { CspSettings } from '../../../../common/types/rules/v4';
|
||||
import {
|
||||
INTERNAL_CSP_SETTINGS_SAVED_OBJECT_ID,
|
||||
INTERNAL_CSP_SETTINGS_SAVED_OBJECT_TYPE,
|
||||
|
|
|
@ -15,7 +15,7 @@ import type {
|
|||
} from '@elastic/elasticsearch/lib/api/types';
|
||||
import type { Logger } from '@kbn/core/server';
|
||||
import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { CspFinding } from '../../../common/schemas/csp_finding';
|
||||
import type { CspFinding } from '@kbn/cloud-security-posture-common';
|
||||
import type { Cluster } from '../../../common/types_old';
|
||||
import { getPostureStatsFromAggs, failedFindingsAggQuery } from './get_grouped_findings_evaluation';
|
||||
import type { FailedFindingsQueryResult } from './get_grouped_findings_evaluation';
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
|
||||
import { calculateIntegrationStatus } from './status';
|
||||
import { CSPM_POLICY_TEMPLATE, VULN_MGMT_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { VULN_MGMT_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import { Installation } from '@kbn/fleet-plugin/common';
|
||||
|
||||
const mockInstallation: Installation = {
|
||||
|
|
|
@ -6,6 +6,18 @@
|
|||
*/
|
||||
|
||||
import { transformError } from '@kbn/securitysolution-es-utils';
|
||||
import {
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
STATUS_ROUTE_PATH,
|
||||
LATEST_FINDINGS_RETENTION_POLICY,
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import type {
|
||||
CspSetupStatus,
|
||||
IndexStatus,
|
||||
CspStatusCode,
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import type { SavedObjectsClientContract, Logger, ElasticsearchClient } from '@kbn/core/server';
|
||||
import type {
|
||||
AgentPolicyServiceInterface,
|
||||
|
@ -19,20 +31,15 @@ import { schema } from '@kbn/config-schema';
|
|||
import { VersionedRoute } from '@kbn/core-http-server/src/versioning/types';
|
||||
import {
|
||||
CLOUD_SECURITY_POSTURE_PACKAGE_NAME,
|
||||
STATUS_ROUTE_PATH,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
FINDINGS_INDEX_PATTERN,
|
||||
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
|
||||
VULNERABILITIES_INDEX_PATTERN,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
POSTURE_TYPES,
|
||||
LATEST_VULNERABILITIES_INDEX_DEFAULT_NS,
|
||||
VULN_MGMT_POLICY_TEMPLATE,
|
||||
POSTURE_TYPE_ALL,
|
||||
LATEST_VULNERABILITIES_RETENTION_POLICY,
|
||||
LATEST_FINDINGS_RETENTION_POLICY,
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
} from '../../../common/constants';
|
||||
import type {
|
||||
CspApiRequestHandlerContext,
|
||||
|
@ -40,12 +47,7 @@ import type {
|
|||
CspRouter,
|
||||
StatusResponseInfo,
|
||||
} from '../../types';
|
||||
import type {
|
||||
CspSetupStatus,
|
||||
CspStatusCode,
|
||||
IndexStatus,
|
||||
PostureTypes,
|
||||
} from '../../../common/types_old';
|
||||
import type { PostureTypes } from '../../../common/types_old';
|
||||
import {
|
||||
getAgentStatusesByAgentPolicies,
|
||||
getCspAgentPolicies,
|
||||
|
|
|
@ -15,11 +15,11 @@ import { DataViewAttributes } from '@kbn/data-views-plugin/common';
|
|||
import { SpacesServiceStart } from '@kbn/spaces-plugin/server';
|
||||
import { DataViewsServerPluginStart } from '@kbn/data-views-plugin/server';
|
||||
import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common';
|
||||
import { CDR_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
|
||||
import {
|
||||
CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX,
|
||||
CDR_MISCONFIGURATIONS_DATA_VIEW_NAME,
|
||||
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
CDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX,
|
||||
CDR_VULNERABILITIES_DATA_VIEW_NAME,
|
||||
CDR_VULNERABILITIES_INDEX_PATTERN,
|
||||
|
|
|
@ -30,12 +30,12 @@ import type {
|
|||
PackagePolicyClient,
|
||||
} from '@kbn/fleet-plugin/server';
|
||||
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
|
||||
import type { CspStatusCode, IndexDetails } from '@kbn/cloud-security-posture-common';
|
||||
import type { FleetStartContract, FleetRequestHandlerContext } from '@kbn/fleet-plugin/server';
|
||||
import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server';
|
||||
import type { AlertingApiRequestHandlerContext } from '@kbn/alerting-plugin/server';
|
||||
import type { AlertingPluginSetup } from '@kbn/alerting-plugin/public/plugin';
|
||||
import { SpacesPluginStart } from '@kbn/spaces-plugin/server';
|
||||
import { CspStatusCode, IndexDetails } from '../common/types_old';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface CspServerPluginSetup {}
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
"@kbn/kibana-utils-plugin",
|
||||
"@kbn/ui-actions-plugin",
|
||||
"@kbn/core-http-server-mocks",
|
||||
"@kbn/field-formats-plugin",
|
||||
"@kbn/data-view-field-editor-plugin",
|
||||
"@kbn/grouping",
|
||||
"@kbn/alerting-plugin",
|
||||
|
@ -65,7 +64,9 @@
|
|||
"@kbn/code-editor-mock",
|
||||
"@kbn/search-types",
|
||||
"@kbn/react-kibana-mount",
|
||||
"@kbn/spaces-plugin"
|
||||
"@kbn/spaces-plugin",
|
||||
"@kbn/cloud-security-posture-common",
|
||||
"@kbn/cloud-security-posture"
|
||||
],
|
||||
"exclude": ["target/**/*"]
|
||||
}
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
CNVM_POLICY_TEMPLATE,
|
||||
CSPM_POLICY_TEMPLATE,
|
||||
KSPM_POLICY_TEMPLATE,
|
||||
CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
CNVM_POLICY_TEMPLATE,
|
||||
LATEST_VULNERABILITIES_INDEX_PATTERN,
|
||||
} from '@kbn/cloud-security-posture-plugin/common/constants';
|
||||
import { INTEGRATION_PACKAGE_NAME } from '@kbn/cloud-defend-plugin/common/constants';
|
||||
|
|
|
@ -45,5 +45,6 @@
|
|||
"@kbn/discover-plugin",
|
||||
"@kbn/logging",
|
||||
"@kbn/integration-assistant-plugin",
|
||||
"@kbn/cloud-security-posture-common",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import type { Agent as SuperTestAgent } from 'supertest';
|
|||
import { Client } from '@elastic/elasticsearch';
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { IndexDetails } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { IndexDetails } from '@kbn/cloud-security-posture-common';
|
||||
import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
|
||||
import { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import {
|
||||
FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { createPackagePolicy } from '../helper';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { setupFleetAndAgents } from '../../../../fleet_api_integration/apis/agents/services';
|
||||
import { generateAgent } from '../../../../fleet_api_integration/helpers';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
|
||||
BENCHMARK_SCORE_INDEX_PATTERN,
|
||||
LATEST_VULNERABILITIES_INDEX_PATTERN,
|
||||
ALERTS_INDEX_PATTERN,
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
"@kbn/cases-api-integration-test-plugin",
|
||||
"@kbn/security-solution-plugin/public/management/cypress",
|
||||
"@kbn/management-settings-ids",
|
||||
"@kbn/mock-idp-utils"
|
||||
"@kbn/mock-idp-utils",
|
||||
"@kbn/cloud-security-posture-common"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import {
|
||||
FINDINGS_INDEX_DEFAULT_NS,
|
||||
LATEST_FINDINGS_INDEX_DEFAULT_NS,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-plugin/common/types_old';
|
||||
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
|
||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||
import { createPackagePolicy } from '@kbn/test-suites-xpack/api_integration/apis/cloud_security_posture/helper';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
|
|
@ -97,5 +97,6 @@
|
|||
"@kbn/ml-trained-models-utils",
|
||||
"@kbn/test-suites-src",
|
||||
"@kbn/console-plugin",
|
||||
"@kbn/cloud-security-posture-common",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue