Skip to content

Commit

Permalink
fix usage of rule.comparators
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleyjkemp committed Sep 5, 2024
1 parent 87dd4d8 commit 3190b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluator/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (rule RuleEvaluator) matches(ctx context.Context, event Event, comparators
// must evaluate all searches up front
for identifier, search := range rule.Detection.Searches {
var err error
result.SearchResults[identifier], err = rule.evaluateSearch(ctx, search, event, rule.comparators)
result.SearchResults[identifier], err = rule.evaluateSearch(ctx, search, event, comparators)
if err != nil {
return Result{}, fmt.Errorf("error evaluating search %s: %w", identifier, err)
}
Expand All @@ -130,7 +130,7 @@ func (rule RuleEvaluator) matches(ctx context.Context, event Event, comparators
return false // compatibility with old behaviour
}
var err error
result.SearchResults[identifier], err = rule.evaluateSearch(ctx, search, event, rule.comparators)
result.SearchResults[identifier], err = rule.evaluateSearch(ctx, search, event, comparators)
if err != nil {
searchErr = fmt.Errorf("error evaluating search %s: %w", identifier, err)
return false
Expand Down

0 comments on commit 3190b48

Please sign in to comment.