diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1f3d16083ec47..366808adc6ac2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1472,7 +1472,7 @@ x-pack/plugins/security_solution/public/threat_intelligence @elastic/protections x-pack/test/threat_intelligence_cypress @elastic/protections-experience ## Security Solution sub teams - Entity Analytics -x-pack/plugins/security_solution/common/risk_engine @elastic/security-entity-analytics @elastic/security-entity-analytics +x-pack/plugins/security_solution/common/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score @elastic/security-entity-analytics x-pack/plugins/security_solution/public/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/public/explore/components/risk_score @elastic/security-entity-analytics diff --git a/x-pack/plugins/security_solution/common/asset_criticality/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/constants.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts diff --git a/x-pack/plugins/security_solution/common/asset_criticality/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts diff --git a/x-pack/plugins/security_solution/common/asset_criticality/indices.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/indices.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/indices.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/indices.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/after_keys.test.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.test.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/after_keys.test.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.test.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/after_keys.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/after_keys.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/constants.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/constants.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/identifier_types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/identifier_types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/identifier_types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/identifier_types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/index.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/indices.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/indices.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/indices.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/indices.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/range.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/range.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/range.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/range.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_calculation/request_schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_calculation/request_schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_preview/request_schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_preview/request_schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/index.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.test.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.test.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.test.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.test.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/utils.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/utils.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/utils.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/utils.ts diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts index efbf12b3e5e90..f33eb664628a1 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts @@ -8,7 +8,7 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import type { Inspect, Maybe, SortField } from '../../../common'; -import type { RiskInputs } from '../../../../risk_engine'; +import type { RiskInputs } from '../../../../entity_analytics/risk_engine'; export interface HostsRiskScoreStrategyResponse extends IEsSearchResponse { inspect?: Maybe; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts index b5e0c62526a61..783533b3e49ff 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts @@ -11,7 +11,7 @@ import { RiskScoreEntity, getRiskScoreLatestIndex, getRiskScoreTimeSeriesIndex, -} from '../../../../risk_engine'; +} from '../../../../entity_analytics/risk_engine'; export { RiskQueries } from '../../../../api/search_strategy'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts index 4e3aaa69129fc..e8af897c51cea 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskScoreEntity } from '../../../../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../../../../common/entity_analytics/risk_engine'; import { renderHook } from '@testing-library/react-hooks'; import { wrapper } from '../../../mocks'; import { useLensAttributes } from '../../../use_lens_attributes'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts index 95769bdbf5f9c..13408e349007d 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts @@ -23,7 +23,7 @@ import type { InitRiskEngineResponse, DisableRiskEngineResponse, } from '../../../server/lib/entity_analytics/types'; -import type { RiskScorePreviewRequestSchema } from '../../../common/risk_engine/risk_score_preview/request_schema'; +import type { RiskScorePreviewRequestSchema } from '../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; import type { EntityAnalyticsPrivileges } from '../../../common/api/entity_analytics/common'; /** diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts index 0d5667d7df813..84360372ff876 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts @@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query'; import dateMath from '@kbn/datemath'; import { fetchRiskScorePreview } from '../api'; -import type { RiskScorePreviewRequestSchema } from '../../../../common/risk_engine/risk_score_preview/request_schema'; +import type { RiskScorePreviewRequestSchema } from '../../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; export const useRiskScorePreview = ({ data_view_id: dataViewId, diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts index 504ed59a40423..ed591213b2dcf 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts @@ -7,7 +7,7 @@ import { useQuery, useQueryClient } from '@tanstack/react-query'; import { useCallback } from 'react'; import { fetchRiskEngineStatus } from '../api'; -import { RiskEngineStatus } from '../../../../common/risk_engine/types'; +import { RiskEngineStatus } from '../../../../common/entity_analytics/risk_engine/types'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; const FETCH_RISK_ENGINE_STATUS = ['GET', 'FETCH_RISK_ENGINE_STATUS']; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts index 8e2b5edfb1248..76f57281e9f93 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts @@ -11,7 +11,7 @@ import { useRiskEnginePrivileges } from '../../api/hooks/use_risk_engine_privile import { RISK_ENGINE_REQUIRED_ES_CLUSTER_PRIVILEGES, RISK_ENGINE_REQUIRED_ES_INDEX_PRIVILEGES, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; const getMissingIndexPrivileges = ( privileges: EntityAnalyticsPrivileges['privileges']['elasticsearch']['index'] diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx index b5ccc1b8daa63..c93196a6336e5 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx @@ -36,7 +36,7 @@ import { useRiskEngineStatus } from '../api/hooks/use_risk_engine_status'; import { useInitRiskEngineMutation } from '../api/hooks/use_init_risk_engine_mutation'; import { useEnableRiskEngineMutation } from '../api/hooks/use_enable_risk_engine_mutation'; import { useDisableRiskEngineMutation } from '../api/hooks/use_disable_risk_engine_mutation'; -import { RiskEngineStatus, MAX_SPACES_COUNT } from '../../../common/risk_engine'; +import { RiskEngineStatus, MAX_SPACES_COUNT } from '../../../common/entity_analytics/risk_engine'; import { RiskInformationFlyout } from '../../explore/components/risk_score/risk_information'; import { useOnOpenCloseHandler } from '../../helper_hooks'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx index 74c7aa4dcbdea..ea499717e8341 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import type { BoolQuery, TimeRange, Query } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; -import { RiskScoreEntity, type RiskScore } from '../../../common/risk_engine'; +import { RiskScoreEntity, type RiskScore } from '../../../common/entity_analytics/risk_engine'; import { RiskScorePreviewTable } from './risk_score_preview_table'; import * as i18n from '../translations'; import { useRiskScorePreview } from '../api/hooks/use_preview_risk_scores'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx index 12b162d467132..05fa3c18809a6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx @@ -12,7 +12,10 @@ import type { RiskSeverity } from '../../../common/search_strategy'; import { RiskScoreLevel } from '../../explore/components/risk_score/severity/common'; import { HostDetailsLink, UserDetailsLink } from '../../common/components/links'; -import { RiskScoreEntity, type RiskScore as IRiskScore } from '../../../common/risk_engine'; +import { + RiskScoreEntity, + type RiskScore as IRiskScore, +} from '../../../common/entity_analytics/risk_engine'; type RiskScoreColumn = EuiBasicTableColumn & { field: keyof IRiskScore; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js b/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js new file mode 100644 index 0000000000000..ab3868717aa54 --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js @@ -0,0 +1,19 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/plugins/security_solution/public/entity_analytics'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/entity_analytics', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/plugins/security_solution/public/entity_analytics/**/*.{ts,tsx}', + ], + moduleNameMapper: require('../../server/__mocks__/module_name_map'), +}; diff --git a/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts index 424e88c9850c3..105036bd1be33 100644 --- a/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts @@ -5,7 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import type { RiskScoreEntity } from '../../../../../common/risk_engine'; +import type { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import { getRiskEntityTranslation } from '../translations'; export const BETA = i18n.translate('xpack.securitySolution.riskScore.technicalPreviewLabel', { diff --git a/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx index e0bcae1b06d29..4223acb1f44d4 100644 --- a/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx @@ -13,8 +13,8 @@ import type { Filter } from '@kbn/es-query'; import { HeaderSection } from '../../../../common/components/header_section'; import * as i18n from './translations'; -import type { RiskInputs } from '../../../../../common/risk_engine'; -import { RiskScoreEntity } from '../../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../../common/entity_analytics/risk_engine'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import type { HostRiskScore, UserRiskScore } from '../../../../../common/search_strategy'; import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../common/constants'; import { AlertsTableComponent } from '../../../../detections/components/alerts_table'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx index 93396e7dea03a..a5138dc035dc8 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { SimpleRiskInput } from '../../../../common/risk_engine'; -import { RiskCategories } from '../../../../common/risk_engine'; +import type { SimpleRiskInput } from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { fireEvent, render } from '@testing-library/react'; import React from 'react'; import { RiskInputsPanel } from '.'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx index 544dca9df62a8..34b81d26e8888 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx @@ -12,7 +12,7 @@ import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; import { get } from 'lodash/fp'; import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; -import type { RiskInputs } from '../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../common/entity_analytics/risk_engine'; import { ActionColumn } from './components/action_column'; import { PreferenceFormattedDate } from '../../../common/components/formatted_date'; import { RiskInputsUtilityBar } from './components/utility_bar'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx index 386ec25bfeaf8..de926204236ba 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; -import type { RiskInputs } from '../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../common/entity_analytics/risk_engine'; import { RiskInputsPanelContent } from './content'; export interface RiskInputsPanelProps extends Record { diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx index 763a6377a9d67..c4eaa36273166 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n'; import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; import { ONE_WEEK_IN_HOURS } from '../../../../timelines/components/side_panel/new_user_detail/constants'; import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; -import { RiskScoreEntity } from '../../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import type { RiskScoreState } from '../../../../explore/containers/risk_score'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; import { getRiskScoreSummaryAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx index bdac0653c5b7e..ff9add6011d05 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx @@ -17,7 +17,7 @@ import { useGlobalTime } from '../../../common/containers/use_global_time'; import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider'; import { buildUserNamesFilter } from '../../../../common/search_strategy'; import { useRiskScore } from '../../../explore/containers/risk_score'; -import { RiskScoreEntity } from '../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine'; import { FlyoutLoading } from '../../shared/components/flyout_loading'; import { RiskInputsPanelKey } from '../risk_inputs_left'; import { FlyoutNavigation } from '../../shared/components/flyout_navigation'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts index bfd1a9a802199..d677f79ca4322 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts @@ -8,7 +8,7 @@ import type { RiskScoreState } from '../../../../explore/containers/risk_score'; import type { RiskScoreEntity, UserRiskScore } from '../../../../../common/search_strategy'; import { RiskSeverity } from '../../../../../common/search_strategy'; -import { RiskCategories } from '../../../../../common/risk_engine'; +import { RiskCategories } from '../../../../../common/entity_analytics/risk_engine'; const userRiskScore: UserRiskScore = { '@timestamp': '626569200000', diff --git a/x-pack/plugins/security_solution/public/overview/components/common.tsx b/x-pack/plugins/security_solution/public/overview/components/common.tsx index 7ffcc7e5a95e3..f9068a4507b75 100644 --- a/x-pack/plugins/security_solution/public/overview/components/common.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/common.tsx @@ -9,7 +9,7 @@ import { EuiButtonIcon, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eu import React, { useCallback, useState } from 'react'; import * as i18n from './translations'; import { RiskScoreDocLink } from '../../explore/components/risk_score/risk_score_onboarding/risk_score_doc_link'; -import type { RiskScoreEntity } from '../../../common/risk_engine'; +import type { RiskScoreEntity } from '../../../common/entity_analytics/risk_engine'; export const RiskScoreInfoTooltip: React.FC<{ toolTipContent: React.ReactNode; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts index 6bb003df0fa85..afddfd6893240 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts @@ -8,7 +8,7 @@ import type { Logger, ElasticsearchClient } from '@kbn/core/server'; import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; import type { AssetCriticalityRecord } from '../../../../common/api/entity_analytics/asset_criticality'; import { createOrUpdateIndex } from '../utils/create_or_update_index'; -import { getAssetCriticalityIndex } from '../../../../common/asset_criticality'; +import { getAssetCriticalityIndex } from '../../../../common/entity_analytics/asset_criticality'; import { assetCriticalityFieldMap } from './configurations'; interface AssetCriticalityClientOpts { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts index 434fa3d0d952d..7c77ca722ea78 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts @@ -8,7 +8,7 @@ import type { KibanaRequest } from '@kbn/core/server'; import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { checkAndFormatPrivileges } from '../utils/check_and_format_privileges'; -import { ASSET_CRITICALITY_REQUIRED_ES_INDEX_PRIVILEGES } from '../../../../common/asset_criticality'; +import { ASSET_CRITICALITY_REQUIRED_ES_INDEX_PRIVILEGES } from '../../../../common/entity_analytics/asset_criticality'; export const getUserAssetCriticalityPrivileges = async ( request: KibanaRequest, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts index 8eb5a28cb0721..03920c099000f 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts @@ -10,7 +10,7 @@ import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { RISK_ENGINE_REQUIRED_ES_CLUSTER_PRIVILEGES, RISK_ENGINE_REQUIRED_ES_INDEX_PRIVILEGES, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; import { checkAndFormatPrivileges } from '../utils/check_and_format_privileges'; export const getUserRiskEnginePrivileges = async ( diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts index e649fa24b2139..88c911a6d7789 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts @@ -7,12 +7,12 @@ import type { Logger, ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; -import type { InitRiskEngineResult } from '../../../../common/risk_engine'; +import type { InitRiskEngineResult } from '../../../../common/entity_analytics/risk_engine'; import { RiskEngineStatus, MAX_SPACES_COUNT, RiskScoreEntity, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; import { removeLegacyTransforms, getLegacyTransforms } from '../utils/transforms'; import { updateSavedObjectAttribute, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts index 4b0d298ca4201..20db1f8d61735 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts @@ -9,7 +9,7 @@ import { ALERT_RISK_SCORE, ALERT_RULE_NAME, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { RiskCategories } from '../../../../common/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import type { CalculateRiskScoreAggregations, CalculateScoresResponse, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts index 996adec9c4908..a877bfd0f8e60 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts @@ -22,8 +22,8 @@ import type { IdentifierType, RiskWeights, RiskScore, -} from '../../../../common/risk_engine'; -import { RiskCategories } from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { withSecuritySpan } from '../../../utils/with_security_span'; import { getAfterKeyForIdentifierType, getFieldForIdentifierAgg } from './helpers'; import { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts index 4ed0533292246..2077a152e07b4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts @@ -5,8 +5,11 @@ * 2.0. */ import type { FieldMap } from '@kbn/alerts-as-data-utils'; -import type { IdentifierType } from '../../../../common/risk_engine'; -import { RiskScoreEntity, riskScoreBaseIndexName } from '../../../../common/risk_engine'; +import type { IdentifierType } from '../../../../common/entity_analytics/risk_engine'; +import { + RiskScoreEntity, + riskScoreBaseIndexName, +} from '../../../../common/entity_analytics/risk_engine'; import type { IIndexPatternString } from '../utils/create_datastream'; const commonRiskFields: FieldMap = { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts index 617b2c5a03c10..59b8b0535f97d 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts @@ -5,7 +5,11 @@ * 2.0. */ -import type { AfterKey, AfterKeys, IdentifierType } from '../../../../common/risk_engine'; +import type { + AfterKey, + AfterKeys, + IdentifierType, +} from '../../../../common/entity_analytics/risk_engine'; import type { CalculateAndPersistScoresResponse } from '../types'; export const getFieldForIdentifierAgg = (identifierType: IdentifierType): string => diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts index 8e859449bb32d..e43b44ab01894 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts @@ -7,7 +7,7 @@ import type { BulkOperationContainer } from '@elastic/elasticsearch/lib/api/types'; import type { Logger, ElasticsearchClient } from '@kbn/core/server'; -import type { IdentifierType, RiskScore } from '../../../../common/risk_engine'; +import type { IdentifierType, RiskScore } from '../../../../common/entity_analytics/risk_engine'; interface WriterBulkResponse { errors: string[]; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts index 0b8cea72d25c2..54a2dc9f78c82 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts @@ -24,7 +24,7 @@ import { import { createDataStream } from '../utils/create_datastream'; import type { RiskEngineDataWriter as Writer } from './risk_engine_data_writer'; import { RiskEngineDataWriter } from './risk_engine_data_writer'; -import { getRiskScoreLatestIndex } from '../../../../common/risk_engine'; +import { getRiskScoreLatestIndex } from '../../../../common/entity_analytics/risk_engine'; import { getLatestTransformId, createTransform } from '../utils/transforms'; import { getRiskInputsIndex } from './get_risk_inputs_index'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts index 68b5b55dbda42..e72852f6ea47a 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts @@ -6,7 +6,7 @@ */ import type { RiskScoreService } from './risk_score_service'; -import type { RiskScore } from '../../../../common/risk_engine'; +import type { RiskScore } from '../../../../common/entity_analytics/risk_engine'; const createRiskScoreMock = (overrides: Partial = {}): RiskScore => ({ '@timestamp': '2023-02-15T00:15:19.231Z', diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts index 40b3ee800b1bd..86bdc0d0e6be0 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskWeightTypes, RiskCategories } from '../../../../common/risk_engine'; +import { RiskWeightTypes, RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { buildCategoryAssignment, buildCategoryWeights, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts index 225887f2dce55..f0af4360b8631 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts @@ -12,8 +12,8 @@ import type { RiskCategoryRiskWeight, RiskWeight, RiskWeights, -} from '../../../../common/risk_engine'; -import { RiskCategories, RiskWeightTypes } from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories, RiskWeightTypes } from '../../../../common/entity_analytics/risk_engine'; const RISK_CATEGORIES = Object.values(RiskCategories); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts index bb77d999aef4b..1822c038b7d1d 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts @@ -13,7 +13,7 @@ import { DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_CALCULATION_URL, } from '../../../../../common/constants'; -import { riskScoreCalculationRequestSchema } from '../../../../../common/risk_engine/risk_score_calculation/request_schema'; +import { riskScoreCalculationRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_calculation/request_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts index 09f6335077c86..9a525a5bae0d5 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts @@ -8,7 +8,10 @@ import { loggerMock } from '@kbn/logging-mocks'; import { RISK_SCORE_PREVIEW_URL } from '../../../../../common/constants'; -import { RiskCategories, RiskWeightTypes } from '../../../../../common/risk_engine'; +import { + RiskCategories, + RiskWeightTypes, +} from '../../../../../common/entity_analytics/risk_engine'; import { serverMock, requestContextMock, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts index eaf54cf5e5dea..13f3ee8a9df07 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts @@ -14,7 +14,7 @@ import { DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_PREVIEW_URL, } from '../../../../../common/constants'; -import { riskScorePreviewRequestSchema } from '../../../../../common/risk_engine/risk_score_preview/request_schema'; +import { riskScorePreviewRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts index b2db9b348b55e..0fbb0ef2c8652 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts @@ -14,7 +14,7 @@ import { } from '@kbn/core/server'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/server'; -import type { Range } from '../../../../../common/risk_engine'; +import type { Range } from '../../../../../common/entity_analytics/risk_engine'; export const convertDateToISOString = (dateString: string): string => { const date = datemath.parse(dateString); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts index 61a733907fb38..a1539167bbaf4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts @@ -18,7 +18,7 @@ import type { TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; -import type { AfterKeys, IdentifierType } from '../../../../../common/risk_engine'; +import type { AfterKeys, IdentifierType } from '../../../../../common/entity_analytics/risk_engine'; import type { StartPlugins } from '../../../../plugin'; import { type RiskScoreService, riskScoreServiceFactory } from '../risk_score_service'; import { RiskEngineDataClient } from '../../risk_engine/risk_engine_data_client'; @@ -31,7 +31,7 @@ import { } from './state'; import { INTERVAL, SCOPE, TIMEOUT, TYPE, VERSION } from './constants'; import { buildScopedInternalSavedObjectsClientUnsafe, convertRangeToISO } from './helpers'; -import { RiskScoreEntity } from '../../../../../common/risk_engine/types'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine/types'; import { RISK_SCORE_EXECUTION_SUCCESS_EVENT, RISK_SCORE_EXECUTION_ERROR_EVENT, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts index e767db0fe2318..acdb1982011d2 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts @@ -14,7 +14,7 @@ import type { Range, RiskEngineStatus, RiskScore, -} from '../../../common/risk_engine'; +} from '../../../common/entity_analytics/risk_engine'; export interface CalculateScoresParams { afterKeys: AfterKeys; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index ec01a2800dff8..4841ec9fed73d 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -109,7 +109,10 @@ import { import { AppFeaturesService } from './lib/app_features_service/app_features_service'; import { registerRiskScoringTask } from './lib/entity_analytics/risk_score/tasks/risk_scoring_task'; import { registerProtectionUpdatesNoteRoutes } from './endpoint/routes/protection_updates_note'; -import { latestRiskScoreIndexPattern, allRiskScoreIndexPattern } from '../common/risk_engine'; +import { + latestRiskScoreIndexPattern, + allRiskScoreIndexPattern, +} from '../common/entity_analytics/risk_engine'; import { isEndpointPackageV2 } from '../common/endpoint/utils/package_v2'; export type { SetupPlugins, StartPlugins, PluginSetup, PluginStart } from './plugin_contract'; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts index 74e37b4737f71..03f7734e42628 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; import { RISK_SCORE_CALCULATION_URL } from '@kbn/security-solution-plugin/common/constants'; -import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { RiskScore } from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { v4 as uuidv4 } from 'uuid'; import { deleteAllAlerts, diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts index ae1fdb82d0953..e4284cdb5b837 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { ALERT_RISK_SCORE } from '@kbn/rule-data-utils'; import { RISK_SCORE_PREVIEW_URL } from '@kbn/security-solution-plugin/common/constants'; -import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { RiskScore } from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { v4 as uuidv4 } from 'uuid'; import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; import { diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts index 103577482a771..9fa3a0d4f123e 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts @@ -13,7 +13,10 @@ import { v4 as uuidv4 } from 'uuid'; import SuperTest from 'supertest'; import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; -import type { EcsRiskScore, RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { + EcsRiskScore, + RiskScore, +} from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/entity_analytics/risk_engine/saved_object'; import type { KbnClient } from '@kbn/test'; import {