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

CSP violation 'script-src' 'unsafe-eval' in web-component and standalone package in angular #725

Closed
mbmwlr opened this issue May 2, 2023 · 4 comments
Labels

Comments

@mbmwlr
Copy link

mbmwlr commented May 2, 2023

Description
We are trying to implement the asyncapi renderer within an Angular application.
When adding a Content Security Policy limiting the 'script-src' to 'self', the package is blocked, as some the package tries to execute code via 'unsafe-eval'.

We tried both the web-component as well as the standalone version available in the 'next' branch.
Both yield the same result.

Expected result
Restrictive CSP is possible to enforce while using the package.

Actual result
CSP blocks the package.

Steps to reproduce
I compiled a small sample project demonstrating the error:
https://github.com/mbmwlr/angularAsyncApiTest

Troubleshooting
We are actively investigating the problem. If I have further information to narrow it down which package or line of code causes it, I will update.

Edit: This could be related, but not sure yet if and how it applies here:
okta/okta-auth-js#1128

@github-actions
Copy link

github-actions bot commented May 2, 2023

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented May 17, 2023

@mbmwlr do you have ideas how to solve it?

@mbmwlr
Copy link
Author

mbmwlr commented May 22, 2023

No, unfortunately not. I think maybe a package update is a viable option to explore, as it seems to be caused by an outdated dependency. But did not have the time to try it in depth. Initial try broke the whole package for me.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Sep 20, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants