Skip to content

types

types

Security data types — threat levels, scan findings, and security events.

Classes

ThreatLevel

Bases: str, Enum

Severity classification for security findings.

RedactionMode

Bases: str, Enum

Action mode when findings are detected.

SecurityEventType

Bases: str, Enum

Categories of security events.

ScanFinding dataclass

ScanFinding(
    pattern_name: str,
    matched_text: str,
    threat_level: ThreatLevel,
    start: int,
    end: int,
    description: str = "",
)

A single finding from a security scanner.

ScanResult dataclass

ScanResult(findings: List[ScanFinding] = list())

Aggregated result from one or more scanners.

Attributes
clean property
clean: bool

Return True if no findings were detected.

highest_threat property
highest_threat: Optional[ThreatLevel]

Return the highest threat level among findings, or None.

SecurityEvent dataclass

SecurityEvent(
    event_type: SecurityEventType,
    timestamp: float,
    findings: List[ScanFinding] = list(),
    content_preview: str = "",
    action_taken: str = "",
)

A recorded security event for audit logging.