Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution] Fix Threat Match rules inability to upgrade (…
…elastic#203366) (elastic#203519) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Fix Threat Match rules inability to upgrade (elastic#203366)](elastic#203366) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-10T08:09:31Z","message":"[Security Solution] Fix Threat Match rules inability to upgrade (elastic#203366)\n\n**Resolves:** https://github.com/elastic/kibana/issues/203365\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug preventing Threat Match rules from being upgraded.\r\n\r\n## Details\r\n\r\nIt's expected that users can upgrade Elastic prebuilt rules without any customizations in any possible way (in flyout, rules upgrade table, bulk actions). This operation was blocked due to wrong Threat Match fields conversions to Diffable rule. This PR fixes rule type specific fiels conversions and merged `threat_query` field with `threat_query`.\r\n\r\n## Screen recording (with the fix)\r\n\r\nhttps://github.com/user-attachments/assets/9f0375fb-d39d-4b4b-a084-96ea265f306f","sha":"b9addc2f23d676ae2bcb8c979dece80fb0a88554","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","impact:high","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0"],"title":"[Security Solution] Fix Threat Match rules inability to upgrade","number":203366,"url":"https://github.com/elastic/kibana/pull/203366","mergeCommit":{"message":"[Security Solution] Fix Threat Match rules inability to upgrade (elastic#203366)\n\n**Resolves:** https://github.com/elastic/kibana/issues/203365\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug preventing Threat Match rules from being upgraded.\r\n\r\n## Details\r\n\r\nIt's expected that users can upgrade Elastic prebuilt rules without any customizations in any possible way (in flyout, rules upgrade table, bulk actions). This operation was blocked due to wrong Threat Match fields conversions to Diffable rule. This PR fixes rule type specific fiels conversions and merged `threat_query` field with `threat_query`.\r\n\r\n## Screen recording (with the fix)\r\n\r\nhttps://github.com/user-attachments/assets/9f0375fb-d39d-4b4b-a084-96ea265f306f","sha":"b9addc2f23d676ae2bcb8c979dece80fb0a88554"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203366","number":203366,"mergeCommit":{"message":"[Security Solution] Fix Threat Match rules inability to upgrade (elastic#203366)\n\n**Resolves:** https://github.com/elastic/kibana/issues/203365\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug preventing Threat Match rules from being upgraded.\r\n\r\n## Details\r\n\r\nIt's expected that users can upgrade Elastic prebuilt rules without any customizations in any possible way (in flyout, rules upgrade table, bulk actions). This operation was blocked due to wrong Threat Match fields conversions to Diffable rule. This PR fixes rule type specific fiels conversions and merged `threat_query` field with `threat_query`.\r\n\r\n## Screen recording (with the fix)\r\n\r\nhttps://github.com/user-attachments/assets/9f0375fb-d39d-4b4b-a084-96ea265f306f","sha":"b9addc2f23d676ae2bcb8c979dece80fb0a88554"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <[email protected]>
- Loading branch information