浏览代码

add debug to rule collection

bui 1 年之前
父节点
当前提交
495c6f9e8a
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      pkg/waf/waap_rules_collection.go

+ 6 - 0
pkg/waf/waap_rules_collection.go

@@ -26,6 +26,7 @@ var WAAP_RULE = "waap-rule"
 type WaapCollectionConfig struct {
 	Type              string                 `yaml:"type"`
 	Name              string                 `yaml:"name"`
+	Debug             bool                   `yaml:"debug"`
 	Description       string                 `yaml:"description"`
 	SecLangFilesRules []string               `yaml:"seclang_files_rules"`
 	SecLangRules      []string               `yaml:"seclang_rules"`
@@ -70,6 +71,11 @@ func LoadCollection(collection string) (WaapCollection, error) {
 			continue
 		}
 		log.Infof("Adding %s to waap rules", rule.Name)
+		// if rule.Debug {
+		// 	log.Infof("Enabling debug for collection %s", rule.Name)
+
+		// 	//SetRuleDebug(rule.ID, true)
+		// }
 		waapRules[rule.Name] = rule
 	}