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

Allow extra intrinsic when running lockdown #925

Closed
Jack-Works opened this issue Nov 3, 2021 · 2 comments
Closed

Allow extra intrinsic when running lockdown #925

Jack-Works opened this issue Nov 3, 2021 · 2 comments
Assignees

Comments

@Jack-Works
Copy link
Contributor

image

I want to configure my environment to use some new proposals like iterator helpers but lockdown will remove them. Is it possible to specify extra allowed intrinsic when running lockdown?

@kriskowal
Copy link
Member

kriskowal commented Nov 3, 2021

The relevant issue to pile on is #318. The idea of record is to separate repair() and lockdown() such that “shims” can be applied in between those phases, and that we need to reveal some API that allows shims to alter the lockdown permits (currently the “whitelist” in SES source). This specific case might look something like:

lockdown.repair();
lockdown.permits.Symbol.asyncDispose = asyncFunctionPermit;
lockdown();

Where repair() is an preparation step factored out of lockdown() that the user can optionally call beforehand, and permits is the graph of lockdown permits, exposed so shims can alter them before lockdown.

@kriskowal
Copy link
Member

@Jack-Works please consider closing this issue as a duplicate and resuming the conversation on #318.

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

2 participants