Expand description
Native CI audit gates (issue #549).
Exposes 15 AuditGate implementations that run locally and in CI
to catch violations of WCAG, schema.org, hreflang reciprocity, CSP +
SRI, PQC TLS readiness, HTML5 structure, broken links, OG metadata,
markdown style, performance budgets, AI discovery files, RSS/Atom
feeds, image optimisation, the localised semantic search index, and
JSON-LD inLanguage vs <html lang> consistency.
§Surface
use ssg::audit::{AuditRunner, AuditConfig, Site};
use std::path::Path;
let site = Site::load(Path::new("./public"))?;
let cfg = AuditConfig::default();
let report = AuditRunner::new(cfg).run(&site);
report.print_text();Each gate ships with name(), explain(), and a run(&Site) that
returns a Vec<Finding>. Findings carry a Severity so callers
can filter or fail based on the configured --fail-on threshold.
Some gates depend on other v0.0.44 epics (PQC on E6, AI discovery on E8, semantic search on E1). Those gates emit an info finding when their input files are absent rather than failing — they upgrade to enforcement once the producing epic merges.
Modules§
- gates
- Per-gate implementations for
crate::audit. - output
- Output formatters for the audit report: rich text, JSON,
JUnitXML, and SARIF v2.1.0.
Structs§
- Audit
Budgets [audit.budgets]subsection.- Audit
Config - User-facing configuration for an
AuditRunner. - Audit
Disabled Section [audit.disabled]subsection.- Audit
Options - Runtime options passed to every gate at execution time.
- Audit
Report - Aggregate audit report.
- Audit
Runner - Orchestrates dispatch across the 15 registered gates.
- Audit
Toml Config - Schema for the
[audit]table inssg.toml. - Finding
- A single audit finding produced by a gate.
- Gate
Result - Per-gate result block.
- Severity
Counts - Tally of severities for a gate result.
- Site
- A loaded view of a built site for audit gates to consume.
Enums§
Traits§
- Audit
Gate - Trait implemented by every audit gate.