markuskont / go-sigma-rule-engine

Golang library that implements a sigma log rule parser and match engine.
Apache License 2.0
92 stars 17 forks source link

sigma rule modifiers not working #1

Closed arikastarvo closed 2 years ago

arikastarvo commented 3 years ago

Modifiers such as |endswith |startswith do not seem to be working.

rule:

title: test
id: test
detection:
    selection:
        foo|endswith: "bar"
    condition: selection

echo '{"foo": "foobar"}' | ./go-sigma-rule-engine run --rules-dir rules/

Expected result would be a match, but no match is found. Same rule without the modifier and search value of foobar will find a match. Glob pattern in search value also works - so search value *bar without the modifier |endswith works.