~/talk

Securing Angular with Trusted Types

Talkat NG-BE 2021 · 2021-12-02..12-03· [security, angular]
slides:none on file

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

  1. 0:00Start
  2. 6:16Sanitization
  3. 7:45Bypass Security Trust
  4. 8:33Leaving the Angular Environment
  5. 10:32Trusted Types
  6. 18:10Angular Unsafe Bypass
  7. 24:32Default Trusted Types Policy
~/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.