FEAT: Support Content-Security-Policy
See original GitHub issueTo reduce the possible attack surface if the editor is used in “hostile” environments (e.g. in SaaS platforms) support for CSP is required. This will also prevent problems like https://github.com/artf/grapesjs/issues/3082
At the moment, the only problem that prevents effective CSP rules is the use of new Function()
in the GrapesJS code, which requires a CSP rule of unsafe-eval
.
Is there a different way to implement that?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Content Security Policy 1.0 | Can I use... Support ... - CanIUse
Mitigate cross-site scripting attacks by only allowing certain sources of script, style, and other resources. Usage % of. all users, all tracked, tracked ......
Read more >Content Security Policy (CSP) - HTTP - MDN Web Docs
Chrome Edge
Content‑Security‑Policy Full support. Chrome25. more. Toggle history Full sup...
base‑uri Full support. Chrome40. Toggle history Full sup...
block‑all‑mixed‑content. Deprecated Full support. ChromeYes. Toggle history...
Read more >Content Security Policy - OWASP Foundation
Content Security Policy on the main website for The OWASP Foundation. OWASP is a nonprofit foundation that works to improve the security of...
Read more >Content Security Policy (CSP) Header Not Set - OWASP ZAP
Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header, to achieve optimal browser support ......
Read more >How can a Content Security Policy prevent XSS and other ...
Keeping code safe in the era of cybercrime is no small feat, and many ... It provides support against difficult-to-spot XSS vulnerabilities.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok then, I’ll try to fix it for the next release.
@artf Guess, browsers block certain dynamic function declarations (
new Function('<string>')
) and function calls / language constructs (e.g.eval
) when CSP is activated.