Using Content Security Policy for Privacy
summary
Pinterest uses Content Security Policy to block any network requests to domains not on an allow list, creating a centralized schema in the code repo that gives full inventory of third‑party SDKs and gates onboarding by alerting privacy and legal. Deployment uses report-only mode with report URI query parameters and gradual rollout percentages, implements per-consent policies and multiple CSP headers to handle nonces, and documents pitfalls: nonces override host allow lists, iframes bypass CSP, JavaScript integrations are high risk, and older Safari needs special handling.
AI-written summary · about
chapters (9)
- 0:00CSP for privacy intro
- 1:13Third-party data sharing importance
- 2:35How CSP works
- 3:40CSP benefits beyond security
- 4:23Dynamic CSP for consent
- 5:27Deploying CSP step by step
- 7:15Nonces and hashes in CSP
- 8:19High-risk third-party assets
- 9:23CSP limitations and checks
related talks
32mWhat is CSP and Why Haven't You Applied it Yet
17mContent Security Policy: The application security Swiss Army Knife
46mContent Security Policies: Let's Break Stuff
16mA practical guide to implementing Content Security Policy (CSP) to secure Client-side
58mFixing XSS with Content Security Policy
29mNo More XSS: Deploying CSP with nonces and strict-dynamic
01h 04mCSP XXP STS PKP CAA ETC OMG WTF BBQ…
24mTowards a post-XSS world.
