Coverage for lintro / parsers / osv_scanner / suppression_models.py: 100%
13 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Models for OSV-Scanner vulnerability suppression entries."""
3from __future__ import annotations
5from dataclasses import dataclass
6from datetime import date
8from lintro.parsers.osv_scanner.suppression_status import SuppressionStatus
11@dataclass(frozen=True)
12class SuppressionEntry:
13 """A single [[IgnoredVulns]] entry from .osv-scanner.toml.
15 Attributes:
16 id: Vulnerability identifier (e.g., GHSA-xxxx, CVE-xxxx).
17 ignore_until: Date after which the suppression expires.
18 reason: Human-readable explanation for the suppression.
19 """
21 id: str
22 ignore_until: date
23 reason: str
26@dataclass(frozen=True)
27class ClassifiedSuppression:
28 """A suppression entry with its staleness classification.
30 Attributes:
31 entry: The original suppression entry.
32 status: Whether the suppression is ACTIVE, STALE, or EXPIRED.
33 """
35 entry: SuppressionEntry
36 status: SuppressionStatus