Skip to content

Commit

Permalink
fix #3350
Browse files Browse the repository at this point in the history
  • Loading branch information
buixor committed Nov 29, 2024
1 parent 2453241 commit f48d208
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/appsec/appsec_rules_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
type AppsecCollection struct {
collectionName string
Rules []string
NativeRules []string
}

var APPSEC_RULE = "appsec-rule"
Expand Down Expand Up @@ -88,14 +89,14 @@ func LoadCollection(pattern string, logger *log.Entry) ([]AppsecCollection, erro
if strings.TrimSpace(line) == "" {
continue
}
appsecCol.Rules = append(appsecCol.Rules, line)
appsecCol.NativeRules = append(appsecCol.NativeRules, line)
}
}
}

if appsecRule.SecLangRules != nil {
logger.Tracef("Adding inline rules %+v", appsecRule.SecLangRules)
appsecCol.Rules = append(appsecCol.Rules, appsecRule.SecLangRules...)
appsecCol.NativeRules = append(appsecCol.NativeRules, appsecRule.SecLangRules...)
}

if appsecRule.Rules != nil {
Expand Down

0 comments on commit f48d208

Please sign in to comment.