[AI4DSOC] Alert summary table setup#216744
Merged
PhilippeOberti merged 3 commits intoelastic:mainfrom Apr 10, 2025
Merged
Conversation
4f0a065 to
62f5aaf
Compare
Contributor
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
2eccc27 to
130799d
Compare
5368991 to
9b4cf93
Compare
2 tasks
0ab26d0 to
eb763cb
Compare
PhilippeOberti
added a commit
that referenced
this pull request
Apr 4, 2025
…y unit tests (#217100) ## Summary This code change was originally part of [a bigger PR](#216744) related to the AI for SOC effort. I decided to split the work for 2 reasons: - less files to review, less teams impacted - this current PR will easily be backported to `8.x` while the AI for SOC is only targeting `9.1` This PR makes only a few small changes: - remove unused types - export a few components/functions outside of the `alerts_table` folder to make them reusable within the new AI for SOC alert summary page (see PR linked above) - add a lot of unit tests to everything, especially the now exported components/functions #### UI remains unchanged:     ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Will unblock elastic/security-team#11973
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
Apr 4, 2025
…y unit tests (elastic#217100) ## Summary This code change was originally part of [a bigger PR](elastic#216744) related to the AI for SOC effort. I decided to split the work for 2 reasons: - less files to review, less teams impacted - this current PR will easily be backported to `8.x` while the AI for SOC is only targeting `9.1` This PR makes only a few small changes: - remove unused types - export a few components/functions outside of the `alerts_table` folder to make them reusable within the new AI for SOC alert summary page (see PR linked above) - add a lot of unit tests to everything, especially the now exported components/functions #### UI remains unchanged:     ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Will unblock elastic/security-team#11973 (cherry picked from commit 837059b) # Conflicts: # src/platform/packages/shared/kbn-grouping/src/containers/query/index.test.ts # src/platform/packages/shared/kbn-grouping/src/mocks.ts
michaelolo24
approved these changes
Apr 9, 2025
Contributor
michaelolo24
left a comment
There was a problem hiding this comment.
Was able to test the table loading and everything seemed to work well. Let's get the additional work unblocked 👍🏾
ffcc5c2 to
c4cb1b7
Compare
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
PhilippeOberti
added a commit
that referenced
this pull request
Apr 10, 2025
## Summary This PR is a follow up of [this previous one](#216744) which was adding the foundation for the alerts table on the AI for SOC alert summary page. It focuses on adding the necessary boilerplate code for the alert summary flyout implementation: - add the row action cell component that displays the open flyout icon as well as the logic to open the flyout - add the boilerplate files for the new `ai_for_soc` panel - make necessary changes to a few components within the `document_details` folder that will be used in both flyouts - implement the header for the flyout - make sure the flyout history works with this new panel https://github.com/user-attachments/assets/738268f5-795f-40c4-90d5-6b14f7d4de36 The alerts page alert details flyout remains unchanged, except for the severity value at the very top, which is now displayed as an `EuiBadge` instead of an `EuiHealth`. This guarantees consistency with the design of the new AI for SOC flyout:  ## Notes Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip [here](#217124)). Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev ## How to test 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.yaml` 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
This was referenced Apr 15, 2025
PhilippeOberti
added a commit
that referenced
this pull request
Apr 17, 2025
## Summary This PR builds up on the previous [table setup PR](#216744) and add custom cell renderers for the alert summary table: - we show the package's icon for the Integration column (pointing to the `kibana.alert.rule.parameters` field) - we show an EuiBadge for the severity column (pointing to the `kibana.alert.severity` field) All the other fields remain unchanged. | Before | After | | ------------- | ------------- | |  |  | ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
PhilippeOberti
added a commit
that referenced
this pull request
Apr 18, 2025
## Summary This PR builds up on the previous #216744 and the AI assistant in 2 places in the AI for SOC alert summary page: - in each row of the alert table as a row action - in the footer of the alert details flyout https://github.com/user-attachments/assets/65fb10f1-c22b-4796-9109-3b7dbdba6313 To keep consistency between the alert summary and the alerts page, this PR also removes the Chat icon button in the header of the alert details flyout and adds a `Ask AI Assistant` button in the footer. | Before | After | | ------------- | ------------- | |  |  | ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
davismcphee
pushed a commit
to davismcphee/kibana
that referenced
this pull request
Apr 22, 2025
## Summary This PR builds up on the previous [table setup PR](elastic#216744) and add custom cell renderers for the alert summary table: - we show the package's icon for the Integration column (pointing to the `kibana.alert.rule.parameters` field) - we show an EuiBadge for the severity column (pointing to the `kibana.alert.severity` field) All the other fields remain unchanged. | Before | After | | ------------- | ------------- | |  |  | ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
davismcphee
pushed a commit
to davismcphee/kibana
that referenced
this pull request
Apr 22, 2025
## Summary This PR builds up on the previous elastic#216744 and the AI assistant in 2 places in the AI for SOC alert summary page: - in each row of the alert table as a row action - in the footer of the alert details flyout https://github.com/user-attachments/assets/65fb10f1-c22b-4796-9109-3b7dbdba6313 To keep consistency between the alert summary and the alerts page, this PR also removes the Chat icon button in the header of the alert details flyout and adds a `Ask AI Assistant` button in the footer. | Before | After | | ------------- | ------------- | |  |  | ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
1 task
PhilippeOberti
added a commit
that referenced
this pull request
Apr 28, 2025
…egrations (#219430) ## Summary This PR makes a small changes to the logic originally introduced in [this PR](#216744). Previously we were expecting the rule to have its name being identical to the name of the integration it would be installed along with. This was a bad assumption. Instead we should look at the `related_integrations` field of the rule and check that it has the package (integration) name that we expect. This is a more robust solution, and this logic is actually already being use in [this other hook](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L75), so it seems that it was an oversight on my end... If the rule name is not identical, the UI falls back to rendering the id of the rule  But with this change, this is how the UI will look  ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Relates to elastic/security-team#11973
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
## Summary This PR builds up on the previous [table setup PR](elastic#216744) and add custom cell renderers for the alert summary table: - we show the package's icon for the Integration column (pointing to the `kibana.alert.rule.parameters` field) - we show an EuiBadge for the severity column (pointing to the `kibana.alert.severity` field) All the other fields remain unchanged. | Before | After | | ------------- | ------------- | |  |  | ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
## Summary This PR builds up on the previous elastic#216744 and the AI assistant in 2 places in the AI for SOC alert summary page: - in each row of the alert table as a row action - in the footer of the alert details flyout https://github.com/user-attachments/assets/65fb10f1-c22b-4796-9109-3b7dbdba6313 To keep consistency between the alert summary and the alerts page, this PR also removes the Chat icon button in the header of the alert details flyout and adds a `Ask AI Assistant` button in the footer. | Before | After | | ------------- | ------------- | |  |  | ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
…egrations (elastic#219430) ## Summary This PR makes a small changes to the logic originally introduced in [this PR](elastic#216744). Previously we were expecting the rule to have its name being identical to the name of the integration it would be installed along with. This was a bad assumption. Instead we should look at the `related_integrations` field of the rule and check that it has the package (integration) name that we expect. This is a more robust solution, and this logic is actually already being use in [this other hook](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L75), so it seems that it was an oversight on my end... If the rule name is not identical, the UI falls back to rendering the id of the rule  But with this change, this is how the UI will look  ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Relates to elastic/security-team#11973
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR adds the foundation for the table in the AI for SOC alerts summary page. These changes implement a new usage of the GroupedAlertTable component. These are the functionalities implemented in this PR: - default 3 options when opening the `Group alerts by` dropdown: - Integration: grouping by `signal.rule.id` field - Severity: grouping by `kibana.alert.severity` - Rule name: grouping by `kibana.alert.rule.name` - we have custom group title renderer: - for the group by Integration, we render the icon and the name of the integration if found, or we fallback to the `signal.rule.id` value - for the others we use the same code as the default GroupedAlertTable - we have custom group statistics: - for Integration we show severities, rules and alerts - for Severity we show integrations, rules and alerts - for Rules we show integrations, severities and alerts - for everything else we show integrations, severities, rules and alerts #### Here a video showing default grouping on the alert summary page https://github.com/user-attachments/assets/43694969-8b43-4451-8f51-00622178ddf5 #### And another one showing custom fields and page refresh https://github.com/user-attachments/assets/7b8d1047-4704-4149-a481-19721a381154 ## Notes Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip [here](elastic#217124)). Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit 579dbae)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR is a follow up of [this previous one](elastic#216744) which was adding the foundation for the alerts table on the AI for SOC alert summary page. It focuses on adding the necessary boilerplate code for the alert summary flyout implementation: - add the row action cell component that displays the open flyout icon as well as the logic to open the flyout - add the boilerplate files for the new `ai_for_soc` panel - make necessary changes to a few components within the `document_details` folder that will be used in both flyouts - implement the header for the flyout - make sure the flyout history works with this new panel https://github.com/user-attachments/assets/738268f5-795f-40c4-90d5-6b14f7d4de36 The alerts page alert details flyout remains unchanged, except for the severity value at the very top, which is now displayed as an `EuiBadge` instead of an `EuiHealth`. This guarantees consistency with the design of the new AI for SOC flyout:  ## Notes Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip [here](elastic#217124)). Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev ## How to test 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.yaml` 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit 5080c5f)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR builds up on the previous [table setup PR](elastic#216744) and add custom cell renderers for the alert summary table: - we show the package's icon for the Integration column (pointing to the `kibana.alert.rule.parameters` field) - we show an EuiBadge for the severity column (pointing to the `kibana.alert.severity` field) All the other fields remain unchanged. | Before | After | | ------------- | ------------- | |  |  | ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit 7160b36)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR builds up on the previous elastic#216744 and the AI assistant in 2 places in the AI for SOC alert summary page: - in each row of the alert table as a row action - in the footer of the alert details flyout https://github.com/user-attachments/assets/65fb10f1-c22b-4796-9109-3b7dbdba6313 To keep consistency between the alert summary and the alerts page, this PR also removes the Chat icon button in the header of the alert details flyout and adds a `Ask AI Assistant` button in the footer. | Before | After | | ------------- | ------------- | |  |  | ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit add6e30)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
…egrations (elastic#219430) ## Summary This PR makes a small changes to the logic originally introduced in [this PR](elastic#216744). Previously we were expecting the rule to have its name being identical to the name of the integration it would be installed along with. This was a bad assumption. Instead we should look at the `related_integrations` field of the rule and check that it has the package (integration) name that we expect. This is a more robust solution, and this logic is actually already being use in [this other hook](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L75), so it seems that it was an oversight on my end... If the rule name is not identical, the UI falls back to rendering the id of the rule  But with this change, this is how the UI will look  ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Relates to elastic/security-team#11973 (cherry picked from commit 07be70d)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR adds the foundation for the table in the AI for SOC alerts summary page. These changes implement a new usage of the GroupedAlertTable component. These are the functionalities implemented in this PR: - default 3 options when opening the `Group alerts by` dropdown: - Integration: grouping by `signal.rule.id` field - Severity: grouping by `kibana.alert.severity` - Rule name: grouping by `kibana.alert.rule.name` - we have custom group title renderer: - for the group by Integration, we render the icon and the name of the integration if found, or we fallback to the `signal.rule.id` value - for the others we use the same code as the default GroupedAlertTable - we have custom group statistics: - for Integration we show severities, rules and alerts - for Severity we show integrations, rules and alerts - for Rules we show integrations, severities and alerts - for everything else we show integrations, severities, rules and alerts #### Here a video showing default grouping on the alert summary page https://github.com/user-attachments/assets/43694969-8b43-4451-8f51-00622178ddf5 #### And another one showing custom fields and page refresh https://github.com/user-attachments/assets/7b8d1047-4704-4149-a481-19721a381154 ## Notes Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip [here](elastic#217124)). Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev ## How to test 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.yaml` 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`) - 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit 579dbae)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
## Summary This PR is a follow up of [this previous one](elastic#216744) which was adding the foundation for the alerts table on the AI for SOC alert summary page. It focuses on adding the necessary boilerplate code for the alert summary flyout implementation: - add the row action cell component that displays the open flyout icon as well as the logic to open the flyout - add the boilerplate files for the new `ai_for_soc` panel - make necessary changes to a few components within the `document_details` folder that will be used in both flyouts - implement the header for the flyout - make sure the flyout history works with this new panel https://github.com/user-attachments/assets/738268f5-795f-40c4-90d5-6b14f7d4de36 The alerts page alert details flyout remains unchanged, except for the severity value at the very top, which is now displayed as an `EuiBadge` instead of an `EuiHealth`. This guarantees consistency with the design of the new AI for SOC flyout:  ## Notes Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip [here](elastic#217124)). Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev ## How to test 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.yaml` 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 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios elastic/security-team#11973 (cherry picked from commit 5080c5f) # Conflicts: # x-pack/solutions/security/plugins/security_solution/public/flyout/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the foundation for the table in the AI for SOC alerts summary page.
These changes implement a new usage of the GroupedAlertTable component. These are the functionalities implemented in this PR:
Group alerts bydropdown:signal.rule.idfieldkibana.alert.severitykibana.alert.rule.namesignal.rule.idvalueHere a video showing default grouping on the alert summary page
alert-summary-grouping.mov
And another one showing custom fields and page refresh
alert-summary-custom-field-refresh.mov
Notes
Follow PRs will tackle custom column titles, cell renderers, row actions... for the table (wip here).
Mocks for reference: https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev
How to test
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.yamlfile:Use one of these Serverless users:
platform_engineerendpoint_operations_analystendpoint_policy_manageradminsystem_indices_superuserThen:
yarn test:generate:serverless-devgoogle_secops,microsoft_sentinel,,sentinel_oneandcrowdstrike)installedPackages: availablePackagesto force having some packages installedr.name === p.nameto make sure there will be matches between integrations and rulesChecklist
https://github.com/elastic/security-team/issues/11973