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.
Hi everyone,
because of the issues with the case sensitiveness of ESQL (#107) and because the backend for EQL is not yet supporting correlations, although the language itself supports this kind of queries (https://www.elastic.co/guide/en/elasticsearch/reference/8.16/eql-syntax.html), I´ve started implementing this.
By the way, EQL is also supporting case-insensitive searches :D
This is still WIP as not all use cases are implemented yet and there need to be more tests. The code also depends on a newer pysigma release, but you are welcome to comment on the current status and of course help.
While working on the templates for the correlations, I´ve ran into an issue which makes a small adaption in the
convert_correlation_rule_from_template
method in theTextqueryBackend
in the main repo necessary:The template for correlations in EQL looks like this
The issue is the
{timespan}
parameter. In the current implementation, the value is inserted into the{aggregate}
string, but for EQL it needs to be inserted before the{search}
part, so it needs to be handled outside of the{aggregate}
expression parsing.To fix this, I´ve just added the marked line into the
convert_correlation_rule_from_template
method.I think there is no other way to achieve the necessary format. But this change should not lead to undesired behavior because it won´t change the output unless there is a
{timespan}
in thecorrelation_query
variable specified.