GitHub

Template Discontinuity

Detects pages whose markup diverges hard from the site's common template

Detects pages whose markup diverges hard from the site’s common template — a standalone page with none of the site’s theme is a classic injected-page signal.

Rule IDintegrity/template-discontinuity
CategorySite Integrity
ScopeSite-wide
Severitywarning
Weight6/10

How it works

The rule fingerprints every crawled page on stable theme markers — shared stylesheets, asset hosts, body classes, CSS custom properties, and the presence of a nav and footer — then builds a baseline from the markers shared by the majority of pages (your theme). Pages whose similarity to that baseline falls below the threshold are reported.

A lone off-theme page is reported as info (it might be a legitimate off-theme landing page). It escalates to a failure only when the divergent page also carries page-level compromise signals (brand impersonation, an obfuscated script, an auth overlay, or doorway content) — the correlation gating that keeps false positives down.

Solution

A page that shares almost none of your site’s theme (no shared stylesheets, asset hosts, nav/footer, or CSS variables) may be an injected standalone page rather than something your CMS produced. Confirm the page is one you created; if not, treat the site as compromised: remove the page, audit recently modified files, and check server access logs. Legitimate off-theme landing pages should still load your shared assets.

Options

OptionDefaultDescription
minPages4Minimum pages needed to establish a reliable baseline
similarityThreshold0.2Pages below this similarity to the baseline are flagged
squirrel.toml
toml
[rules."integrity/template-discontinuity"]
minPages = 4
similarityThreshold = 0.2

Enable / Disable

Disable this rule

squirrel.toml
toml
[rules]
disable = ["integrity/template-discontinuity"]

Disable all Site Integrity rules

squirrel.toml
toml
[rules]
disable = ["integrity/*"]

Enable only this rule

squirrel.toml
toml
[rules]
enable = ["integrity/template-discontinuity"]
disable = ["*"]

Type to search…

↑↓ navigate ↵ open esc close