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

Add thread safety to ruleset #18

Closed markuskont closed 2 years ago

markuskont commented 2 years ago

This should be a simple improvement. Ruleset object is not currently thread safe, so different goroutines need to initialize separate rulesets. Yet a simple sync.RWMutex should do the trick here and it should not even affect performance much as ruleset is only read after initial creation.