This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25566 - [imports]: Supporting more than just the script-src CSP directive in imports.
Summary: [imports]: Supporting more than just the script-src CSP directive in imports.
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Morrita Hajime
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20683 24632
  Show dependency treegraph
 
Reported: 2014-05-06 03:00 UTC by Philip Rogers
Modified: 2015-07-06 08:12 UTC (History)
9 users (show)

See Also:


Attachments

Description Philip Rogers 2014-05-06 03:00:54 UTC
The Content Security Policy section of HTML Imports currently specifies: "Content Security Policy must restrict import loading through the script-src directive."

There seems to be a slight mismatch between the CSP directives and what HTML Imports supports. For example, I can imagine html imports being used for just html+css, or just svg without script.

I don't have a great suggestion for how to support this other than additional import types such as "import-src". Doing this would require spec'ing how the transitive CSP dependencies of imports works.
Comment 1 fbraun 2014-05-06 07:57:20 UTC
Let's make sure resolving this issue does not involve monkey patching the CSP spec :)

The web application security working group has discussed imports and CSP previously and came to the conclusion that it should indeed fall under the script-src directive: http://lists.w3.org/Archives/Public/public-webappsec/2013Apr/0079.html

(CCing Brad Hill)
Comment 2 Anne 2014-05-06 12:39:36 UTC
A thing you could potentially do here is have gradations. E.g. you could still allow loading HTML imports, but not execute their scripts.

Part of the problem here is that we do not really know what the declarative version will look like...
Comment 3 Hayato Ito 2015-07-06 08:12:33 UTC
Moved to https://github.com/w3c/webcomponents/issues/217