- Notifications
You must be signed in to change notification settings - Fork 8.5k
[Cases] Enable auto-extract observables in alerts table #235433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cases] Enable auto-extract observables in alerts table #235433
Conversation
e50319f to ced2f44 Compare 2217a04 to 760557f Compare 6bc1dfb to 0a8b410 Compare ab6391b to 2f88eea Compare | Pinging @elastic/kibana-cases (Team:Cases) |
PhilippeOberti left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review only for the files impacting the @elastic/security-threat-hunting-investigations team.
This code really motivates me to cleanup those ecsData and all objects. We're manipulating these so many times over and over again, we need to find a more performant approach. I know it's a huge effort and will impact so many places within Security Solution...
One day! 😆
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
| ): TimelineItem[] => { | ||
| return Array.from(rowSelection.keys()).map((rowIndex: number) => { | ||
| const alert = alerts[rowIndex]; | ||
| const data = Object.entries(alert).map(([key, value]) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: how about adding the fallback values for the well known fields here instead of iterating on the fields array each time?
| const data = Object.entries(alert).map(([key, value]) => ({ | |
| const data = Object.entries({ | |
| [ALERT_CASE_IDS]: [], | |
| [ALERT_WORKFLOW_TAGS]: [], | |
| [ALERT_WORKFLOW_ASSIGNEE_IDS]: [], | |
| ...alert, | |
| }).map(([key, value]) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, missed this comment before I merged. Made a tiny pr to fix here: #237307
umbopepato left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RO code changes LGTM! Thanks for changing the alert format locally 🙏 🚀
2f88eea to a0825e1 Compare ## Summary Fix based on feedback [here](#235433 (comment))
| Pinging @elastic/security-solution (Team: SecuritySolution) |
## Summary Dependency: elastic#233027 to be merged first. This PR enables auto-extract toggle in alerts table when user adds alerts to a case. This applies to row actions and bulk actions. To enable the feature in security update the [case configuration](https://github.com/elastic/kibana/blob/50299491246af6cc8055a1ff8a975ce82b114495/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_table/index.tsx#L143) to `extractObservables: true,` <img width="1490" height="730" alt="image" src="https://github.com/user-attachments/assets/1c31cfee-a086-490b-b2d8-69306eb3ae4c" /> ### 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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…37307) ## Summary Fix based on feedback [here](elastic#235433 (comment))
Summary
Dependency: #233027 to be merged first.
This PR enables auto-extract toggle in alerts table when user adds alerts to a case. This applies to row actions and bulk actions.
To enable the feature in security update the case configuration to
extractObservables: true,Checklist
release_note:*label is applied per the guidelinesbackport:*labels.