~/talk

Content Security Policies: Let's Break Stuff

Talkat ScotlandPHP 2017 · on Saturday, 2017-11-04· [security]
slides:none on file

Content Security Policy reduces XSS risk by declaring allowed resource origins and blocking others; demo shows default-src/script-src/style-src/img-src/form-action directives, upgrade-insecure-requests, and using a cryptographic nonce per request to allow necessary inline scripts. A middleware and demo site deploy CSP and initially breaks production (extensions like LastPass and some users' browsers fail); adding a report-uri.io endpoint and using report-only mode yields JSON violation reports (thousands of noisy reports at first), letting CI plus Selenium-driven browsers validate and tighten policy safely.

AI-written summary · about

  1. 0:00Introduction to CSP talk
  2. 1:02Speaker background and agenda
  3. 9:58What is cross-site scripting?
  4. 19:13How CSP reduces XSS risks
  5. 23:27Debugging CSP violations with Report URI
  6. 26:19Best practices for CSP implementation
  7. 28:29Demo: Breaking stuff with CSP
  8. 34:30Fixing CSP issues in the demo
  9. 39:06Resources and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.