Trusted Types enforced via CSP - deterministic DOM-XSS mitigation
Trusted Types is a browser security feature, turned on through the Content Security Policy (CSP) header with the directive 'require-trusted-types-for script', that prevents a whole class of cross-site scripting (XSS) attacks from working, specifically the ones that abuse functions like innerHTML, eval, or document.write. This check found Trusted Types enforced on this site. This is a positive finding, and a strong one: it's the only browser-level protection that fully and deterministically prevents DOM-based XSS attacks through these specific sinks, rather than just making them harder. Industry security guidance treats it as the recommended defence against injection-class vulnerabilities, and only a small fraction of sites, roughly the top 5 percent, actually have it enabled, so this puts the site in genuinely strong company. No fix needed, this is already excellent. Your developer should review the Trusted Types policy whenever a new client-side library is added that touches innerHTML or eval, to make sure the new library's behaviour is compatible with the policy rather than accidentally breaking it or needing an exception carved out.
Why this matters
This is a positive finding, and a strong one: it's the only browser-level protection that fully and deterministically prevents DOM-based XSS attacks through these specific sinks, rather than just making them harder. Industry security guidance treats it as the recommended defence against injection-class vulnerabilities, and only a small fraction of sites, roughly the top 5 percent, actually have it enabled, so this puts the site in genuinely strong company.
How to fix it
No fix needed, this is already excellent. Your developer should review the Trusted Types policy whenever a new client-side library is added that touches innerHTML or eval, to make sure the new library's behaviour is compatible with the policy rather than accidentally breaking it or needing an exception carved out.