Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webview does not set a content security policy #171

Open
mjbvz opened this issue Aug 16, 2019 · 1 comment · May be fixed by #306
Open

Webview does not set a content security policy #171

mjbvz opened this issue Aug 16, 2019 · 1 comment · May be fixed by #306
Assignees

Comments

@mjbvz
Copy link

mjbvz commented Aug 16, 2019

Hi, I'm the developer of VS Code's webview API. I noticed that your extension seems to create a webview that does not set a content security policy. All webviews (even very simple ones) should set a content security policy. This helps limit the potential impact of content injections and is generally a good measure for defense in depth.

We've documented how to add a content security policy to VS Code webviews here. Please add the most restrictive content security policy possible to your webview. I am not aware of any immediate security issues with your extension but having a restrictive content security policy is important to help protect users of your extension.


Also note that in development mode, in VS Code 1.38 you should also see a warning if you create a webview that does not set a content security policy: microsoft/vscode#79248

@akaroml
Copy link
Member

akaroml commented Aug 19, 2019

Ack.

That will be addressed in the coming release.

@akaroml akaroml self-assigned this Aug 19, 2019
@zzeebbii zzeebbii linked a pull request Feb 6, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants