question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FEAT: Support Content-Security-Policy

See original GitHub issue

To 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:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
artfcommented, Aug 5, 2021

ok then, I’ll try to fix it for the next release.

0reactions
aimeoscommented, Aug 5, 2021

@artf Guess, browsers block certain dynamic function declarations (new Function('<string>')) and function calls / language constructs (e.g. eval) when CSP is activated.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found