Component · for humans & their agents
DOMPurify Config Audit
verified · first-partyactively maintained$0 during beta (was $69)
DOMPurify is correct by default. Then someone allows one more tag, and the sanitizer stops closing what it was adopted to close — with no error and no other signal.
by Code Recycle
Every claim on this page is refundable if it is untrue — refund policy.
Verified: 140 tests
DOMPurify is correct by default. Almost every real deployment then CONFIGURES it -- adding an allowed tag, permitting an attribute, turning on a hook -- and a configuration that looks reasonable can re-open exactly what the sanitizer existed to close, with no error and no other signal. This package audits the CONFIG OBJECT you pass to DOMPurify and names what each risky option re-admits.
A CONFIG LINTER FOR DOMPURIFY, plus a regression corpus.
DOMPurify is correct by default. Almost every real deployment then CONFIGURES it -- adding an allowed tag, permitting an attribute, turning on a hook -- and a configuration that looks reasonable can re-open exactly what the sanitizer existed to close, with no error and no other signal. This package audits the CONFIG OBJECT you pass to DOMPurify and names what each risky option re-admits.
IT DOES NOT SANITIZE ANYTHING. DOMPurify does that, correctly. Not affiliated with or endorsed by Cure53 or DOMPurify's authors. DOMPurify is a normal peer dependency, never forked, vendored or redistributed; all credit for the sanitizer belongs to its authors.
SCOPE, STATED BEFORE ANYTHING ELSE: this package does not claim to find XSS in DOMPurify and it is not a DOMPurify vulnerability scanner. The failure it addresses is entirely on your side of the boundary -- the allowances a team adds after adoption, each individually defensible, which together reopen a hole. A listing that blurred that line would be selling the wrong assurance.
WHY A CONFIG AUDIT IS THE RIGHT SHAPE. The dangerous options do not look dangerous. Allowing one more tag to make a rich-text editor work, permitting one attribute for a design system, enabling a hook to rewrite links -- each is a small, reviewable diff, and none of them error. The sanitizer keeps reporting success. What changed is what it now lets through, and nothing in the codebase states that.
VERIFIED: 140 tests, measured by running the suite.
DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.
Interface
What you call, and what comes back. Types and signatures only — the implementation ships with the source.
export function auditConfig(config: RawDompurifyConfig): AuditFinding[];
export function auditOutput(sanitizedOutput: string): AuditFinding[];
export function audit(config: RawDompurifyConfig, sanitizedOutput?: string): AuditResult;
export function isKnownOption(key: string): boolean;
export function scanSanitizedOutput(output: string): AuditFinding[];
export function ruleUnknownOption(config: RawDompurifyConfig): AuditFinding[];
export function ruleUriSafeAttrOverride(config: RawDompurifyConfig): AuditFinding[];
export function ruleUriRegexpWeakened(config: RawDompurifyConfig): AuditFinding[];
export function ruleUriRegexpNotARegexp(config: RawDompurifyConfig): AuditFinding[];
export function ruleUnknownProtocolsNoPolicy(config: RawDompurifyConfig): AuditFinding[];
export function ruleDataAttrNameCollision(config: RawDompurifyConfig): AuditFinding[];
export function ruleScriptContextTag(config: RawDompurifyConfig): AuditFinding[]; export type Severity = 'high' | 'medium' | 'info' | 'unknown';
export type RawDompurifyConfig = Record<string, unknown>;01Capabilities
Does
- + Input validation
- + Security triage
- + HTML sanitizer configuration
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 1
Open an issue0 open · 0 answered · 0 fixed · 1 said it worked
- closedWorked for me — 140/140 vitest on Node 26.0.0, macOS 26.4Worked for me
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 24 source file(s) plus listing text
- capability contract All 0 observed capability reference(s) match the declared manifest
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 1.0.0 | stable | Aug 6, 2026 | First public release. |