Skip to content

[Security Solution][Detections] Investigate removing usage of internal tags #92334

Open

Description

With #92036, the Alerting team enabled the ability to filter on string parameters within our custom alert params. As a result, we should be able to use this to remove our internal_tags workaround for filtering on the immutable custom field. While immutable is a boolean, this fix leverages the flattened mapping under the hood, and so we should be able to use the string representation "true" or "false" to filter rules accordingly. e.g. alert.attributes.params.immutable:"true"

Testing real quick, I modified:

const showCustomRuleFilter = filterOptions.showCustomRules
? [`alert.attributes.tags: "__internal_immutable:false"`]
: [];
const showElasticRuleFilter = filterOptions.showElasticRules
? [`alert.attributes.tags: "__internal_immutable:true"`]
: [];

to be:

  const showCustomRuleFilter = filterOptions.showCustomRules
    ? [`alert.attributes.params.immutable: "false"`]
    : [];
  const showElasticRuleFilter = filterOptions.showElasticRules
    ? [`alert.attributes.params.immutable: "true"`]
    : [];

And this appears to work! 🎉

For more details on the internal_tags implementation, please see the original PR here: #52838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Feature:Detection RulesAnything related to Security Solution's Detection RulesTeam: SecuritySolutionSecurity Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Team:Detection Rule ManagementSecurity Detection Rule Management TeamTeam:Detections and RespSecurity Detection Response TeamTheme: simp_prot_mgmtSecurity Solution Simplified Protection Management Themerefactoringtechnical debtImprovement of the software architecture and operational architecture

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions