-
Notifications
You must be signed in to change notification settings - Fork 606
[FR] Add ESQL rules to dataset exception #5249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eric-forte-elastic
merged 3 commits into
main
from
5246-bug-inconsistent-population-of-related_integrations-field-for-esql-rules
Oct 27, 2025
Merged
[FR] Add ESQL rules to dataset exception #5249
eric-forte-elastic
merged 3 commits into
main
from
5246-bug-inconsistent-population-of-related_integrations-field-for-esql-rules
Oct 27, 2025
Conversation
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
Contributor
Enhancement - GuidelinesThese guidelines serve as a reminder set of considerations when addressing adding a feature to the code. Documentation and Context
Code Standards and Practices
Testing
Additional Checks
|
Contributor
Author
|
Unit test pass, with new additional unit test. |
Mikaayenson
approved these changes
Oct 24, 2025
shashank-elastic
approved these changes
Oct 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Pull Request
Issue link(s):
Resolves #5246
Summary - What I changed
The prior logic is to not have related_integrations populated for rules that do not have an event.dataset even if it is specified in the integration. (not specific to ESQL).
For example an EQL query with the following:
Will also not have related integrations populated (as we enforce the need for event.dataset for all integrations that are not part of NON_DATASET_PACKAGES). This is due to us not being able to use an AST for ESQL validation. As such we need to check for integrations directly and deduplicate with event datasets (as done in this draft PR).
However, we also need to handle cases like this in deduplication:
Fortunately, Kibana handles this when a rule is imported.
Example Modified pre-built rule with the above related integrations.
test_esql_rule.ndjson.txt
Also added a unit test/integration test to check for this specific behavior. Before we were only validating the presence of related integrations for a query that had an event dataset.
Note the modification to remote
filtered_keys.update(indices)fromdetection_rules/index_mappings.pyis an unrelated fix to a typo where this should not have been added. This was inadvertently introduced when testing autogenerated schema compatibility with ESQL validation in this case is an NOP and can be removed. All unit tests pass with this removal and test rules all pass validation.How To Test
Run remote unit tests
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist