1from __future__ import annotations
2
3from abc import ABC, abstractmethod
4from typing import TYPE_CHECKING
5
6if TYPE_CHECKING:
7 from ..results import AuditResult
8 from ..scanner import Scanner
9
10
11class Audit(ABC):
12 """Base class for security check audits."""
13
14 name: str
15 slug: str # URL-friendly identifier for disabling audits
16 required: bool = True # Whether this audit is required for all sites
17 description: str | None = None # Optional description shown in verbose mode
18
19 @abstractmethod
20 def check(self, scanner: Scanner) -> AuditResult:
21 """Run checks for this audit and return results."""
22 pass