~/talk

Securing Angular with Trusted Types

Talkat NG-DE Conference 2022 · 2022-10-06..10-07· [security, angular]
slides:none on file

Claims that enabling require-trusted-types-for 'script' plus allowing Angular’s built-in policy prevents DOM-based XSS by making innerHTML accept only TrustedHTML objects, and that Google observed no DOM XSS after adoption. Shows how Angular sanitizer auto-creates TrustedHTML, and how risky calls like bypassSecurityTrustHtml, direct innerHTML via ViewChild/ElementRef or Renderer2 bypass protections. Recommends enabling Trusted Types in development, vetting each of the ~15 errors it may reveal, and using a default policy with DOMPurify or polyfills for non‑Chromium browsers.

AI-written summary · about

  1. 0:00Intro
  2. 4:17Angular
  3. 8:39Bypass Security
  4. 14:03Trusted Types
  5. 14:18Danger
  6. 14:55Unsafe Bypass
  7. 15:36Browser Support
  8. 18:14Takeaway
  9. 21:55Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.