Pushing CSP to PROD
summary
Case study of deploying a strict CSP on SendSafely.com: team sets default-src 'none', moves all JS to static.sendsafely.com, strips inline handlers to event listeners and data-attributes, hosts jQuery locally and negotiates reCAPTCHA changes with Google. Built a violation reporting endpoint and servlet filter for browser-specific headers; reports flood in from extensions (LastPass/analytics), creating surprising noise. CSP reduces XSS risk in practice but hits quirks: web workers require same origin, Java applet bypass in browsers, and reporting formats vary by browser.
AI-written summary · about
chapters (11)
- 0:00Start
- 3:22Browser Support for CSP
- 6:58About the Application
- 13:15Eliminating In-line Scripting (Example #2)
- 16:09Working with Third Party Scripts . We try to minimize reliance on third party scripts - Occasionally the cost/benefit is worth using them
- 19:20Refactoring reCAPTCHA (Example #1)
- 33:48Example CSP Error Report
- 35:55Real CSP Error Report from Production
- 37:48The (big) problem with False Positives
- 43:26Maximizing Browser Coverage
- 46:52Other Notable Differences • Safari posts CSP Error Reports
related talks
32mWhat is CSP and Why Haven't You Applied it Yet
47mRestricting The Scripts, You're To Blame, You Give CSP A Bad Name
24mTowards a post-XSS world.
01h 01mA Successful Mess Between Hardening And Mitigation
53mI Wanna Deploy You, but My Senses Tell Me to ...
39mRoadblocks for CSP and Where to Find Them
01h 04mCSP XXP STS PKP CAA ETC OMG WTF BBQ…
29mNo More XSS: Deploying CSP with nonces and strict-dynamic
