-
-
Save tgrecojs/04ffbabf552df0a6a4463447b2da0d9b to your computer and use it in GitHub Desktop.
lockdown example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import 'ses'; | |
lockdown(); | |
const isFrozen = x => Object.isFrozen(x); | |
const c1 = new Compartment({ console, Date }); | |
c1.evaluate(` | |
console.log(globalThis); | |
return {name: 'super secret secure string'} | |
`); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "quick-server", | |
"version": "1.0.0", | |
"bin": "./index.js", | |
"dependencies": { | |
"ses": "1.1.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment