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

fix: allow cypress-axe to be used when csp is set to deny eval() #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RenFraser
Copy link

When 'unsafe-eval' is used on a web page, cypress-axe can't run because the injectAxe() function calls window.eval().

From the Mozilla docs:

Warning: Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use eval(). See Never use eval()!, below.

This commit updates the injectAxe() function to remove eval so that users of unsafe-eval can still use cypress-axe without having to override the injectAxe() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants