only ignore rules without a message

This commit is contained in:
Sebastien Blot 2024-04-17 09:46:43 +02:00
parent 927f2e4c48
commit bdc62d3715
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A

View file

@ -273,7 +273,7 @@ func (r *AppsecRunner) AccumulateTxToEvent(evt *types.Event, req *appsec.ParsedR
})
for _, rule := range req.Tx.MatchedRules() {
if rule.Message() == "" || rule.DisruptiveAction() == "pass" || rule.DisruptiveAction() == "allow" {
if rule.Message() == "" {
r.logger.Tracef("discarding rule %d (action: %s)", rule.Rule().ID(), rule.DisruptiveAction())
continue
}