Skip to content

Move callouts to detection engine and common#233850

Merged
PhilippeOberti merged 7 commits intoelastic:mainfrom
PhilippeOberti:move-callouts-to-detection-engine
Sep 8, 2025
Merged

Move callouts to detection engine and common#233850
PhilippeOberti merged 7 commits intoelastic:mainfrom
PhilippeOberti:move-callouts-to-detection-engine

Conversation

@PhilippeOberti
Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti commented Sep 3, 2025

Summary

This PR is a follow up of the big alerts page refactor one.

Please let me know if some of the changes do not make sense! 😄

Context

@maximpn had rightfully pointed out that some files should be moved into different folder and the CODEOWNERS file should be updated accordingly. I originally had done the change in the previous PR, but this increased the scope and added new codeowners that needed to approve, at a time where the PR was ready to be merged.

Changes

This PR only moves files around and updated the related imports. No other code changes are introduced, and therefore no UI or logic is changed.

Edit: some files were originally moved to the detection_engine folder, but I was rightfully pointed out that some should belong to the common folder. When doing the move, I realized we had other similar components. I merged the folders together and added missing unit tests to the other files.

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team backport:version Backport to applied version labels v9.2.0 labels Sep 3, 2025
@PhilippeOberti PhilippeOberti force-pushed the move-callouts-to-detection-engine branch from 1d13734 to 4ba712d Compare September 3, 2025 13:32
@PhilippeOberti PhilippeOberti force-pushed the move-callouts-to-detection-engine branch 3 times, most recently from 02a1e08 to 6f42226 Compare September 4, 2025 09:30
@PhilippeOberti PhilippeOberti marked this pull request as ready for review September 4, 2025 11:46
@PhilippeOberti PhilippeOberti requested review from a team as code owners September 4, 2025 11:46
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@PhilippeOberti
Copy link
Copy Markdown
Contributor Author

Files by Code Owner

elastic/security-detection-engine

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_rule.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/logic/use_close_alerts.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/utils/get_es_query_filter.ts
  • x-pack/solutions/security/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx

elastic/security-detection-rule-management

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/common/transforms.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_rule_mutation.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_fetch_rule_by_id_query.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/comma_separated_values.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/missing_privileges_callout.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/missing_privileges_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/need_admin_for_update_rules_callout.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/need_admin_for_update_rules_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/translations.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/kql_query/kql_query_edit.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/logic/use_rule_with_fallback.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.test.ts
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.tsx

elastic/security-entity-analytics

  • x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/missing_privileges_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/translations.tsx

elastic/security-solution

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/common/transforms.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_rule.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/logic/use_close_alerts.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/utils/get_es_query_filter.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_rule_mutation.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_fetch_rule_by_id_query.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/comma_separated_values.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/missing_privileges_callout.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/missing_privileges_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/need_admin_for_update_rules_callout.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/need_admin_for_update_rules_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/callouts/translations.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/kql_query/kql_query_edit.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/logic/use_rule_with_fallback.ts
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.test.ts
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/pages/alerts/alerts.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/pages/alerts/alerts.tsx
  • x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/missing_privileges_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/translations.tsx
  • x-pack/solutions/security/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/missing_privileges_callout.tsx
  • x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/index.tsx

elastic/security-threat-hunting

  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx
  • x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/pages/missing_privileges_callout.tsx

elastic/security-threat-hunting-investigations

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_missing_privileges.ts
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.test.ts
  • x-pack/solutions/security/plugins/security_solution/public/detections/hooks/use_rule_from_timeline.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/pages/alerts/alerts.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/detections/pages/alerts/alerts.tsx
  • x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx
  • x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/index.tsx

Copy link
Copy Markdown
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

Entity Analytics code LGTM!

Copy link
Copy Markdown
Contributor

@jkelas jkelas left a comment

Choose a reason for hiding this comment

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

@PhilippeOberti this LGTM, but I left 2 comments / questions. Please take a look.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The exported functions from this file are only used for detection_rules. I think that in that case this file should rather reside in detection_engine/rule_management. Would you agree?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was not sure, but yes that makes sense. Will make the changes in a few minutes :)

Copy link
Copy Markdown
Contributor Author

@PhilippeOberti PhilippeOberti Sep 8, 2025

Choose a reason for hiding this comment

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

Done in 1db8c71

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am sorry @PhilippeOberti but I think I overlooked something and mislead you with my previous comment. I can see that the 'transforms' is also used in rule_creation_ui. Which means that the previous place, the common folder, was correct. I apologize for the confusion.

Copy link
Copy Markdown
Contributor Author

@PhilippeOberti PhilippeOberti Sep 8, 2025

Choose a reason for hiding this comment

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

All good, I was suspecting but thought there was a good reason for moving it up... 😆
Reverted in 408b60e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this file should rather be placed in 'common' as this is used not only for rules, but also for alerts and exceptions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup, I'll take another look in a few minutes, thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 1db8c71.
Sorry it took a bit longer than expect... I noticed that there was another missing_privileges folder under public/common but not under public/common/components. I reached out to who created created it and it was a mistake. The 2 folders are now merged, I added some description to the components and the missing unit tests :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jkelas let me know what you think!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like a great improvement @PhilippeOberti .
However I noticed that you also moved the use_missing_privileges to the common/components/missing_priviledges. I think this hook had its place inside a folder named hooks, and it should remain so, thus it should be in common/hooks. Would you agree?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought about it but didn't like it that much. I'm not opposed to it though, so I will make the change in an hour or so!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jkelas done (see 65ff6a4) hopefully I got it right this time 😆

