[Security Solution] Prebuilt rule customization is lost on upgrade when Base version is missing #201500
Labels
8.18 candidate
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.
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
Epic: #174168
Should be fixed by: #187645
Related to: #200285
Summary
Note
The affected functionality is hidden behind the
prebuiltRulesCustomizationEnabled
feature flag.Currently, when you customize a prebuilt rule which has an "update" (can be upgraded to a new version), and the customized field in the Target version is unchanged compared to the Base one, on upgrade the diff algorithm picks the Target version as the Final one, which effectively resets the user customization.
Steps to reproduce (example for the
tags
field):['foo', 'bar']
.[]
.['foo', 'bar']
.Expected result:
The diff algorithm should keep the user customization and pick the Current version as the Final one:
[]
.Actual result:
The diff algorithm picks the Target version as the Final one:
['foo', 'bar']
. Which is incorrect by itself (the user loses their customization, although it's possible to restore it manually in the Upgrade flyout) and also generates a confusing diff that is shown by default between the Current and the Final versions.Screenshots
Example video:
Screen.Recording.2024-11-14.at.3.57.45.PM.mov
Reason
Currently, this bug exists because the Base version doesn't exist in most cases. Without the Base version, the diff algorithm:
-AB
andSOLVABLE
conflictA
) or the Target version (B
) as the Final oneThe reason for the missing Base version is: our Fleet package with prebuilt rules currently doesn't ship all historical versions of prebuilt rules. We're working with the TRADE team on fixing this (#187645, elastic/detection-rules#4150 (comment)) and this is a release blocker.
The text was updated successfully, but these errors were encountered: