~/talk

Content Security Policies: Let's Break Stuff

Talkat Dutch PHP Conference 2018 · 2018-06-07..06-09· [security]
slides:none on file

Explains how Content Security Policy actually works: it blocks injected scripts (LastPass script-injection example), caused a production rollout to break until report-only mode and reporting were used, and uses cryptographic nonces to allow trusted inline scripts. Live failure reports go to Report URI instead of building a dashboard. Cites concrete risks (XSS major vector), the need to iterate policies, and an incident where misconfigured CSP reporting generated ~45,000 requests/sec and overloaded the collector.

AI-written summary · about

  1. 0:00Start
  2. 0:58Break production sites with incorrectly configured content security policies
  3. 1:33THE SCARY STUFF
  4. 2:58Of those browser based vulnerabilities, 86% were found to be XSS related
  5. 6:08HACKERS ASSAULT EPILEPSY PATIENTS VIA COMPUTER
  6. 10:47HTTP RESPONSE HEADER TO HELP REDUCE XSS RISKS
  7. 11:57DECLARES WHAT RESOURCES ARE ALLOWED TO LOAD
  8. 12:54BLOCKING THOSE PESKY CRYPTO-MINING SCRIPTS THAT HAVE BEEN POPPING UP
  9. 13:47BROWSER SUPPORT
  10. 18:44DON'T USE UNSAFE- INLINE
  11. 21:30I BROKE PRODUCTION WITH A BAD CSP
  12. 21:48DON'T DO WHAT I DID
  13. 23:45WHEN A POLICY FAILURE OCCURS, THE BROWSER SENDS A JSON PAYLOAD TO THAT URL
  14. 25:00REPORT-URI.IO
  15. 28:01TRIAL STUFF BEFORE ENFORCING
  16. 31:10Write a helper in your template engine to generate script tags with a nonce if it's available
  17. 42:28DEMO TIME! LET'S BREAK STUFF
~/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.