Copy link
Copy Markdown
Contributor

@vitaliidm vitaliidm left a comment

Choose a reason for hiding this comment

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

detection engine area LGTM

@PhilippeOberti PhilippeOberti force-pushed the move-callouts-to-detection-engine branch 3 times, most recently from 01ac00b to 1db8c71 Compare September 8, 2025 11:37
Copy link
Copy Markdown
Contributor

@jkelas jkelas left a comment

Choose a reason for hiding this comment

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

LGTM. My comments were addressed, I am approving

@PhilippeOberti PhilippeOberti changed the title Move callouts to detection engine Move callouts to detection engine and common Sep 8, 2025
@PhilippeOberti PhilippeOberti enabled auto-merge (squash) September 8, 2025 15:19
@PhilippeOberti PhilippeOberti force-pushed the move-callouts-to-detection-engine branch from 65ff6a4 to a81b716 Compare September 8, 2025 15:40
@PhilippeOberti PhilippeOberti merged commit 97193ba into elastic:main Sep 8, 2025
12 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7934 7935 +1

Async chunks

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

id before after diff
securitySolution 10.3MB 10.3MB +817.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 96.9KB 96.9KB +1.0B

History

@PhilippeOberti PhilippeOberti deleted the move-callouts-to-detection-engine branch September 8, 2025 18:49
eleonoramicozzi pushed a commit to eleonoramicozzi/kibana that referenced this pull request Sep 10, 2025
## Summary

This PR is a follow up of the big [alerts page refactor
one](elastic#222457).

Please let me know if some of the changes do not make sense! 😄 

### Context

@maximpn had rightfully [pointed
out](elastic#222457 (comment))
that some files should be moved into different folder and the CODEOWNERS
file should be updated accordingly. I originally had done the change in
the previous PR, but this increased the scope and added new codeowners
that needed to approve, at a time where the PR was ready to be merged.

### Changes

This PR only moves files around and updated the related imports. No
other code changes are introduced, and therefore no UI or logic is
changed.

_Edit: some files were originally moved to the `detection_engine`
folder, but I was rightfully pointed out that some should belong to the
`common` folder. When doing the move, I realized we had other similar
components. I merged the folders together and added missing unit tests
to the other files._

### 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>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 10, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 233850 locally
cc: @PhilippeOberti

@PhilippeOberti PhilippeOberti added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Sep 10, 2025
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Sep 15, 2025
## Summary

This PR is a follow up of the big [alerts page refactor
one](elastic#222457).

Please let me know if some of the changes do not make sense! 😄 

### Context

@maximpn had rightfully [pointed
out](elastic#222457 (comment))
that some files should be moved into different folder and the CODEOWNERS
file should be updated accordingly. I originally had done the change in
the previous PR, but this increased the scope and added new codeowners
that needed to approve, at a time where the PR was ready to be merged.

### Changes

This PR only moves files around and updated the related imports. No
other code changes are introduced, and therefore no UI or logic is
changed.

_Edit: some files were originally moved to the `detection_engine`
folder, but I was rightfully pointed out that some should belong to the
`common` folder. When doing the move, I realized we had other similar
components. I merged the folders together and added missing unit tests
to the other files._

### 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>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
## Summary

This PR is a follow up of the big [alerts page refactor
one](elastic#222457).

Please let me know if some of the changes do not make sense! 😄 

### Context

@maximpn had rightfully [pointed
out](elastic#222457 (comment))
that some files should be moved into different folder and the CODEOWNERS
file should be updated accordingly. I originally had done the change in
the previous PR, but this increased the scope and added new codeowners
that needed to approve, at a time where the PR was ready to be merged.

### Changes

This PR only moves files around and updated the related imports. No
other code changes are introduced, and therefore no UI or logic is
changed.

_Edit: some files were originally moved to the `detection_engine`
folder, but I was rightfully pointed out that some should belong to the
`common` folder. When doing the move, I realized we had other similar
components. I merged the folders together and added missing unit tests
to the other files._

### 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>
niros1 pushed a commit that referenced this pull request Sep 30, 2025
## Summary

This PR is a follow up of the big [alerts page refactor
one](#222457).

Please let me know if some of the changes do not make sense! 😄 

### Context

@maximpn had rightfully [pointed
out](#222457 (comment))
that some files should be moved into different folder and the CODEOWNERS
file should be updated accordingly. I originally had done the change in
the previous PR, but this increased the scope and added new codeowners
that needed to approve, at a time where the PR was ready to be merged.

### Changes

This PR only moves files around and updated the related imports. No
other code changes are introduced, and therefore no UI or logic is
changed.

_Edit: some files were originally moved to the `detection_engine`
folder, but I was rightfully pointed out that some should belong to the
`common` folder. When doing the move, I realized we had other similar
components. I merged the folders together and added missing unit tests
to the other files._

### 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>
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:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants