Skip to content

only indirect eval should be allowlisted #3

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

Open
michaelficarra opened this issue Apr 4, 2025 · 0 comments
Open

only indirect eval should be allowlisted #3

michaelficarra opened this issue Apr 4, 2025 · 0 comments

Comments

@michaelficarra
Copy link

From the explainer, it appears that allowlisting a script hash will allow its use with both indirect eval and direct eval. Indirect eval of a given script has the same behaviour wherever it is evaluated. Because it can access the surrounding scope, direct eval of a given script can have different meanings in different places.

I'm assuming that the reason one may consider a particular script acceptable for addition to the allowlist is that it has been audited. If scripts may only be used with indirect eval, this can be done, but if scripts can be used with direct eval, all uses of direct eval anywhere on the page would need to be considered, and the audit must be done again any time any code in the vicinity of a direct eval is changed.

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

No branches or pull requests

1 participant