This commit is contained in:
larssand
2026-06-18 22:51:54 +02:00
parent 5650973e50
commit f7611ef2b3
8 changed files with 374 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ class LogEvent:
def src_ip(self) -> str | None:
return self.fields.get("srcip") or self.fields.get("src_ip") or self.fields.get("source_ip")
@property
def dst_ip(self) -> str | None:
return self.fields.get("dstip") or self.fields.get("dst_ip") or self.fields.get("destination_ip")
@property
def subtype(self) -> str:
return self.fields.get("subtype", "").lower()
@@ -62,3 +66,15 @@ class AnomalyFinding:
confidence: str
reasons: list[str]
evidence: dict[str, int | str | float]
@dataclass(frozen=True)
class Recommendation:
subject: str
score: int
severity: str
title: str
recommendation: str
reasons: list[str]
related_policy_ids: list[str] = field(default_factory=list)
related_services: list[str] = field(default_factory=list)