Skip to content

[Security Solution][Detections] Updating prepackaged rules overwrites existing exceptions #80417

@spong

Description

@spong

Kibana version:
7.9

When updating prepackaged rules any existing exceptions on the rules being updated will be overridden with whatever exceptions are on the prepackaged rules. To mitigate this, we can merge any existing exceptions_list items from the rulesFromFileSystem with those coming from the prepackagedRules.

Flow:

Get rules to update:

const rulesToUpdate = getRulesToUpdate(rulesFromFileSystem, prepackagedRules);

Add logic for merging existing exceptions

await updatePrepackagedRules(alertsClient, savedObjectsClient, rulesToUpdate, signalsIndex);

Patch in update_prepacked_rules.ts will now include any pre-existing exceptions and will no longer overwrite:

Steps to recreate:

  • Add prepackaged rules
  • Add exception to prepackaged rule
  • Increment version of the rule that the exception was added to
  • Update prepackaged rules
  • Observe exception added is no longer present

Metadata

Metadata

Labels

Feature:Detection RulesSecurity Solution rules and Detection EngineTeam: SecuritySolutionSecurity Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Team:Detections and RespSecurity Detection Response TeamTeam:SIEMbugFixes for quality problems that affect the customer experiencefixedimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.v7.10.0

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions