Commit e07b0f18 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Update WAF detection event timestamps in LogConsumerService to use attack time...

Update WAF detection event timestamps in LogConsumerService to use attack time from attacked logs. This change ensures accurate event timing for better context in generated events.
parent 8cf2af3e
...@@ -204,8 +204,8 @@ func (s *LogConsumerService) genWafDetectionEvent(wafDetectionMessage model.WafD ...@@ -204,8 +204,8 @@ func (s *LogConsumerService) genWafDetectionEvent(wafDetectionMessage model.WafD
Relation: model.Relation{ Relation: model.Relation{
Type: "timeline", Type: "timeline",
}, },
CreatedAt: wafDetectionMessage.CreatedAt, CreatedAt: attackedLog.AttackTime,
UpdatedAt: wafDetectionMessage.CreatedAt, UpdatedAt: attackedLog.AttackTime,
Timestamp: time.Now(), Timestamp: time.Now(),
Context: map[string]interface{}{ Context: map[string]interface{}{
"attack_ip": attackedLog.AttackIP, "attack_ip": attackedLog.AttackIP,
......
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