Commit 240e1555 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Update WAF detection event type and rule key name in LogConsumerService

This change modifies the event type from "waf_detection" to "ruleScope" and updates the rule key name to reflect the attack type instead of the rule name. Additionally, the relation type has been changed from "timeline" to "Discovery" for improved clarity in event categorization.
parent 962041ba
......@@ -236,12 +236,12 @@ func (s *LogConsumerService) genWafDetectionEvent(wafDetectionMessage model.WafD
// }
event := model.Event{
ID: id.Str(),
Type: "waf_detection",
Type: "ruleScope",
Description: attackedLog.AttackType,
RuleKeys: []model.RuleKey{
{
Version1: 0,
Name: attackedLog.RuleName,
Name: attackedLog.AttackType,
Category: "WAF",
},
},
......@@ -288,7 +288,7 @@ func (s *LogConsumerService) genWafDetectionEvent(wafDetectionMessage model.WafD
},
},
Relation: model.Relation{
Type: "timeline",
Type: "Discovery",
},
CreatedAt: attackedLog.AttackTime,
UpdatedAt: attackedLog.AttackTime,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment