obversarystudios's picture
Threat-map metrics + observable geometry (embed/cluster/MI)
6c3043e verified
raw
history blame contribute delete
502 Bytes
"""Severity weights and category metadata for aggregation."""
SEVERITY_WEIGHT: dict[str, float] = {
"critical": 1.0,
"high": 0.75,
"medium": 0.5,
"low": 0.25,
}
DEFAULT_CATEGORIES: tuple[str, ...] = (
"prompt_injection",
"tool_output_injection",
"retrieval_poisoning",
"memory_poisoning",
"secret_exfiltration",
"unauthorized_action",
)
def severity_weight(severity: str) -> float:
return SEVERITY_WEIGHT.get(severity.lower(), SEVERITY_WEIGHT["medium"])