Add mitre_categories field to event definitions#25977
Draft
danotorrey wants to merge 2 commits into
Draft
Conversation
Adds a single `mitre_categories` keyword array on event definitions and stamps it onto every produced event (mapped at the top level of the events index). Validation accepts tactic, technique, and sub-technique IDs through one combined regex; the 64-value cap is enforced. Frontend types, fixtures, and event-def save telemetry track the new field. Includes a `MitreBackwardsCompatibilityFilter` helper used by the three storage-adapter `MoreSearchAdapter` implementations to OR the legacy `event.fields.sigma_rule_tag_*` filter shape with the new `mitre_categories` shape during the migration window. Scoped for removal alongside the legacy path. Co-Authored-By: Claude Opus 4.7 (1M context) <[EMAIL_ADDRESS_REDACTED]>
CI yarn tsc surfaced a typed `EventDefinition` literal that hadn't been updated when the field was added. Co-Authored-By: Claude Opus 4.7 (1M context) <[EMAIL_ADDRESS_REDACTED]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mitre_categoriesfield on event definitions (a keyword array of canonical MITRE IDs likeTA0002,T1059,T1059.001).streams,associated_assets, etc.TA0000), technique IDs (T0000), and sub-technique IDs (T0000.000) in one combined regex; capped at 64 values per definition; can be relaxed viaevent_definition_mitre_id_validation_enabledfor unusual deployments.Notes
MitreBackwardsCompatibilityFilterinorg.graylog.events.search— a helper that the three storage-adapterMoreSearchAdapterimplementations call to OR a legacy-shape MITRE filter (event.fields.sigma_rule_tag_*) with the newmitre_categoriesshape during the migration window. Scoped for removal alongside the legacy path./jpd Graylog2/graylog-plugin-enterprise#14205
Test plan
mitre_categories: ["TA0002","T1059","T1059.001"]; round-trip via GET.t1059), non-MITRE strings (bogus), and >64-entry arrays.?query=mitre_categories:T1059.mitre_categorieson_source.mitre_categories— buckets are the canonical IDs.Assisted with Claude Code