You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when parsing a KQL query to a DSL query using the converter in lib/kql, I noticed that it makes two conversion errors.
For a wildcard the keyword wildcard is not used but query_string. (I'm not sure if this is intentional, though. Otherwise the query did not work for me).
Brackets in the KQL-query, in order to map certain conditions, are converted incorrectly.
To Reproduce
query=""" host.name: \"foo\" and source.ip: \"10.10.0.10.\" and not user.name : bar* and not ( destination.name : \"some_name\" and destination.ip : \"20.20.0.20\" ) and not another.value : \"true\""""print(KqlParser.to_dsl(query))
For the missing brackets, I have traced the transformation back to the following line of code. As a suggestion, I would propose a check for the number of elements within the filter.
Hello,
Describe the bug
when parsing a KQL query to a DSL query using the converter in
lib/kql
, I noticed that it makes two conversion errors.wildcard
is not used butquery_string
. (I'm not sure if this is intentional, though. Otherwise the query did not work for me).To Reproduce
The current output is
Expected behavior
The expected output is
suggested solution
detection-rules/lib/kql/kql/dsl.py
Line 76 in 0cb4298
detection-rules/lib/kql/kql/dsl.py
Line 51 in 0cb4298
thank you.
The text was updated successfully, but these errors were encountered: