fixup! fixup! Simplify all the things.

This commit is contained in:
2025-06-24 23:55:21 +01:00
parent a54ae71279
commit 46745f5b54
9 changed files with 963 additions and 168 deletions
+7 -2
View File
@@ -347,9 +347,14 @@ func (sm *SecurityMonitor) processSecurityEvent(event SecurityEvent) {
// Check for suspicious patterns
if patterns := sm.patternDetector.DetectSuspiciousPatterns(); len(patterns) > 0 {
for _, pattern := range patterns {
sm.logger.Errorf("Suspicious pattern detected: %s", pattern)
// Log once with all patterns instead of logging each pattern
if len(patterns) == 1 {
sm.logger.Errorf("Suspicious pattern detected: %s", patterns[0])
} else {
sm.logger.Errorf("Multiple suspicious patterns detected: %v", patterns)
}
for _, pattern := range patterns {
patternEvent := SecurityEvent{
Type: "suspicious_pattern",
Severity: "high",