-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Solution] Prebuilt rule customization is lost on upgrade when Base version is missing #201500
Copy link
Copy link
Closed
Closed
[Security Solution] Prebuilt rule customization is lost on upgrade when Base version is missing#201500
Bug
Copy link
Labels
8.18 candidateFeature:Prebuilt Detection RulesSecurity Solution Prebuilt Detection Rules areaSecurity Solution Prebuilt Detection Rules areaTeam: SecuritySolutionSecurity Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Team:Detection Rule ManagementSecurity Detection Rule Management TeamSecurity Detection Rule Management TeamTeam:Detections and RespSecurity Detection Response TeamSecurity Detection Response TeambugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.Addressing this issue will have a high level of impact on the quality/strength of our product.v8.18.0
Metadata
Metadata
Assignees
Labels
8.18 candidateFeature:Prebuilt Detection RulesSecurity Solution Prebuilt Detection Rules areaSecurity Solution Prebuilt Detection Rules areaTeam: SecuritySolutionSecurity Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Team:Detection Rule ManagementSecurity Detection Rule Management TeamSecurity Detection Rule Management TeamTeam:Detections and RespSecurity Detection Response TeamSecurity Detection Response TeambugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.Addressing this issue will have a high level of impact on the quality/strength of our product.v8.18.0
Type
Fields
Give feedbackNo fields configured for Bug.
Epic: #174168
Should be fixed by: #187645
Related to: #200285
Summary
Note
The affected functionality is hidden behind the
prebuiltRulesCustomizationEnabledfeature 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
tagsfield):['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:
-ABandSOLVABLEconflictA) 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.