Securing Angular with Trusted Types
summary
Claims that Trusted Types can largely eliminate DOM‑based XSS by rejecting text assignments to dangerous sinks such as innerHTML, requiring a Content‑Security‑Policy header and a trusted types policy to produce a TrustedHTML value. Angular (since v11) emits Trusted Types and still sanitizes innerHTML but bypassSecurityTrustHtml and direct DOM via elementRef/Renderer2 reintroduce risk. Chrome/Chromium support enforcement, Firefox/Safari do not but polyfills help. Google reports ~61% of previously missed XSS are caught; default policies can blunt vulnerable third‑party libs like bootstrap.
AI-written summary · about
chapters (7)
- 0:00Start
- 6:16Sanitization
- 7:45Bypass Security Trust
- 8:33Leaving the Angular Environment
- 10:32Trusted Types
- 18:10Angular Unsafe Bypass
- 24:32Default Trusted Types Policy
related talks
25mSecuring Angular with Trusted Types
57mTrusted Types: A World Without XSS
36mSecuring the DOM from the Bottom Up
16mEliminating XSS Angular applications by adopting TT
31mSecuring the DOM from the Bottom Up
24mSecurity in Angular 2
17mThere's Safety in Angular
31mBoosting the security of your Angular 2 application
