BreachcraftSecurity
CI green · 15-test offline suite · 21 Nov 2026
site-audit
Check the site against its own spec, not a memory of it.
Every front door carries a site.json and a CSP. This reads both and fails the build on drift before a reviewer has to find it by eye.
Usage
python -m breachcraft_tools.site_audit <folder> [--json]
Exit 0 clean, 1 problems, 2 usage. No third-party packages.
What it checks
- Tag balance,
lang="en-GB", and one page file per route it can resolve. - Scripts: inline script fails; an external same-origin script must be allowed by
script-src. - Inline
styleattributes against astyle-src 'self'policy. - Broken internal links and fragments with no target, across pages.
- Per-page byte ceiling and
index.htmlword budget fromsite.json, plus any required phrases. - Palette contrast for the ink, muted and accent tokens against the background.
- Banned words: leverage, synergy, cutting-edge, world-class, best-in-class, passionate.
Limits, stated so a pass is not over-read
Tag balance only; full HTML validity is a tidy step in CI. Contrast is measured on the palette tokens, not per rendered element. CSP is checked against page loads, not by a browser. It cannot see layout, focus order or whether the copy is true.
Why it is local
It has to run on the folder before anything is pushed, and it has no service to call. The rules live in the same repository as the sites, so a change to a budget or a required phrase is a normal review.
Private, all rights reserved. Source and licence note on request; nothing here is a published release.
Elsewhere · Services · Academy · Labs · Standards
Breachcraft Security · Evilsaint Ltd · hello@breachcraftsecurity.com