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

Remove 'unsafe-eval' from CSP #4387

Closed
3 tasks done
fregante opened this issue Sep 30, 2022 · 1 comment
Closed
3 tasks done

Remove 'unsafe-eval' from CSP #4387

fregante opened this issue Sep 30, 2022 · 1 comment
Assignees
Labels

Comments

@fregante
Copy link
Contributor

fregante commented Sep 30, 2022

'unsafe-eval' is not allowed in MV3’s manifest:

Screen Shot

Dropping it resurfaces:

Screen Shot

Tasks

Our options

  1. Get RJSF to add support for an eval-less validation library (either by asking nicely or by submitting as PR). We use: npmjs.com/package/@cfworker/json-schema. (I had actually looked at AJV previously but didn't use it because of eval)
  2. Move schema validation to the Chrome sandbox: Move template engine and brick evaluation to Chrome sandbox #105. This also would probably require modifying RJSF to support a custom validation function. This approach is nice because it also makes sense to move Nunjucks and JQ over there
  3. Modify AJV to not require Function
@fregante
Copy link
Contributor Author

I think this is already covered by our webpack MV3 upgrade script:

policy.remove("script-src", "'unsafe-eval'");

Once the RJSF fix is done, this won't require further changes.

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

1 participant