[Security Solution] [Attacks/Alerts] Flyout: Move attack transform functions#255442
Conversation
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
|
e40pud
left a comment
There was a problem hiding this comment.
Thanks for restructuring this! 🚀
nikitaindik
left a comment
There was a problem hiding this comment.
Thanks for the refactor! I read through the changes in "Detections and Response" owned files. It all looks good to me.
nkhristinin
left a comment
There was a problem hiding this comment.
DE changes code review LGTM
…nctions (elastic#255442) ## Summary This PR moves attack discovery transform utilities from the Security Solution / Elastic Assistant plugin into the shared package `@kbn/elastic-assistant-common`, so they can be reused across plugins (e.g. Security Solution, Elastic Assistant, Cases) and to keep API↔internal conversion logic in one place. **Changes:** - **Moved to `kbn-elastic-assistant-common`:** - **Alert transforms:** `transformAttackDiscoveryAlertFromApi`, `transformAttackDiscoveryAlertToApi` - **Schedule transforms:** `transformAttackDiscoveryScheduleFromApi`, `transformAttackDiscoveryScheduleToApi`, plus create/update props variants (`*ToApi` / `*FromApi`) and schedule actions props transforms - **Attack discovery helpers:** `getOriginalAlertIds`, `getTacticLabel`, `getTacticMetadata`, `replaceNewlineLiterals`, `transformInternalReplacements` (from attack discovery helpers) - **Updated consumers** in `elastic_assistant` and `security_solution` (and any other plugins that used these) to import from `@kbn/elastic-assistant-common` instead of local paths. - **Config/imports** adjusted so the common package builds and type-checks correctly and all references are consistent. No new UI or user-facing behavior; this is a refactor to centralize attack discovery transform and helper logic. --------- Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…nctions (elastic#255442) ## Summary This PR moves attack discovery transform utilities from the Security Solution / Elastic Assistant plugin into the shared package `@kbn/elastic-assistant-common`, so they can be reused across plugins (e.g. Security Solution, Elastic Assistant, Cases) and to keep API↔internal conversion logic in one place. **Changes:** - **Moved to `kbn-elastic-assistant-common`:** - **Alert transforms:** `transformAttackDiscoveryAlertFromApi`, `transformAttackDiscoveryAlertToApi` - **Schedule transforms:** `transformAttackDiscoveryScheduleFromApi`, `transformAttackDiscoveryScheduleToApi`, plus create/update props variants (`*ToApi` / `*FromApi`) and schedule actions props transforms - **Attack discovery helpers:** `getOriginalAlertIds`, `getTacticLabel`, `getTacticMetadata`, `replaceNewlineLiterals`, `transformInternalReplacements` (from attack discovery helpers) - **Updated consumers** in `elastic_assistant` and `security_solution` (and any other plugins that used these) to import from `@kbn/elastic-assistant-common` instead of local paths. - **Config/imports** adjusted so the common package builds and type-checks correctly and all references are consistent. No new UI or user-facing behavior; this is a refactor to centralize attack discovery transform and helper logic. --------- Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR moves attack discovery transform utilities from the Security Solution / Elastic Assistant plugin into the shared package
@kbn/elastic-assistant-common, so they can be reused across plugins (e.g. Security Solution, Elastic Assistant, Cases) and to keep API↔internal conversion logic in one place.Changes:
kbn-elastic-assistant-common:transformAttackDiscoveryAlertFromApi,transformAttackDiscoveryAlertToApitransformAttackDiscoveryScheduleFromApi,transformAttackDiscoveryScheduleToApi, plus create/update props variants (*ToApi/*FromApi) and schedule actions props transformsgetOriginalAlertIds,getTacticLabel,getTacticMetadata,replaceNewlineLiterals,transformInternalReplacements(from attack discovery helpers)elastic_assistantandsecurity_solution(and any other plugins that used these) to import from@kbn/elastic-assistant-commoninstead of local paths.No new UI or user-facing behavior; this is a refactor to centralize attack discovery transform and helper logic.