nothingworry's picture
Reasoning traces, smarter tools, deterministic backend tests.
ef83e66
raw
history blame
528 Bytes
from dataclasses import dataclass, field
from typing import List
@dataclass
class RedFlagRule:
id: str
pattern: str
description: str
severity: str # e.g., "low", "medium", "high", "critical"
source: str # "admin", "system"
enabled: bool = True
keywords: List[str] = field(default_factory=list)
@dataclass
class RedFlagMatch:
rule_id: str
pattern: str
severity: str
description: str
matched_text: str
confidence: float | None = None
explanation: str | None = None