Skip to content

Commit 219a86d

Browse files
Fixes regression where tags are turning immutable to mutable within rules (#90326)
## Summary Fixes regression: #90319 that has not been released where in some cases such as adding actions to a rule through an update we can and will update an immutable rule and do not expect the immutable to turn into a mutable through the tags. Simple one-liner fix, I will update in a follow on PR with a regression test for this particular use case of actions but not with this one since we optimizing for speed of pull request to back-port. Criticality is high and impact is high as this is data bug which can cause a lot of headaches and migrations if this goes out. ### Checklist No unit test for this one, but a functional test will be added in a follow up - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
1 parent da9c4a8 commit 219a86d

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugins/security_solution/server/lib/detection_engine/rules

1 file changed

+1
-1
lines changed

x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const updateRules = async ({
3838
const enabled = ruleUpdate.enabled ?? true;
3939
const newInternalRule: InternalRuleUpdate = {
4040
name: ruleUpdate.name,
41-
tags: addTags(ruleUpdate.tags ?? [], existingRule.params.ruleId, false),
41+
tags: addTags(ruleUpdate.tags ?? [], existingRule.params.ruleId, existingRule.params.immutable),
4242
params: {
4343
author: ruleUpdate.author ?? [],
4444
buildingBlockType: ruleUpdate.building_block_type,

0 commit comments

Comments
 (0)