Newsgroups: mozilla.dev.security
From: Sid Stamm <s...@mozilla.com>
Date: Tue, 07 Jul 2009 17:43:38 -0700
Local: Tues, Jul 7 2009 8:43 pm
Subject: Re: Content Security Policy Spec questions and feedback
Hi Dan,
You raise some excellent questions... you know, I hadn't really thought Daniel Veditz wrote: I think we need to send the URI of the protected document as the > Just jumping off here on a related topic: What do we send as the > "blocked-uri" when we find inline script? Since this is perhaps the most > common injection type this would be a good one for an example. blocked-uri, since the inline scripts live in there. > I suppose we could leave blocked-uri empty and let people infer that it As far as the report details go.... since inline scripts violate a base > was inline script from the violated directive. I'd rather be explicit > about it, but then "blocked-uri" might be the wrong name. Or do we leave > the blocked-uri empty (absent, or present-but-empty?) and use a keyword > like <violated-directive>inline script</violated-directive> restriction of CSP, maybe we should change up the violation report format a bit. How about this: the report either contains a "violated-directive" field or "violated-base-restriction" field. If a directive is violated due to a resource load (like an image), the "violated-directive" field is sent. If it is a base restriction, such as inline script, the "violated-base-restriction" field is sent. We can formalize the names of each base restriction for inclusion in the report. Here's an example, as I propose: And then the new schema would require one of either the > For clarification, if the entire policy was "allow self othersite.com" There's arguments for both choices: > and we tried to load an image in violation of that policy, would the > violated-directive be the implied img-src or the allow fall-back that is > actually specified? I imagine it would be the allow directive. 1. We could send the "allow" directive for ease in figuring out which directive was violated; this is the most straightforward report. 2. We could send the "img-src" directive: the recipient of the report may want to know that the blocked URI was requested for display as an image. Maybe we can compromise and say something like: Thoughts? -Sid You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||