Skip to content

[AI4DSOC] Alert summary table setup#216744

Merged
PhilippeOberti merged 3 commits intoelastic:mainfrom
PhilippeOberti:alerty-summary-table
Apr 10, 2025
Merged

[AI4DSOC] Alert summary table setup#216744
PhilippeOberti merged 3 commits intoelastic:mainfrom
PhilippeOberti:alerty-summary-table

Conversation

@PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Apr 2, 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

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 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 to installedPackages: availablePackages to force having some packages installed
  • change this line to r.name === p.name to make sure there will be matches between integrations and rules

Checklist

https://github.com/elastic/security-team/issues/11973

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team Team:Security Generative AI Security Generative AI v9.1.0 labels Apr 2, 2025
@PhilippeOberti PhilippeOberti force-pushed the alerty-summary-table branch 3 times, most recently from 4f0a065 to 62f5aaf Compare April 3, 2025 00:13
@PhilippeOberti PhilippeOberti marked this pull request as ready for review April 3, 2025 00:26
@PhilippeOberti PhilippeOberti requested review from a team as code owners April 3, 2025 00:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@PhilippeOberti PhilippeOberti requested a review from xcrzx April 3, 2025 00:26
@PhilippeOberti PhilippeOberti changed the title [AI4DSOC] Alert summary table setup [AI4DSOC] Alert summar table setup Apr 3, 2025
@PhilippeOberti PhilippeOberti force-pushed the alerty-summary-table branch 2 times, most recently from 2eccc27 to 130799d Compare April 3, 2025 04:38
@PhilippeOberti PhilippeOberti changed the title [AI4DSOC] Alert summar table setup [AI4DSOC] Alert summary table setup Apr 3, 2025
@PhilippeOberti PhilippeOberti marked this pull request as draft April 3, 2025 18:34
@PhilippeOberti PhilippeOberti force-pushed the alerty-summary-table branch 3 times, most recently from 0ab26d0 to eb763cb Compare April 4, 2025 02:31
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:

