[FR] Upgrade eql to 1.0.1, align KQL with lark 1.x, and fix NTLM relay field comparison - #6611
Open
Mikaayenson wants to merge 7 commits into
Open
[FR] Upgrade eql to 1.0.1, align KQL with lark 1.x, and fix NTLM relay field comparison#6611Mikaayenson wants to merge 7 commits into
Mikaayenson wants to merge 7 commits into
Conversation
Replace length(user.name) - 1 equality checks that fail rule execution on multiple clusters with mutual startswith~/concat hostname matching.
|
⛔️ Test failed Results
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an Elasticsearch EQL execution failure in the Potential Computer Account NTLM Relay Activity rule by removing unsupported field-to-field arithmetic comparison and replacing it with equivalent hostname ↔ machine-account matching logic.
Changes:
- Updates the rule query to avoid
length(host.name) == length(user.name) - 1(unsupported field comparison) while preserving the intended “exact short-hostname or FQDN boundary” match behavior. - Updates the rule
updated_dateto reflect the tuning date.
|
⛔️ Test failed Results
|
Contributor
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
5 tasks
eric-forte-elastic
approved these changes
Aug 6, 2026
eric-forte-elastic
left a comment
Contributor
There was a problem hiding this comment.
Manual review, LGTM 👍
Pick up ES field-comparison validation in py-eql so CI rejects unsupported SIEM EQL field-vs-field queries.
|
⛔️ Test failed Results
|
Bump lib/kql to 0.1.15 and pin eql 1.0.1. Switch the kql dependency to a local file path so PR installs no longer pull main's older eql pin.
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
eql 1.0.1 pulls lark>=1.3.1, which moved Tree positions to meta. Add KvTree line/column properties (matching eql) and pin lark>=1.3.1 so KQL schema errors raise KqlParseError instead of AttributeError.
|
⛔️ Test failed Results
|
Matches the minor label: eql 1.0.1 upgrade and KQL/lark 1.x alignment.
|
⛔️ Test failed Results
|
| "semver==3.0.4", | ||
| "PyGithub==2.9.1", | ||
| "detection-rules-kql @ git+https://github.com/elastic/detection-rules.git#subdirectory=lib/kql", | ||
| "detection-rules-kql @ file:./lib/kql", |
Contributor
eric-forte-elastic
approved these changes
Aug 7, 2026
eric-forte-elastic
left a comment
Contributor
There was a problem hiding this comment.
Logically I think this is good to go, just may want to update the way we are handling the dependency change for uv support.. Otherwise LGTM 👍
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
length(host.name) == length(user.name) - 1, which SIEM EQL rejects (Comparisons against fields are not currently supported). local (pyeql) validation did not catch.startswith~for exact short-hostname match, orstartswith~(host.name, concat(account, "."))for FQDN — preserves the FP reduction intent without field arithmetic in==.