Demystifying CSP for modern applications
summary
Shows a live restaurant review demo that intentionally injects XSS payloads and then applies CSP headers to prove which controls actually stop execution, using securityheaders.com and the CSP Evaluator to analyze real policies and claiming 95% bypassable for naive host‑based rules. Explains enabling inline scripts with hashes and nonces, protecting remote scripts with subresource integrity plus remote hashes, and enabling dependency loading via strict-dynamic and nonce propagation, and recommends report‑only testing and report URIs for safe rollout.
AI-written summary · about
chapters (13)
- 0:00Introduction to CSP
- 1:14CSP in the wild reality check
- 4:43What is CSP and why it matters
- 8:57CSP in action demo
- 13:29CSP as second line defense
- 15:33Enabling inline scripts safely
- 26:45Remote script loading pitfalls
- 33:45Hashes and subresource integrity
- 40:07Trust propagation with strict dynamic
- 45:50CSP for modern single page apps
- 53:56Backwards compatible CSP policies
- 56:21Other CSP features and report-only mode
- 1:00:14Key takeaways and closing
