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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/Security]: Convert inline manifest into separate file to improve CSP default settings #1263

Open
2 tasks done
jceb opened this issue Jan 16, 2024 · 0 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@jceb
Copy link
Contributor

jceb commented Jan 16, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 馃挕

The SSR (https://github.com/solidjs/solid-start/blob/main/packages/start/server/StartServer.tsx#L76) and SPA (https://github.com/solidjs/solid-start/blob/main/packages/start/server/spa/StartServer.tsx#L20) version use an inline script to define window.manifest. This makes Content Security Policy more difficult implement and leads to the use of less safe deaults like: script-src 'unsafe-inline'.

Furthermore, Chrome and Firefox don't allow browser extensions to use the CSP setting script-src 'unsafe-inline' (https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy). Therefore, Solid start can't be used to build browser extensions at the moment.

To work around this issue, the inline script should be converted into an external file that's imported.

Examples 馃寛

No response

Motivation 馃敠

No response

@jceb jceb added the enhancement New feature or request label Jan 16, 2024
@jceb jceb changed the title [Feature]: Convert inline manifest into separate file to improve CSP default settings [Feature/Security]: Convert inline manifest into separate file to improve CSP default settings Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant