Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSP
Search
Ben Toews
January 10, 2013
Technology
320
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSP
Content Security Policy
Ben Toews
January 10, 2013
More Decks by Ben Toews
See All by Ben Toews
GitHub AppSec: Keeping up with 111 prolific engineers
mastahyeti
0
140
The sky is falling: Nephological tales of security woe
mastahyeti
0
59
State of the Union: Advances in Web Application and Browser Security
mastahyeti
2
130
Other Decks in Technology
See All in Technology
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
110
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.8k
Geolonia の開発現場における AIの活用について
miya0001
0
100
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
350
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
2.2k
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.7k
絵ではじめるKubernetesセキュリティ
aoi1
3
590
Claude Code本って、 読む必要あるの?
oikon48
2
460
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
320
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
Reactの設計論
uhyo
24
13k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
530
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Embracing the Ebb and Flow
colly
88
5.2k
Chasing Engaging Ingredients in Design
codingconduct
0
310
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
Google's AI Overviews - The New Search
badams
0
1.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
490
Transcript
csp ben toews github
the problem
None
<script>alert(123)</script>
the old fix
<script>alert(123)</script>
the problem
None
<script>alert(123)</script>
the new fix
csp
<a onclick=‘doit()’>123</a>
<a onclick=‘doit()’>123</a>
<a href=‘javascript:doit()’>123</a>
<a href=‘javascript:doit()’>123</a>
<a style=‘display: block’>123</a>
<a style=‘display: block’>123</a>
csp = no javascript + no css = 1995?
csp = source whitelisting!
X-Content-Security-Policy: default-src *; script-src https://github.com https://a24 8.e.akamai.net https://jobs.github.com h ttps://ssl.google-analytics.com
https://s ecure.gaug.es https://gist.github.com; s tyle-src https://github.com https://a248. e.akamai.net https://jobs.github.com htt ps://ssl.google-analytics.com https://sec ure.gaug.es https://gist.github.com 'uns afe-inline'; report-uri /errors Content-Se curity-Policy: default-src *; script-src htt ps://github.com https://a248.e.akamai.ne
Content-Security-Policy: X-WebKit-CSP: X-Content-Security-Policy:
default-src
script-src
style-src
object-src
img-src
media-src
frame-src
font-src
connect-src
Content-Security-Policy: img-scr ‘none’
Content-Security-Policy: img-scr ‘self’
Content-Security-Policy: img-scr ‘unsafe-inline’
Content-Security-Policy: img-scr ‘unsafe-eval’
Content-Security-Policy: img-scr https://me.com:443
ity-Policy: img-scr https:
ity-Policy: img-scr me.com
ity-Policy: img-scr *.me.com
ity-Policy: img-scr https://me.com
ity-Policy: img-scr me.com:443
Content-Security-Policy: default-src ‘self’; object-src h ttps://youtube.com; img-src http://foo.akami.com https://bar.akami.com;
report-uri
{ "csp-report": { "document-uri": "https://github.com/", "referrer": "", "blocked-uri": "self", "violated-directive":
"eval script base restriction", "source-file": "chrome://firebug/content/co...", "script-sample": "call to eval() or related...", "line-number": 166 } }
the end...