[AI4DSOC] Alert Flyout#218018
Conversation
This reverts commit 19bf208.
PhilippeOberti
left a comment
There was a problem hiding this comment.
I just noticed a wrong usage of DocumentDetailsContextProvider, I'm blocking the PR just to be sure and I'm working on replacing it with the AIForSocContextProvider. This requires making some changes to the HighlightedFields component and will require testing in the alerts page flyout
… reuse between document_details flyout and ai_for_soc flyout
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Show resolved
Hide resolved
...ecurity_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx
Show resolved
Hide resolved
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Show resolved
Hide resolved
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Outdated
Show resolved
Hide resolved
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Show resolved
Hide resolved
PhilippeOberti
left a comment
There was a problem hiding this comment.
LGTM for the Threat Hunting Investigations team!
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
|
run docs-build |
The code that was modifying the alerts_context.tsx file has been reverted as it is not needed anymore.
## Summary Alert flyout for AI for the SOC. <img width="600" alt="Screenshot 2025-04-11 at 12 15 22 PM" src="https://github.com/user-attachments/assets/fea2f7fb-7424-46b5-b9c2-5cafa336b0a9" /> ### The flyout sections include: - New header highlighting the integration source <img width="596" alt="Screenshot 2025-04-11 at 12 16 00 PM" src="https://github.com/user-attachments/assets/13033225-9e41-431f-8061-5df96a981665" /> - AI generated alert summary generated by button (Generate or Regenerate). Stored in a new data stream (`.kibana-elastic-ai-assistant-alert-summary-*`) <img width="595" alt="Screenshot 2025-04-11 at 12 15 55 PM" src="https://github.com/user-attachments/assets/ac835db2-2cbb-4a59-9e71-f1a9616a777f" /> - Anonymization toggle for the alert summary is located in the flyout gear settings menu <img width="270" alt="Screenshot 2025-04-11 at 12 32 45 PM" src="https://github.com/user-attachments/assets/952936b9-571b-48e5-bd57-ecfd33855df3" /> - Highlighted fields <img width="600" alt="Screenshot 2025-04-11 at 12 15 52 PM" src="https://github.com/user-attachments/assets/3fccfab2-3e8b-4edc-adaf-3f320d9a5d20" /> - Attack discovery `MiniAttackChain` (currently hardcoded to a preconfigured connector, waiting for further work from @andrew-goldstein to hook up to actual alert related AD) <img width="597" alt="Screenshot 2025-04-11 at 12 15 36 PM" src="https://github.com/user-attachments/assets/d181f68d-5b77-4df4-a316-54e84d655a4c" /> - Conversations dropdown that show any conversations this alert is referenced <img width="601" alt="Screenshot 2025-04-11 at 12 18 03 PM" src="https://github.com/user-attachments/assets/71d533d3-99b4-49c4-b336-05152fd64ed4" /> - Suggested prompts that create a new conversation with the alert as context (_copy pending_) <img width="594" alt="Screenshot 2025-04-11 at 12 18 09 PM" src="https://github.com/user-attachments/assets/bca58f5a-f05c-4cdf-a466-0926c99e0ad6" /> - The connector used in the alert summary generation is selected in Stack Management > Advanced Settings > Security Solution > Default AI Connector (_copy pending_) <img width="1163" alt="Screenshot 2025-04-11 at 12 34 15 PM" src="https://github.com/user-attachments/assets/d2128497-22e4-4c14-b08c-991dc8287391" /> ### New prompts This PR adds 2 new prompts under a new `promptGroupId.aiForSoc`: - `promptDictionary.alertSummarySystemPrompt` - `promptDictionary.alertSummary` In order to access these prompts in the proper spots, the new find alert summary route returns the "user" prompt (`promptDictionary.alertSummary`). In order to get the system prompt in place, we pass a `promptIds` object to the `POST_ACTIONS_CONNECTOR_EXECUTE` which is appended to the main system prompt ## Testing This needs to be ran in Serverless: - `yarn es serverless --projectType security` - `yarn serverless-security --no-base-path` You also need to enable the AI for SOC tier, by adding the following to your `serverless.security.dev.yml` file: ``` xpack.securitySolutionServerless.productTypes: [ { product_line: 'ai_soc', product_tier: 'search_ai_lake' }, ] ``` Use one of these Serverless users: - `platform_engineer` - `endpoint_operations_analyst` - `endpoint_policy_manager` - `admin` - `system_indices_superuser` Then: - generate data: `yarn test:generate:serverless-dev` - create 4 catch all rules, each with a name of a AI for SOC integration (`google_secops`, `microsoft_sentinel`,, `sentinel_one` and `crowdstrike`) => to do that you'll need to temporary comment the `serverless.security.dev.yaml` config changes as the rules page is not accessible in AI for SOC. - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73) to `installedPackages: availablePackages` to force having some packages installed - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63) to `r.name === p.name` to make sure there will be matches between integrations and rules With this alerts data, you should be able to test each section of the flyout _except_ the attack discovery widget, instructions for that are below. #### Attack discovery widget As I am waiting for updates from Andrew, currently the attack discovery widget looks up attack discoveries from a particular preconfigured connector. In order to test: 1. Add preconfigured connector to your `kibana.dev.yml`: https://p.elstc.co/paste/J2qmGMeQ#GKSPhlggX4F93aUSKJsKpsqtCcyTepCkfJOEVxlZyfB 2. Generate attack discovery with this connector 3. Open the new flyout, you will see the attack discovery widget ## Outstanding TODOs These are all noted in the code 1. Attack discovery widget is hardcoded to the preconfigured connector id. The widget should instead look up discoveries by alert ID, pending work from @andrew-goldstein 2. Update copy for suggested prompts 3. Update copy for ai connector UI setting 4. Update AI connector UI setting to default to Elastic Managed LLM once it is fully available in serverless --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co> Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
## Summary Alert flyout for AI for the SOC. <img width="600" alt="Screenshot 2025-04-11 at 12 15 22 PM" src="https://github.com/user-attachments/assets/fea2f7fb-7424-46b5-b9c2-5cafa336b0a9" /> ### The flyout sections include: - New header highlighting the integration source <img width="596" alt="Screenshot 2025-04-11 at 12 16 00 PM" src="https://github.com/user-attachments/assets/13033225-9e41-431f-8061-5df96a981665" /> - AI generated alert summary generated by button (Generate or Regenerate). Stored in a new data stream (`.kibana-elastic-ai-assistant-alert-summary-*`) <img width="595" alt="Screenshot 2025-04-11 at 12 15 55 PM" src="https://github.com/user-attachments/assets/ac835db2-2cbb-4a59-9e71-f1a9616a777f" /> - Anonymization toggle for the alert summary is located in the flyout gear settings menu <img width="270" alt="Screenshot 2025-04-11 at 12 32 45 PM" src="https://github.com/user-attachments/assets/952936b9-571b-48e5-bd57-ecfd33855df3" /> - Highlighted fields <img width="600" alt="Screenshot 2025-04-11 at 12 15 52 PM" src="https://github.com/user-attachments/assets/3fccfab2-3e8b-4edc-adaf-3f320d9a5d20" /> - Attack discovery `MiniAttackChain` (currently hardcoded to a preconfigured connector, waiting for further work from @andrew-goldstein to hook up to actual alert related AD) <img width="597" alt="Screenshot 2025-04-11 at 12 15 36 PM" src="https://github.com/user-attachments/assets/d181f68d-5b77-4df4-a316-54e84d655a4c" /> - Conversations dropdown that show any conversations this alert is referenced <img width="601" alt="Screenshot 2025-04-11 at 12 18 03 PM" src="https://github.com/user-attachments/assets/71d533d3-99b4-49c4-b336-05152fd64ed4" /> - Suggested prompts that create a new conversation with the alert as context (_copy pending_) <img width="594" alt="Screenshot 2025-04-11 at 12 18 09 PM" src="https://github.com/user-attachments/assets/bca58f5a-f05c-4cdf-a466-0926c99e0ad6" /> - The connector used in the alert summary generation is selected in Stack Management > Advanced Settings > Security Solution > Default AI Connector (_copy pending_) <img width="1163" alt="Screenshot 2025-04-11 at 12 34 15 PM" src="https://github.com/user-attachments/assets/d2128497-22e4-4c14-b08c-991dc8287391" /> ### New prompts This PR adds 2 new prompts under a new `promptGroupId.aiForSoc`: - `promptDictionary.alertSummarySystemPrompt` - `promptDictionary.alertSummary` In order to access these prompts in the proper spots, the new find alert summary route returns the "user" prompt (`promptDictionary.alertSummary`). In order to get the system prompt in place, we pass a `promptIds` object to the `POST_ACTIONS_CONNECTOR_EXECUTE` which is appended to the main system prompt ## Testing This needs to be ran in Serverless: - `yarn es serverless --projectType security` - `yarn serverless-security --no-base-path` You also need to enable the AI for SOC tier, by adding the following to your `serverless.security.dev.yml` file: ``` xpack.securitySolutionServerless.productTypes: [ { product_line: 'ai_soc', product_tier: 'search_ai_lake' }, ] ``` Use one of these Serverless users: - `platform_engineer` - `endpoint_operations_analyst` - `endpoint_policy_manager` - `admin` - `system_indices_superuser` Then: - generate data: `yarn test:generate:serverless-dev` - create 4 catch all rules, each with a name of a AI for SOC integration (`google_secops`, `microsoft_sentinel`,, `sentinel_one` and `crowdstrike`) => to do that you'll need to temporary comment the `serverless.security.dev.yaml` config changes as the rules page is not accessible in AI for SOC. - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73) to `installedPackages: availablePackages` to force having some packages installed - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63) to `r.name === p.name` to make sure there will be matches between integrations and rules With this alerts data, you should be able to test each section of the flyout _except_ the attack discovery widget, instructions for that are below. #### Attack discovery widget As I am waiting for updates from Andrew, currently the attack discovery widget looks up attack discoveries from a particular preconfigured connector. In order to test: 1. Add preconfigured connector to your `kibana.dev.yml`: https://p.elstc.co/paste/J2qmGMeQ#GKSPhlggX4F93aUSKJsKpsqtCcyTepCkfJOEVxlZyfB 2. Generate attack discovery with this connector 3. Open the new flyout, you will see the attack discovery widget ## Outstanding TODOs These are all noted in the code 1. Attack discovery widget is hardcoded to the preconfigured connector id. The widget should instead look up discoveries by alert ID, pending work from @andrew-goldstein 2. Update copy for suggested prompts 3. Update copy for ai connector UI setting 4. Update AI connector UI setting to default to Elastic Managed LLM once it is fully available in serverless --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co> Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Alert flyout for AI for the SOC. <img width="600" alt="Screenshot 2025-04-11 at 12 15 22 PM" src="https://github.com/user-attachments/assets/fea2f7fb-7424-46b5-b9c2-5cafa336b0a9" /> ### The flyout sections include: - New header highlighting the integration source <img width="596" alt="Screenshot 2025-04-11 at 12 16 00 PM" src="https://github.com/user-attachments/assets/13033225-9e41-431f-8061-5df96a981665" /> - AI generated alert summary generated by button (Generate or Regenerate). Stored in a new data stream (`.kibana-elastic-ai-assistant-alert-summary-*`) <img width="595" alt="Screenshot 2025-04-11 at 12 15 55 PM" src="https://github.com/user-attachments/assets/ac835db2-2cbb-4a59-9e71-f1a9616a777f" /> - Anonymization toggle for the alert summary is located in the flyout gear settings menu <img width="270" alt="Screenshot 2025-04-11 at 12 32 45 PM" src="https://github.com/user-attachments/assets/952936b9-571b-48e5-bd57-ecfd33855df3" /> - Highlighted fields <img width="600" alt="Screenshot 2025-04-11 at 12 15 52 PM" src="https://github.com/user-attachments/assets/3fccfab2-3e8b-4edc-adaf-3f320d9a5d20" /> - Attack discovery `MiniAttackChain` (currently hardcoded to a preconfigured connector, waiting for further work from @andrew-goldstein to hook up to actual alert related AD) <img width="597" alt="Screenshot 2025-04-11 at 12 15 36 PM" src="https://github.com/user-attachments/assets/d181f68d-5b77-4df4-a316-54e84d655a4c" /> - Conversations dropdown that show any conversations this alert is referenced <img width="601" alt="Screenshot 2025-04-11 at 12 18 03 PM" src="https://github.com/user-attachments/assets/71d533d3-99b4-49c4-b336-05152fd64ed4" /> - Suggested prompts that create a new conversation with the alert as context (_copy pending_) <img width="594" alt="Screenshot 2025-04-11 at 12 18 09 PM" src="https://github.com/user-attachments/assets/bca58f5a-f05c-4cdf-a466-0926c99e0ad6" /> - The connector used in the alert summary generation is selected in Stack Management > Advanced Settings > Security Solution > Default AI Connector (_copy pending_) <img width="1163" alt="Screenshot 2025-04-11 at 12 34 15 PM" src="https://github.com/user-attachments/assets/d2128497-22e4-4c14-b08c-991dc8287391" /> ### New prompts This PR adds 2 new prompts under a new `promptGroupId.aiForSoc`: - `promptDictionary.alertSummarySystemPrompt` - `promptDictionary.alertSummary` In order to access these prompts in the proper spots, the new find alert summary route returns the "user" prompt (`promptDictionary.alertSummary`). In order to get the system prompt in place, we pass a `promptIds` object to the `POST_ACTIONS_CONNECTOR_EXECUTE` which is appended to the main system prompt ## Testing This needs to be ran in Serverless: - `yarn es serverless --projectType security` - `yarn serverless-security --no-base-path` You also need to enable the AI for SOC tier, by adding the following to your `serverless.security.dev.yml` file: ``` xpack.securitySolutionServerless.productTypes: [ { product_line: 'ai_soc', product_tier: 'search_ai_lake' }, ] ``` Use one of these Serverless users: - `platform_engineer` - `endpoint_operations_analyst` - `endpoint_policy_manager` - `admin` - `system_indices_superuser` Then: - generate data: `yarn test:generate:serverless-dev` - create 4 catch all rules, each with a name of a AI for SOC integration (`google_secops`, `microsoft_sentinel`,, `sentinel_one` and `crowdstrike`) => to do that you'll need to temporary comment the `serverless.security.dev.yaml` config changes as the rules page is not accessible in AI for SOC. - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73) to `installedPackages: availablePackages` to force having some packages installed - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63) to `r.name === p.name` to make sure there will be matches between integrations and rules With this alerts data, you should be able to test each section of the flyout _except_ the attack discovery widget, instructions for that are below. #### Attack discovery widget As I am waiting for updates from Andrew, currently the attack discovery widget looks up attack discoveries from a particular preconfigured connector. In order to test: 1. Add preconfigured connector to your `kibana.dev.yml`: https://p.elstc.co/paste/J2qmGMeQ#GKSPhlggX4F93aUSKJsKpsqtCcyTepCkfJOEVxlZyfB 2. Generate attack discovery with this connector 3. Open the new flyout, you will see the attack discovery widget ## Outstanding TODOs These are all noted in the code 1. Attack discovery widget is hardcoded to the preconfigured connector id. The widget should instead look up discoveries by alert ID, pending work from @andrew-goldstein 2. Update copy for suggested prompts 3. Update copy for ai connector UI setting 4. Update AI connector UI setting to default to Elastic Managed LLM once it is fully available in serverless --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co> Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co> (cherry picked from commit ba0894d) # Conflicts: # x-pack/platform/packages/shared/kbn-elastic-assistant-common/constants.ts # x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts # x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/common_attributes.schema.yaml # x-pack/platform/packages/shared/kbn-elastic-assistant-common/index.ts # x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/use_send_message/index.tsx # x-pack/solutions/security/plugins/elastic_assistant/server/ai_assistant_service/index.ts # x-pack/solutions/security/plugins/elastic_assistant/server/lib/prompt/local_prompt_object.ts # x-pack/solutions/security/plugins/elastic_assistant/server/lib/prompt/prompts.ts # x-pack/solutions/security/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts # x-pack/solutions/security/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts # x-pack/solutions/security/plugins/elastic_assistant/server/routes/register_routes.ts # x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/panel_header/summary_actions/mini_attack_chain/index.test.tsx # x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx # x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts # x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json
Alert flyout for AI for the SOC. <img width="600" alt="Screenshot 2025-04-11 at 12 15 22 PM" src="https://github.com/user-attachments/assets/fea2f7fb-7424-46b5-b9c2-5cafa336b0a9" /> - New header highlighting the integration source <img width="596" alt="Screenshot 2025-04-11 at 12 16 00 PM" src="https://github.com/user-attachments/assets/13033225-9e41-431f-8061-5df96a981665" /> - AI generated alert summary generated by button (Generate or Regenerate). Stored in a new data stream (`.kibana-elastic-ai-assistant-alert-summary-*`) <img width="595" alt="Screenshot 2025-04-11 at 12 15 55 PM" src="https://github.com/user-attachments/assets/ac835db2-2cbb-4a59-9e71-f1a9616a777f" /> - Anonymization toggle for the alert summary is located in the flyout gear settings menu <img width="270" alt="Screenshot 2025-04-11 at 12 32 45 PM" src="https://github.com/user-attachments/assets/952936b9-571b-48e5-bd57-ecfd33855df3" /> - Highlighted fields <img width="600" alt="Screenshot 2025-04-11 at 12 15 52 PM" src="https://github.com/user-attachments/assets/3fccfab2-3e8b-4edc-adaf-3f320d9a5d20" /> - Attack discovery `MiniAttackChain` (currently hardcoded to a preconfigured connector, waiting for further work from @andrew-goldstein to hook up to actual alert related AD) <img width="597" alt="Screenshot 2025-04-11 at 12 15 36 PM" src="https://github.com/user-attachments/assets/d181f68d-5b77-4df4-a316-54e84d655a4c" /> - Conversations dropdown that show any conversations this alert is referenced <img width="601" alt="Screenshot 2025-04-11 at 12 18 03 PM" src="https://github.com/user-attachments/assets/71d533d3-99b4-49c4-b336-05152fd64ed4" /> - Suggested prompts that create a new conversation with the alert as context (_copy pending_) <img width="594" alt="Screenshot 2025-04-11 at 12 18 09 PM" src="https://github.com/user-attachments/assets/bca58f5a-f05c-4cdf-a466-0926c99e0ad6" /> - The connector used in the alert summary generation is selected in Stack Management > Advanced Settings > Security Solution > Default AI Connector (_copy pending_) <img width="1163" alt="Screenshot 2025-04-11 at 12 34 15 PM" src="https://github.com/user-attachments/assets/d2128497-22e4-4c14-b08c-991dc8287391" /> This PR adds 2 new prompts under a new `promptGroupId.aiForSoc`: - `promptDictionary.alertSummarySystemPrompt` - `promptDictionary.alertSummary` In order to access these prompts in the proper spots, the new find alert summary route returns the "user" prompt (`promptDictionary.alertSummary`). In order to get the system prompt in place, we pass a `promptIds` object to the `POST_ACTIONS_CONNECTOR_EXECUTE` which is appended to the main system prompt This needs to be ran in Serverless: - `yarn es serverless --projectType security` - `yarn serverless-security --no-base-path` You also need to enable the AI for SOC tier, by adding the following to your `serverless.security.dev.yml` file: ``` xpack.securitySolutionServerless.productTypes: [ { product_line: 'ai_soc', product_tier: 'search_ai_lake' }, ] ``` Use one of these Serverless users: - `platform_engineer` - `endpoint_operations_analyst` - `endpoint_policy_manager` - `admin` - `system_indices_superuser` Then: - generate data: `yarn test:generate:serverless-dev` - create 4 catch all rules, each with a name of a AI for SOC integration (`google_secops`, `microsoft_sentinel`,, `sentinel_one` and `crowdstrike`) => to do that you'll need to temporary comment the `serverless.security.dev.yaml` config changes as the rules page is not accessible in AI for SOC. - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73) to `installedPackages: availablePackages` to force having some packages installed - change [this line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63) to `r.name === p.name` to make sure there will be matches between integrations and rules With this alerts data, you should be able to test each section of the flyout _except_ the attack discovery widget, instructions for that are below. As I am waiting for updates from Andrew, currently the attack discovery widget looks up attack discoveries from a particular preconfigured connector. In order to test: 1. Add preconfigured connector to your `kibana.dev.yml`: https://p.elstc.co/paste/J2qmGMeQ#GKSPhlggX4F93aUSKJsKpsqtCcyTepCkfJOEVxlZyfB 2. Generate attack discovery with this connector 3. Open the new flyout, you will see the attack discovery widget These are all noted in the code 1. Attack discovery widget is hardcoded to the preconfigured connector id. The widget should instead look up discoveries by alert ID, pending work from @andrew-goldstein 2. Update copy for suggested prompts 3. Update copy for ai connector UI setting 4. Update AI connector UI setting to default to Elastic Managed LLM once it is fully available in serverless --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co> Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
Summary
Alert flyout for AI for the SOC.

