Skip to content

Commit

Permalink
Merge pull request #16 from SigmaHQ/issue-15
Browse files Browse the repository at this point in the history
Escape curly brackets
  • Loading branch information
moullos authored Sep 24, 2024
2 parents 2b63ce2 + 5536914 commit c77bdc5
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 c77bdc5

Please sign in to comment.