Skip to content

vsix extensions that utilise webviews are blocked by CSP #4098

Closed
@bassforce86

Description

@bassforce86

Similar to #1530

vscode-webview.net is blocked by the current CSP, could it be considered to be adding to the allowlist?

Refused to load the stylesheet 'https://vscode-remote+localhost.vscode-resource.vscode-webview.net:1337/<$HOME>/.local/share/code-server/extensions/mhutchie.git-graph-1.30.0/media/out.min.css' 
because it violates the following Content Security Policy directive: "style-src https://*.vscode-webview.net 'unsafe-inline'". 
Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

Extension issue was found against: mhutchie/vscode-git-graph#535

Reproduction:

  • run code-server locally via any port
  • open code-server in Chrome / Firefox
  • install git-graph extension
  • open a folder with a git project open (so some history is shown)
  • open git graph
  • see that the view is broken. (caused by CSP blocking out.min.css)

Code Server Info:

code-server: v3.11.1
VS Code: v1.57.1
Commit: c680aae
Date: 2021-08-06T18:33:37Z
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.31 Safari/537.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions