Open maximpn opened 6 hours ago
Pinging @elastic/security-detections-response (Team:Detections and Resp)
Pinging @elastic/security-solution (Team: SecuritySolution)
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)
✅ unchanged
cc @maximpn
Resolves: https://github.com/elastic/kibana/issues/200904
Summary
This PR unlocks Prebuilt Rules Customization workflow for rules with missing base version.
Details
Each Prebuilt Rule update contains
version
diff.version
is a special non-customizable field we use to track prebuilt rule version. It always gets target rule version's value after rule upgrade.A generic
numberDiffAlgorithm
algorithm was used forversion
field. It produces aSOLVABLE
conflict when rule's base version is missing. It blocked the workflow in UI. We check the number of field with conflicts versus resolved conflicts to decide when a rule is ready for upgrade. In caseversion
field got a conflict user had no possibility to resolve it.The fix adds a new
forceTargetVersionDiffAlgorithm
diff algorithm applied only forversion
field. It produces a non-conflict diff all the time even when base version is missing. The reason behind is thatversion
always gets target rule's version.