Skip to content

Commit

Permalink
Escape curly brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
moullos committed Sep 24, 2024
1 parent 2b63ce2 commit 5536914
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sigma/backends/crowdstrike/logscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class LogScaleBackend(TextQueryBackend):
escape_char_re: ClassVar[str] = "\\"
wildcard_multi_re: ClassVar[str] = ".*"
wildcard_single_re: ClassVar[str] = "."
add_escaped_re: ClassVar[str] = "*$^.|?()[]+/"
add_escaped_re: ClassVar[str] = "*$^.|?()[]+/{}"
filter_chars_re: ClassVar[str] = ""
bool_values_re: ClassVar[Dict[bool, str]] = {
True: "true",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend_logscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def test_crowdstrikelogscale_special_chars(logscale_backend: LogScaleBackend):
product: test_product
detection:
sel:
fieldA: valueA*$^.|?()[]+/
fieldA: valueA*$^.|?()[]+/{}
condition: sel
"""
)
)
== ["fieldA=/^valueA.*\\$\\^\\.\\|.\\(\\)\\[\\]\\+\\/$/i"]
== ["fieldA=/^valueA.*\\$\\^\\.\\|.\\(\\)\\[\\]\\+\\/\\{\\}$/i"]
)


Expand Down

0 comments on commit 5536914

Please sign in to comment.