Skip to content

docs(faq): explain the runtime-DOM-mutation false-invalid case#4

Merged
jt55401 merged 1 commit into
mainfrom
docs/faq-runtime-dom-mutation
May 14, 2026
Merged

docs(faq): explain the runtime-DOM-mutation false-invalid case#4
jt55401 merged 1 commit into
mainfrom
docs/faq-runtime-dom-mutation

Conversation

@jt55401
Copy link
Copy Markdown
Contributor

@jt55401 jt55401 commented May 14, 2026

Summary

Adds an FAQ entry explaining why a signed page can show as invalid even when the signature is mathematically correct: client-side JavaScript mutating content inside a <signed-section> between page load and verification.

We hit this on this site itself — the Hugo Blox docs theme injects <button class=\"copy-button\">Copy</button> into every <pre> block at runtime. The signer never saw the button; the extension's verifier reads it from the live DOM and the canonical text diverges.

Links to the matching Known Issue section in the spec README (separate PR: HTMLTrust/htmltrust-spec#2).

🤖 Generated with Claude Code

Adds an FAQ entry for the failure mode we hit on this site: the
Hugo Blox theme injects copy buttons into <pre> blocks at runtime,
which makes the live-DOM innerHTML disagree with the static HTML
the signer hashed. The signature is mathematically correct, but
the verifier reads a different canonical text and reports invalid.

Documents the three practical workarounds (configure/patch the
theme, pre-render decoration server-side, move decoration outside
the signed region) and links to the matching Known Issue section
in the spec README.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jt55401 jt55401 merged commit 8289ccf into main May 14, 2026
2 checks passed
@jt55401 jt55401 deleted the docs/faq-runtime-dom-mutation branch May 14, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant