~/talk

No More XSS: Deploying CSP with nonces and strict-dynamic

Talkat BSidesSF 2018 · on Sunday, 2018-04-15· [security, web-platform]
links:none on file
slides:none on file

Deploys a strict CSP using 128-bit base64 nonces plus hashes for cached pages, adds nonce-generation middleware, and rolls policy in report-only before turning it on. Uses strict-dynamic so trusted scripts can load their own dependencies instead of maintaining huge whitelists. Instapaper rollout completes in about a week; Pinterest migration is simpler on top of an existing CSP. Result: historical XSS incidents become lower-risk HTML injection; nonces have ~80% browser support, strict-dynamic still lacks IE11/Edge/Safari support.

AI-written summary · about

  1. 0:00Introduction
  2. 0:47Agenda
  3. 1:25Crosssite scripting
  4. 3:27Templates and autoescape
  5. 4:08No crosssite scripting
  6. 5:28Content security policy
  7. 6:11Domain whitelist
  8. 7:13Object source base URI
  9. 8:35HTML injection
  10. 11:04Inline scripts
  11. 12:23CSP nonces
  12. 13:37What can go wrong
  13. 14:30Hashes
  14. 15:44Whitelisting
  15. 17:46Strictdynamic
  16. 18:44JavaScript templates
  17. 19:54Deploying CSP
  18. 20:04Easier to deploy
  19. 20:34Code changes
  20. 21:32Nonces
  21. 22:33Change templates
  22. 23:14Report only mode
  23. 24:15CSP policy
  24. 25:23Resources
  25. 26:45Questions
  26. 28:29Report URL
~/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.