Skip to content

Commit 42d2464

Browse files
[Security Solution] [Attack discovery] Removes Alerts filtering feature flag (#209851)
### [Security Solution] [Attack discovery] Removes Alerts filtering feature flag This PR removes the feature flag for the Attack discovery _Alerts filtering_ feature, introduced in <#205070>. The `Attack discovery settings` flyout shown in the gif below is now available for all Attack discovery users when they click the settings gear: ![00_alerts_filtering](https://github.com/user-attachments/assets/1a81413b-b8f4-4965-a006-25fb529668a6) #### Details This PR _removes_ the `attackDiscoveryAlertFiltering` feature flag, which was configured via the following setting in kibana.dev.yml: ```yaml xpack.securitySolution.enableExperimental: - 'attackDiscoveryAlertFiltering' ``` #### Desk testing 1. Ensure the `attackDiscoveryAlertFiltering` feature flag is present in `kibana.dev.yml`: ```yaml xpack.securitySolution.enableExperimental: - 'attackDiscoveryAlertFiltering' ``` 2. Start Kibana server and observe the startup logs **Expected result** - A warning that the `attackDiscoveryAlertFiltering` flag is no longer supported is logged: ``` [2025-02-05T11:24:31.612-05:00][WARN ][plugins.securitySolution.config] Unsupported "xpack.securitySolution.enableExperimental" values detected. The following configuration values are no longer supported and should be removed from the kibana configuration file: xpack.securitySolution.enableExperimental: - attackDiscoveryAlertFiltering ``` 3. Remove the `attackDiscoveryAlertFiltering` feature flag from `kibana.dev.yml` 4. Restart Kibana server and once again observe the startup logs **Expected result** - The warning displayed in step 2 is NOT logged 5. Navigate to Security > Attack discovery 6. Click the `Settings` gear **Expected result** - The `Attack discovery settings` flyout shown in the PR description above appears
1 parent ad9baa6 commit 42d2464

File tree

25 files changed

+58
-816
lines changed

25 files changed

+58
-816
lines changed

x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ export type AssistantFeatureKey = keyof AssistantFeatures;
2121
export const defaultAssistantFeatures = Object.freeze({
2222
assistantModelEvaluation: false,
2323
defendInsights: true,
24-
attackDiscoveryAlertFiltering: false,
2524
contentReferencesEnabled: false,
2625
});

x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { z } from '@kbn/zod';
1919
export type GetCapabilitiesResponse = z.infer<typeof GetCapabilitiesResponse>;
2020
export const GetCapabilitiesResponse = z.object({
2121
assistantModelEvaluation: z.boolean(),
22-
attackDiscoveryAlertFiltering: z.boolean(),
2322
contentReferencesEnabled: z.boolean(),
2423
defendInsights: z.boolean(),
2524
});

x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ paths:
2222
properties:
2323
assistantModelEvaluation:
2424
type: boolean
25-
attackDiscoveryAlertFiltering:
26-
type: boolean
2725
contentReferencesEnabled:
2826
type: boolean
2927
defendInsights:
3028
type: boolean
3129
required:
3230
- assistantModelEvaluation
33-
- attackDiscoveryAlertFiltering
3431
- contentReferencesEnabled
3532
- defendInsights
3633
'400':

x-pack/platform/plugins/private/translations/translations/fr-FR.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34217,16 +34217,6 @@
3421734217
"xpack.securitySolution.attackDiscovery.pages.pageTitle.statusConnectors": "Vous avez {newDiscoveriesCount} {newDiscoveriesCount, plural, =1 {nouvelle découverte} other {nouvelles découvertes}} à travers {newConnectorResultsCount} {newConnectorResultsCount, plural, =1 {connecteur} other {connecteurs}} à examiner.",
3421834218
"xpack.securitySolution.attackDiscovery.pages.welcome.firstSetUpLabel": "Tout d’abord, configurez un connecteur d’IA générative.",
3421934219
"xpack.securitySolution.attackDiscovery.pages.welcome.welcomeToAttackDiscoveryLabel": "Bienvenue sur Attack discovery !",
34220-
"xpack.securitySolution.attackDiscovery.settingsModal.alertsLabel": "Alertes",
34221-
"xpack.securitySolution.attackDiscovery.settingsModal.attackDiscoverySendsMoreAlertsTourText": "La découverte d'attaques envoie davantage d'alertes en tant que contexte.",
34222-
"xpack.securitySolution.attackDiscovery.settingsModal.cancelButton": "Annuler",
34223-
"xpack.securitySolution.attackDiscovery.settingsModal.configureYourSettingsHereTourText": "Configurez vos paramètres ici.",
34224-
"xpack.securitySolution.attackDiscovery.settingsModal.latestAndRiskiestOpenAlertsLabel": "Envoyez à Attack discovery des informations sur vos {alertsCount} alertes ouvertes ou confirmées les plus récentes et les plus risquées.",
34225-
"xpack.securitySolution.attackDiscovery.settingsModal.resetLabel": "Réinitialiser",
34226-
"xpack.securitySolution.attackDiscovery.settingsModal.saveButton": "Enregistrer",
34227-
"xpack.securitySolution.attackDiscovery.settingsModal.settingsLabel": "Paramètres",
34228-
"xpack.securitySolution.attackDiscovery.settingsModal.tourSubtitle": "Améliorations récentes de Attack Discovery",
34229-
"xpack.securitySolution.attackDiscovery.settingsModal.tourTitle": "Envoyer plus d'alertes",
3423034220
"xpack.securitySolution.attackDiscovery.showAnonymizedLabel": "Afficher les anonymisés",
3423134221
"xpack.securitySolution.attackDiscovery.showRealValuesLabel": "Afficher les valeurs réelles",
3423234222
"xpack.securitySolution.attackDiscovery.summaryCount.alertsLabel": "{alertsCount} {alertsCount, plural, =1 {alerte} other {alertes}}",

x-pack/platform/plugins/private/translations/translations/ja-JP.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34079,16 +34079,6 @@
3407934079
"xpack.securitySolution.attackDiscovery.pages.pageTitle.statusConnectors": "{newConnectorResultsCount} {newConnectorResultsCount, plural, other {コネクター}}全体で、表示する{newDiscoveriesCount}件の新しい{newDiscoveriesCount, plural, other {検出}}があります。",
3408034080
"xpack.securitySolution.attackDiscovery.pages.welcome.firstSetUpLabel": "まず、生成AIコネクターを設定します。",
3408134081
"xpack.securitySolution.attackDiscovery.pages.welcome.welcomeToAttackDiscoveryLabel": "Attack Discoveryへようこそ!",
34082-
"xpack.securitySolution.attackDiscovery.settingsModal.alertsLabel": "アラート",
34083-
"xpack.securitySolution.attackDiscovery.settingsModal.attackDiscoverySendsMoreAlertsTourText": "Attack discoveryはその他のアラートをコンテキストとして送信します。",
34084-
"xpack.securitySolution.attackDiscovery.settingsModal.cancelButton": "キャンセル",
34085-
"xpack.securitySolution.attackDiscovery.settingsModal.configureYourSettingsHereTourText": "ここで設定を構成します。",
34086-
"xpack.securitySolution.attackDiscovery.settingsModal.latestAndRiskiestOpenAlertsLabel": "{alertsCount}件の最新の最もリスクが高い未解決または確認済みのアラートに関するAttack discovery情報を送信します。",
34087-
"xpack.securitySolution.attackDiscovery.settingsModal.resetLabel": "リセット",
34088-
"xpack.securitySolution.attackDiscovery.settingsModal.saveButton": "保存",
34089-
"xpack.securitySolution.attackDiscovery.settingsModal.settingsLabel": "設定",
34090-
"xpack.securitySolution.attackDiscovery.settingsModal.tourSubtitle": "最近のAttack discoveryの改良",
34091-
"xpack.securitySolution.attackDiscovery.settingsModal.tourTitle": "その他のアラートを送信",
3409234082
"xpack.securitySolution.attackDiscovery.showAnonymizedLabel": "匿名化して表示",
3409334083
"xpack.securitySolution.attackDiscovery.showRealValuesLabel": "実際の値を表示",
3409434084
"xpack.securitySolution.attackDiscovery.summaryCount.alertsLabel": "{alertsCount} {alertsCount, plural, other {件のアラート}}",

x-pack/platform/plugins/private/translations/translations/zh-CN.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33551,16 +33551,6 @@
3355133551
"xpack.securitySolution.attackDiscovery.pages.pageTitle.statusConnectors": "您具有 {newDiscoveriesCount} 个新{newDiscoveriesCount, plural, other {发现}}可跨 {newConnectorResultsCount} 个{newConnectorResultsCount, plural, other {连接器}}查看。",
3355233552
"xpack.securitySolution.attackDiscovery.pages.welcome.firstSetUpLabel": "首先设置生成式 AI 连接器。",
3355333553
"xpack.securitySolution.attackDiscovery.pages.welcome.welcomeToAttackDiscoveryLabel": "欢迎使用 Attack Discovery!",
33554-
"xpack.securitySolution.attackDiscovery.settingsModal.alertsLabel": "告警",
33555-
"xpack.securitySolution.attackDiscovery.settingsModal.attackDiscoverySendsMoreAlertsTourText": "Attack Discovery 会发送更多告警作为上下文。",
33556-
"xpack.securitySolution.attackDiscovery.settingsModal.cancelButton": "取消",
33557-
"xpack.securitySolution.attackDiscovery.settingsModal.configureYourSettingsHereTourText": "在此配置您的设置。",
33558-
"xpack.securitySolution.attackDiscovery.settingsModal.latestAndRiskiestOpenAlertsLabel": "发送有关 {alertsCount} 个最新和风险最高的未决或已确认告警的 Attack Discovery 信息。",
33559-
"xpack.securitySolution.attackDiscovery.settingsModal.resetLabel": "重置",
33560-
"xpack.securitySolution.attackDiscovery.settingsModal.saveButton": "保存",
33561-
"xpack.securitySolution.attackDiscovery.settingsModal.settingsLabel": "设置",
33562-
"xpack.securitySolution.attackDiscovery.settingsModal.tourSubtitle": "最近的 Attack Discovery 改进",
33563-
"xpack.securitySolution.attackDiscovery.settingsModal.tourTitle": "发送更多告警",
3356433554
"xpack.securitySolution.attackDiscovery.showAnonymizedLabel": "显示已匿名处理项",
3356533555
"xpack.securitySolution.attackDiscovery.showRealValuesLabel": "显示实际值",
3356633556
"xpack.securitySolution.attackDiscovery.summaryCount.alertsLabel": "{alertsCount} 个{alertsCount, plural, other {告警}}",

x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ export const allowedExperimentalValues = Object.freeze({
114114
*/
115115
assistantModelEvaluation: false,
116116

117-
/**
118-
* Enables filtering of Attack Discovery alerts in a flyout
119-
*/
120-
attackDiscoveryAlertFiltering: false,
121-
122117
/**
123118
* Enables content references (citations) in the AI Assistant
124119
*/

x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/header/index.test.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
import { DEFAULT_ATTACK_DISCOVERY_MAX_ALERTS } from '@kbn/elastic-assistant';
9-
import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common';
109
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
1110
import React from 'react';
1211

@@ -16,18 +15,6 @@ import { Header } from '.';
1615

1716
jest.mock('../../../assistant/use_assistant_availability');
1817

19-
jest.mock('@kbn/elastic-assistant-common', () => {
20-
const original = jest.requireActual('@kbn/elastic-assistant-common');
21-
22-
return {
23-
...original,
24-
defaultAssistantFeatures: {
25-
...original.defaultAssistantFeatures,
26-
attackDiscoveryAlertFiltering: jest.mocked<boolean>(false), // <-- feature flag is off by default
27-
},
28-
};
29-
});
30-
3118
const defaultProps = {
3219
stats: null,
3320
connectorId: 'testConnectorId',
@@ -50,7 +37,6 @@ describe('Actions', () => {
5037
});
5138

5239
jest.clearAllMocks();
53-
(defaultAssistantFeatures.attackDiscoveryAlertFiltering as jest.Mocked<boolean>) = false; // reset feature flag to off
5440
});
5541

5642
it('renders the connector selector', () => {
@@ -139,8 +125,7 @@ describe('Actions', () => {
139125
expect(generate).toBeDisabled();
140126
});
141127

142-
it('invokes openFlyout when the settings button is clicked, when the attackDiscoveryAlertFiltering feature flag is on', async () => {
143-
(defaultAssistantFeatures.attackDiscoveryAlertFiltering as jest.Mocked<boolean>) = true;
128+
it('invokes openFlyout when the settings button is clicked', async () => {
144129
const openFlyout = jest.fn();
145130

146131
render(

x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/header/index.tsx

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ import {
1515
useEuiTheme,
1616
} from '@elastic/eui';
1717
import { css } from '@emotion/react';
18-
import { ConnectorSelectorInline, useAssistantContext } from '@kbn/elastic-assistant';
18+
import { ConnectorSelectorInline } from '@kbn/elastic-assistant';
1919
import type { AttackDiscoveryStats } from '@kbn/elastic-assistant-common';
2020
import { noop } from 'lodash/fp';
2121
import React, { useCallback, useEffect, useMemo, useState } from 'react';
2222

23-
import { SettingsModal } from './settings_modal';
2423
import { StatusBell } from './status_bell';
2524
import * as i18n from './translations';
2625

@@ -51,10 +50,6 @@ const HeaderComponent: React.FC<Props> = ({
5150
setLocalStorageAttackDiscoveryMaxAlerts,
5251
stats,
5352
}) => {
54-
const {
55-
assistantFeatures: { attackDiscoveryAlertFiltering },
56-
} = useAssistantContext();
57-
5853
const { euiTheme } = useEuiTheme();
5954
const disabled = connectorId == null;
6055

@@ -120,24 +115,15 @@ const HeaderComponent: React.FC<Props> = ({
120115
`}
121116
grow={false}
122117
>
123-
{attackDiscoveryAlertFiltering ? (
124-
<EuiToolTip content={i18n.SETTINGS} data-test-subj="openAlertSelectionToolTip">
125-
<EuiButtonIcon
126-
aria-label={i18n.SETTINGS}
127-
color="text"
128-
data-test-subj="openAlertSelection"
129-
iconType="gear"
130-
onClick={openFlyout}
131-
/>
132-
</EuiToolTip>
133-
) : (
134-
<SettingsModal
135-
connectorId={connectorId}
136-
isLoading={isLoading}
137-
localStorageAttackDiscoveryMaxAlerts={localStorageAttackDiscoveryMaxAlerts}
138-
setLocalStorageAttackDiscoveryMaxAlerts={setLocalStorageAttackDiscoveryMaxAlerts}
118+
<EuiToolTip content={i18n.SETTINGS} data-test-subj="openAlertSelectionToolTip">
119+
<EuiButtonIcon
120+
aria-label={i18n.SETTINGS}
121+
color="text"
122+
data-test-subj="openAlertSelection"
123+
iconType="gear"
124+
onClick={openFlyout}
139125
/>
140-
)}
126+
</EuiToolTip>
141127
</EuiFlexItem>
142128

143129
<EuiFlexItem grow={false}>

x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/header/settings_modal/alerts_settings/index.test.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)