Skip to content
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

[Security Solution] Fix Threat Match rules inability to upgrade #203366

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Dec 9, 2024

Resolves: #203365

Summary

This PR fixes a bug preventing Threat Match rules from being upgraded.

Details

It'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.

Screen recording (with the fix)

Screen.Recording.2024-12-09.at.08.40.53.mov

@maximpn maximpn added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area backport:version Backport to applied version labels v8.18.0 labels Dec 9, 2024
@maximpn maximpn self-assigned this Dec 9, 2024
@maximpn maximpn marked this pull request as ready for review December 9, 2024 07:42
@maximpn maximpn requested review from a team as code owners December 9, 2024 07:42
@maximpn maximpn requested a review from dplumlee December 9, 2024 07:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@maximpn maximpn requested review from jpdjere and removed request for dplumlee December 9, 2024 07:42
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6347 6346 -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 14.6MB 14.6MB -451.0B

History

cc @maximpn

Copy link
Contributor

@jpdjere jpdjere left a comment

Choose a reason for hiding this comment

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

Tested upgrading Threat Match rules and now working as expected, thanks @maximpn for the fix!

@maximpn maximpn merged commit b9addc2 into elastic:main Dec 10, 2024
9 checks passed
@maximpn maximpn deleted the fix-threat-match-rules-upgrade branch December 10, 2024 08:09
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12251915649

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 10, 2024
…tic#203366)

**Resolves:** elastic#203365

## Summary

This PR fixes a bug preventing Threat Match rules from being upgraded.

## Details

It'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`.

## Screen recording (with the fix)

https://github.com/user-attachments/assets/9f0375fb-d39d-4b4b-a084-96ea265f306f
(cherry picked from commit b9addc2)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 10, 2024
…#203366) (#203519)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Fix Threat Match rules inability to upgrade
(#203366)](#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
(#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
(#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
(#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]>
@banderror banderror linked an issue Dec 10, 2024 that may be closed by this pull request
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…tic#203366)

**Resolves:** elastic#203365

## Summary

This PR fixes a bug preventing Threat Match rules from being upgraded.

## Details

It'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`.

## Screen recording (with the fix)

https://github.com/user-attachments/assets/9f0375fb-d39d-4b4b-a084-96ea265f306f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] Unable to upgrade Threat Match prebuilt rules
4 participants