ignore native modsec rules that were either pass or allow (#2684)

This commit is contained in:
blotus 2024-01-15 15:12:02 +01:00 committed by GitHub
parent fd309134a2
commit e452dc80bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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