Documentation
¶
Overview ¶
Package severity is the vulnerability domain's severity vocabulary: normalization, ranking, and ordering of the well-known labels (critical, high, medium, low, unknown). It models vulnerability SEVERITY LABELS — the normalized vocabulary shared by OSV, Trivy, Grype, and friends — NOT CVSS scores or vectors. It is dependency-free so any vulnerability-producing module can depend DOWN on it.
This is deliberately NOT a universal severity scale for StageFreight. Other domains (lint diagnostic importance, and later license/quality/etc.) own their OWN ordered vocabularies. The shared thing across modules is the evaluation PIPELINE and the fail_on policy algorithm — never a single scale. The typed Severity keeps this vocabulary compile-time non-interchangeable with, e.g., lint's importance tiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare orders two severities by rank: POSITIVE means a is more severe than b, zero equal, negative less. Pure vocabulary — no policy. Policy sites express a threshold as, e.g., `Compare(finding, failOn) >= 0` ("at least as severe as the gate").
Types ¶
type Severity ¶
type Severity string
Severity is a vulnerability severity label. Typed (not a bare string) so it cannot be silently crossed with another domain's ordered vocabulary.