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

content security policy need to have unsafe-eval to render the generated event page from AWS event bridge #497

Open
1 task done
wliew99 opened this issue Apr 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wliew99
Copy link

wliew99 commented Apr 1, 2024

Have you read the Contributing Guidelines on issues?

Description

Cannot render the generated events without granting unsafe-eval to the content security policy, which is very concerning as it opens up room for cross site scripting attack.

Steps to reproduce

content security policy on CloudFront distribution to serve s3 static files build from event catalog have
default-src https: wss: 'self'; style-src https: 'unsafe-inline'

If i changed content security policy to default-src https: wss: 'unsafe-eval'; style-src https: 'unsafe-inline' then everything is fine.

When drilling down to our generated event details page (from plugin generation from EB), getting this on client side
image

F12 console gave this
image
image

Expected behavior

the generated event page to be rendered with default-src https: wss: 'self'; style-src https: 'unsafe-inline'

Actual behavior

got client side exception as it's looking for unsafe-eval to be part of CSP

Your environment

  • EventCatalog version used: 1.2.5
  • Plugin generator against EB: ^0.0.12
  • Environment name and version (e.g. Edge for Business 123.0 and Chrome 123.0, Node.js 18.19.1):
  • Operating system and version (e.g. Ubuntu 22.04 LTS):
@wliew99 wliew99 added the bug Something isn't working label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant