[Security Solution] Reverting customization on prebuilt rule with missing base version after update does not reset is_customized status for fields covered by the scalar diff array #213621
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Prebuilt Detection Rules
Security Solution Prebuilt Detection Rules area
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.
triage_needed
Description:
When a prebuilt rule with a missing base version is customized and then updated, reverting the customization incorrectly leaves the rule marked as customized instead of resetting is_customized to false.
Same can be observed when order of steps is inverted: Customize -> Revert changes -> Update the rule
The modified field is one of the fields covered by the scalar diff array (e.g., tags, references, new_terms_fields, threat_index).
Once the rule is updated, it will have a base version again, as we always store the most recent version of a rule in the package. This means that after the update, the rule should behave like any other rule with a base version and should follow the standard logic where reverting the customization resets
is_customized=false
.Evidence 1
Modifying References field:
Screen.Recording.2025-03-07.at.10.41.52.AM.mov
Evidence 2
Tags field:
Screen.Recording.2025-03-07.at.10.36.30.AM.mov
Inverted steps
Screen.Recording.2025-03-07.at.1.59.35.PM.mov
Kibana/Elasticsearch Stack version:
VERSION: 9.1.0
BUILD: 84372
COMMIT: 636c06b
Functional Area (e.g. Endpoint management, timelines, resolver, etc.):
Prebuilt Rules Update
** Pre requisites:**
prebuiltRulesCustomizationEnabled
flag is enabledSteps to reproduce:
Scenario 1:
is_customized=true
after the upgrade (expected behavior).Scenario 2:
is_customized=true
after the changes are reverted (expected behavior).Current behavior:
After reverting changes and updating the rule (or updating the rule then reverting changes), the rule remains marked as customized (is_customized=true) even though no actual modifications exist and we've stored the most recent version.
Expected behavior:
If a rule customization is reverted, the rule should no longer be marked as customized, and is_customized should be set to false.
Once the rule is updated, it will have a base version again, as we always store the most recent version of a rule in the package. This means that after the update, the rule should behave like any other rule with a base version and should follow the standard logic where reverting the customization resets
is_customized=false
.The text was updated successfully, but these errors were encountered: