…nt queries (#249716) (#249879)
# Backport
This will backport the following commits from `main` to `9.3`:
- [[Streams][SigEvents] Prevent editing feature of significant event
queries (#249716)](#249716)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Francesco
Fagnani","email":"fagnani.francesco@gmail.com"},"sourceCommit":{"committedDate":"2026-01-21T14:02:28Z","message":"[Streams][SigEvents]
Prevent editing feature of significant event queries (#249716)\n\n###
Summary\n\nThis PR prevents modifying the `feature` field of existing
significant\nevent queries in both the UI and API. Feature selection
remains\navailable when **creating** new significant events, but
becomes\nread-only when **editing** existing ones.\n\n###
Background\n\nWhen creating a significant event, a detection rule is
created combining\nthe KQL query with the feature condition. The rule ID
is generated from\nthe `ASSET_UUID` and `kql.query` only - it does not
include the\n`feature` field. When the feature changes, the rule ID
stays the same,\ncausing alerts from the previous rule configuration to
still appear.\n\nSince features are being removed from significant
events, this is a\ntemporary fix to prevent the bug from
occurring.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/bf5e21ea-c55e-487c-9f32-163d767b13ad\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/268f4e65-1861-4a46-b07b-9473238995df","sha":"2a334537c8304aff48176fa671fc3698fd2f393a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","v9.4.0","author:actionable-obs","Feature:SigEvents","v9.3.1"],"title":"[Streams][SigEvents]
Prevent editing feature of significant event
queries","number":249716,"url":"https://github.com/elastic/kibana/pull/249716","mergeCommit":{"message":"[Streams][SigEvents]
Prevent editing feature of significant event queries (#249716)\n\n###
Summary\n\nThis PR prevents modifying the `feature` field of existing
significant\nevent queries in both the UI and API. Feature selection
remains\navailable when **creating** new significant events, but
becomes\nread-only when **editing** existing ones.\n\n###
Background\n\nWhen creating a significant event, a detection rule is
created combining\nthe KQL query with the feature condition. The rule ID
is generated from\nthe `ASSET_UUID` and `kql.query` only - it does not
include the\n`feature` field. When the feature changes, the rule ID
stays the same,\ncausing alerts from the previous rule configuration to
still appear.\n\nSince features are being removed from significant
events, this is a\ntemporary fix to prevent the bug from
occurring.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/bf5e21ea-c55e-487c-9f32-163d767b13ad\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/268f4e65-1861-4a46-b07b-9473238995df","sha":"2a334537c8304aff48176fa671fc3698fd2f393a"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249716","number":249716,"mergeCommit":{"message":"[Streams][SigEvents]
Prevent editing feature of significant event queries (#249716)\n\n###
Summary\n\nThis PR prevents modifying the `feature` field of existing
significant\nevent queries in both the UI and API. Feature selection
remains\navailable when **creating** new significant events, but
becomes\nread-only when **editing** existing ones.\n\n###
Background\n\nWhen creating a significant event, a detection rule is
created combining\nthe KQL query with the feature condition. The rule ID
is generated from\nthe `ASSET_UUID` and `kql.query` only - it does not
include the\n`feature` field. When the feature changes, the rule ID
stays the same,\ncausing alerts from the previous rule configuration to
still appear.\n\nSince features are being removed from significant
events, this is a\ntemporary fix to prevent the bug from
occurring.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/bf5e21ea-c55e-487c-9f32-163d767b13ad\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/268f4e65-1861-4a46-b07b-9473238995df","sha":"2a334537c8304aff48176fa671fc3698fd2f393a"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
---------
Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>
Co-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co>
Summary
This PR prevents modifying the
featurefield of existing significant event queries in both the UI and API. Feature selection remains available when creating new significant events, but becomes read-only when editing existing ones.Background
When creating a significant event, a detection rule is created combining the KQL query with the feature condition. The rule ID is generated from the
ASSET_UUIDandkql.queryonly - it does not include thefeaturefield. When the feature changes, the rule ID stays the same, causing alerts from the previous rule configuration to still appear.Since features are being removed from significant events, this is a temporary fix to prevent the bug from occurring.
Before:
Screen.Recording.2026-01-20.at.14.15.51.mov
After:
Screen.Recording.2026-01-20.at.14.14.53.mov