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
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
780
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
23
16k
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
880
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
240
「守り」で活用するオンデバイスLLM 〜写ってはいけないを総力戦で防ぐ〜 / iOSDC Japan 2026
nakamuuu
0
150
beyond jj: config & tools ecosystem
indirect
0
380
品質と信頼性を地続きにする
grimoh
0
350
LLMに渡さなかった仕事
nanaism
0
140
Claude Code本って、 読む必要あるの?
oikon48
2
460
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
1.8k
空間オーディオで過去の 自分(ゴースト)と競うランニング 〜HealthKitのルートを足音に変える実装〜
nao_randd
0
210
GoCon2026 - Open Source, Open World
sanposhiho
4
4.5k
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Producing Creativity
orderedlist
PRO
348
41k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
Abbi's Birthday
coloredviolet
4
10k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
ラッコキーワード サービス紹介資料
rakko
1
4.9M
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
Designing Experiences People Love
moore
143
24k
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...