![Screenshot 2025-04-03 at 6 09
57 PM](https://github.com/user-attachments/assets/3e4135e7-6e2f-4b4f-94e5-0dd72f1710bb)
![Screenshot 2025-04-03 at 6 10
06 PM](https://github.com/user-attachments/assets/382391d6-7ae1-4da4-a76f-495b6db69db3)
![Screenshot 2025-04-03 at 6 10
13 PM](https://github.com/user-attachments/assets/28c5947b-2168-4080-b298-5fea1f3f97c7)
![Screenshot 2025-04-03 at 6 10
21 PM](https://github.com/user-attachments/assets/2dc75fcb-9929-4821-830d-b84fceaf232d)

### 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:

![Screenshot 2025-04-03 at 6 09
57 PM](https://github.com/user-attachments/assets/3e4135e7-6e2f-4b4f-94e5-0dd72f1710bb)
![Screenshot 2025-04-03 at 6 10
06 PM](https://github.com/user-attachments/assets/382391d6-7ae1-4da4-a76f-495b6db69db3)
![Screenshot 2025-04-03 at 6 10
13 PM](https://github.com/user-attachments/assets/28c5947b-2168-4080-b298-5fea1f3f97c7)
![Screenshot 2025-04-03 at 6 10
21 PM](https://github.com/user-attachments/assets/2dc75fcb-9929-4821-830d-b84fceaf232d)

### 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
Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to test the table loading and everything seemed to work well. Let's get the additional work unblocked 👍🏾

@PhilippeOberti PhilippeOberti enabled auto-merge (squash) April 9, 2025 21:02
@PhilippeOberti PhilippeOberti merged commit 579dbae into elastic:main Apr 10, 2025
9 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7192 7201 +9

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 8.9MB 8.9MB +9.4KB

History

@PhilippeOberti PhilippeOberti deleted the alerty-summary-table branch April 10, 2025 13:27
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:
![Screenshot 2025-04-10 at 9 38
59 AM](https://github.com/user-attachments/assets/4b83280e-8cdb-4a01-8bc5-0fda3f735645)

## 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
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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 3 01
01 PM](https://github.com/user-attachments/assets/047c7fd1-3da2-40fd-a0f4-792177454c00)
| ![Screenshot 2025-04-15 at 2 59
20 PM](https://github.com/user-attachments/assets/643510a7-5f12-4084-8101-4f027ea04099)
|

### 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 11 54
36 PM](https://github.com/user-attachments/assets/b6039081-d5b8-4bf7-ada1-af3844e17bad)
| ![Screenshot 2025-04-15 at 11 54
09 PM](https://github.com/user-attachments/assets/6833a89c-931e-4eb3-be93-4fc1e2ed96e2)
|

## 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 3 01
01 PM](https://github.com/user-attachments/assets/047c7fd1-3da2-40fd-a0f4-792177454c00)
| ![Screenshot 2025-04-15 at 2 59
20 PM](https://github.com/user-attachments/assets/643510a7-5f12-4084-8101-4f027ea04099)
|

### 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 11 54
36 PM](https://github.com/user-attachments/assets/b6039081-d5b8-4bf7-ada1-af3844e17bad)
| ![Screenshot 2025-04-15 at 11 54
09 PM](https://github.com/user-attachments/assets/6833a89c-931e-4eb3-be93-4fc1e2ed96e2)
|

## 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
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
![Screenshot 2025-04-28 at 11 28
27 AM](https://github.com/user-attachments/assets/2d99cf37-b648-466a-aa9e-97132b0a8c59)

But with this change, this is how the UI will look
![Screenshot 2025-04-28 at 10 54
22 AM](https://github.com/user-attachments/assets/7bb1f77d-0c83-4fae-9ce2-0a082ebb5ac1)

### 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 3 01
01 PM](https://github.com/user-attachments/assets/047c7fd1-3da2-40fd-a0f4-792177454c00)
| ![Screenshot 2025-04-15 at 2 59
20 PM](https://github.com/user-attachments/assets/643510a7-5f12-4084-8101-4f027ea04099)
|

### 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 11 54
36 PM](https://github.com/user-attachments/assets/b6039081-d5b8-4bf7-ada1-af3844e17bad)
| ![Screenshot 2025-04-15 at 11 54
09 PM](https://github.com/user-attachments/assets/6833a89c-931e-4eb3-be93-4fc1e2ed96e2)
|

## 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
![Screenshot 2025-04-28 at 11 28
27 AM](https://github.com/user-attachments/assets/2d99cf37-b648-466a-aa9e-97132b0a8c59)

But with this change, this is how the UI will look
![Screenshot 2025-04-28 at 10 54
22 AM](https://github.com/user-attachments/assets/7bb1f77d-0c83-4fae-9ce2-0a082ebb5ac1)

### 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:
![Screenshot 2025-04-10 at 9 38
59 AM](https://github.com/user-attachments/assets/4b83280e-8cdb-4a01-8bc5-0fda3f735645)

## 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 3 01
01 PM](https://github.com/user-attachments/assets/047c7fd1-3da2-40fd-a0f4-792177454c00)
| ![Screenshot 2025-04-15 at 2 59
20 PM](https://github.com/user-attachments/assets/643510a7-5f12-4084-8101-4f027ea04099)
|

### 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 |
| ------------- | ------------- |
| ![Screenshot 2025-04-15 at 11 54
36 PM](https://github.com/user-attachments/assets/b6039081-d5b8-4bf7-ada1-af3844e17bad)
| ![Screenshot 2025-04-15 at 11 54
09 PM](https://github.com/user-attachments/assets/6833a89c-931e-4eb3-be93-4fc1e2ed96e2)
|

## 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
![Screenshot 2025-04-28 at 11 28
27 AM](https://github.com/user-attachments/assets/2d99cf37-b648-466a-aa9e-97132b0a8c59)

But with this change, this is how the UI will look
![Screenshot 2025-04-28 at 10 54
22 AM](https://github.com/user-attachments/assets/7bb1f77d-0c83-4fae-9ce2-0a082ebb5ac1)

### 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:
![Screenshot 2025-04-10 at 9 38
59 AM](https://github.com/user-attachments/assets/4b83280e-8cdb-4a01-8bc5-0fda3f735645)

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants