DOM2 · Security layer
Every model is 100% exposed to indirect prompt injection because nobody filters the web content an agent reads. DOM2 sits at that boundary: it renders the page, sees what a human actually sees, and hands the agent a structured JSON — clean visible content delivered, hidden injections quarantined.
LIVE · POST dom2.srv1000934.hstgr.cloud/cleanOne attack page → three buckets
13 / 13 injection vectors caught · 0 reached the agent · relevant metadata kept
Calibration on real pages
| Page | Nodes | Delivered | Quarantined | Injections caught | False positives |
|---|---|---|---|---|---|
| Attack page (14 vectors) | 26 | 8 | 13 | 13 / 13 | — |
| apple.com | 1891 | 455 | 0 | — | 0 |
| stripe.com | 3034 | 709 | 0 | — | 0 |
The layer stack
SSRF hardening: blocks private / link-local / reserved IPs (incl. 169.254.169.254), scheme allowlist, per-request DNS re-validation, redirect & node caps.
Strips tag chars, zero-width, bidi, variation selectors; caps combining marks; NFKC; confusables. Emits normalization_delta; forwards the normalized text, never the original.
How it's hidden: display / opacity / size / offscreen / clip, WCAG color camouflage, sr-only, and ingestible channels — alt, aria, meta, title, hidden inputs, data-*.
Why hidden: responsive / accessibility / interactive / structural / icon (benign) vs concealment. Orthogonal directive axis, multilingual.
Multilingual (EN / DE / FR / ES / RU) regex — used as a scored feature, never a standalone verdict. Benchmarks show it's unusable alone (57–100% false positives).
One pass → clean_text + delivered / stripped / quarantined. Keeps relevant metadata (title, alt, description, keywords); strips only noise (duplicates, boilerplate, machine attrs).
What it promises
Honest limitations
/clean /sanitize /detect