The flyout sections include:
New header highlighting the integration source

AI generated alert summary generated by button (Generate or Regenerate). Stored in a new data stream (

.kibana-elastic-ai-assistant-alert-summary-*)Anonymization toggle for the alert summary is located in the flyout gear settings menu

Highlighted fields

Attack discovery

MiniAttackChain(currently hardcoded to a preconfigured connector, waiting for further work from @andrew-goldstein to hook up to actual alert related AD)Conversations dropdown that show any conversations this alert is referenced

Suggested prompts that create a new conversation with the alert as context (copy pending)

The connector used in the alert summary generation is selected in Stack Management > Advanced Settings > Security Solution > Default AI Connector (copy pending)

New prompts
This PR adds 2 new prompts under a new
promptGroupId.aiForSoc:-
promptDictionary.alertSummarySystemPrompt-
promptDictionary.alertSummaryIn order to access these prompts in the proper spots, the new find alert summary route returns the "user" prompt (
promptDictionary.alertSummary). In order to get the system prompt in place, we pass apromptIdsobject to thePOST_ACTIONS_CONNECTOR_EXECUTEwhich is appended to the main system promptTesting
This needs to be ran in Serverless:
yarn es serverless --projectType securityyarn serverless-security --no-base-pathYou also need to enable the AI for SOC tier, by adding the following to your
serverless.security.dev.ymlfile:Use one of these Serverless users:
platform_engineerendpoint_operations_analystendpoint_policy_manageradminsystem_indices_superuserThen:
yarn test:generate:serverless-devgoogle_secops,microsoft_sentinel,,sentinel_oneandcrowdstrike) => to do that you'll need to temporary comment theserverless.security.dev.yamlconfig changes as the rules page is not accessible in AI for SOC.installedPackages: availablePackagesto force having some packages installedr.name === p.nameto make sure there will be matches between integrations and rulesWith this alerts data, you should be able to test each section of the flyout except the attack discovery widget, instructions for that are below.
Attack discovery widget
As I am waiting for updates from Andrew, currently the attack discovery widget looks up attack discoveries from a particular preconfigured connector. In order to test:
kibana.dev.yml: https://p.elstc.co/paste/J2qmGMeQ#GKSPhlggX4F93aUSKJsKpsqtCcyTepCkfJOEVxlZyfBOutstanding TODOs
These are all noted in the code