TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reshaping web defenses with strict Content Security Policy

98 pointsby syjerover 8 years ago

9 comments

Animatsover 8 years ago
If browsers were serious about cross-site content issues, Google Ads wouldn&#x27;t work. Google insists in their policies that their ads must not be placed in IFRAME blocks,[1] where they can&#x27;t see the page context. Yet, for security, you want any outside content that executes code sandboxed in an IFRAME.<p>[1] <a href="https:&#x2F;&#x2F;support.google.com&#x2F;adsense&#x2F;answer&#x2F;3394713?hl=en" rel="nofollow">https:&#x2F;&#x2F;support.google.com&#x2F;adsense&#x2F;answer&#x2F;3394713?hl=en</a>
评论 #12587685 未加载
评论 #12587450 未加载
niftichover 8 years ago
This tool they just released, is hopefully helpful, and will help site administrators craft specific CSPs for specific parts of their site -- other, more generic tools already exist.<p>On the HN thread on the cited study, I posted [1] that C-S-P is &#x27;another damn header&#x27; that has to be included to stay secure and, unlike many of the &#x27;other damn headers&#x27;, its value is hopefully fine-tuned to the particular protected resource, unlike a site-wide hardcoded string.<p>I think more so than another configuration helper tool, what the Web really needs is a CSP rule engine evaluator that allows rules to be specified declaratively ahead of time, and integrates with some existing web framework to allow the resulting C-S-P value to be spliced into the outgoing response. Portions of this approach are implicitly proposed by OWASP here [2], but I&#x27;ve yet to see it written down formally, as opposed to just some code example. Widely adopting this approach would result in a paradigm shift that lifts C-S-P from &#x27;just a header&#x27; to a first-class construct integral to the operation of the web application.<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12408680" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12408680</a><p>[2] <a href="https:&#x2F;&#x2F;www.owasp.org&#x2F;index.php&#x2F;Content_Security_Policy#Countermeasure" rel="nofollow">https:&#x2F;&#x2F;www.owasp.org&#x2F;index.php&#x2F;Content_Security_Policy#Coun...</a>
Alex3917over 8 years ago
Fantastic tool, though it seems to have a couple possible issues:<p>- Doesn&#x27;t properly take into account default-src. We have default-src &#x27;none&#x27;, but it&#x27;s telling us that we haven&#x27;t set object-src to none.<p>- Says &quot;Directive &#x27;meta&#x27; is not a known CSP directive&quot;, despite the advice to use the meta tag here: <a href="http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;security&#x2F;content-security-policy&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;security&#x2F;content-secu...</a><p>For reference these are the issues that came up with the CSP on the front end for our oembed:<p><a href="https:&#x2F;&#x2F;oembed.fwdeveryone.com?threadId=Nh4apRjSR7qS5y4aGd3NMA" rel="nofollow">https:&#x2F;&#x2F;oembed.fwdeveryone.com?threadId=Nh4apRjSR7qS5y4aGd3N...</a>
aegarbuttover 8 years ago
They really missed an opportunity to have their URL be <a href="https:&#x2F;&#x2F;evaluate-csp.withgoogle.com" rel="nofollow">https:&#x2F;&#x2F;evaluate-csp.withgoogle.com</a><p>Rolls off the tongue better than <a href="https:&#x2F;&#x2F;csp-evaluator.withgoogle.com" rel="nofollow">https:&#x2F;&#x2F;csp-evaluator.withgoogle.com</a>.
评论 #12586021 未加载
phs318uover 8 years ago
This stuff is not my area of expertise but am I correct in assuming we&#x27;re talking about a &quot;checker checker&quot;?<p>In which case, quis checks ipsos checkers? ie will we eventually find we need a checker checker checker, and so on ad infinitum?
intrasightover 8 years ago
And there are a dozen third-party scripts injected into this article.
zerognowlover 8 years ago
CSP is another baseline config that web application developers consistently don&#x27;t include for whatever reason. It could be plain ignorance, but I think it goes deeper than that: I think CSP is too specific for the larger problem at hand which is Javascript itself. If I want to perform XSS on a site, I will find a way. There are still unpatched SVG vectors I can use in Chrome which have gone un-noticed for the longest time, and they will, can, and are being used today. There&#x27;s just too many code paths in browsers to exploit, and CSP only partially addresses the problem. I&#x27;m still seeing TrueType libraries from the 90s executing arbitrary code in browsers, and it&#x27;s 2016.
评论 #12584857 未加载
评论 #12585234 未加载
anaptdemiseover 8 years ago
Can&#x27;t load on iPad with Focus filter...
ilakshover 8 years ago
Did they fix the problem where target=&quot;_blank&quot; gives that linked page complete access to the page?
评论 #12586902 未加载