-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat(ses): hostEvaluators
lockdown option
#2723
base: master
Are you sure you want to change the base?
Conversation
69a97f5
to
7e2b07a
Compare
fa54256
to
5793270
Compare
1e87397
to
063ec33
Compare
8cf7a5e
to
d0269ff
Compare
flakey test https://github.com/endojs/endo/actions/runs/13784820806/job/38550261268?pr=2723
|
consider expanding current evalTaming test for Hermes case endo/packages/ses/test/evalTaming-default.test.js Lines 4 to 21 in 088b746
|
088b746
to
6fb7d75
Compare
6fb7d75
to
1e5c83f
Compare
7aa0d3d
to
0def310
Compare
flakey test https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723 yarn workspace @endo/benchmark run install-engines
shell: /usr/bin/bash -e {0}
yarn version: 4.5.1
Installing engines...
Error installing XS or V8:
➤ YN0000: · Yarn 4.5.1
➤ YN0000: ┌ Resolution step
Resolution step
➤ YN0000: └ Completed in 0s 720ms
➤ YN0000: ┌ Fetch step
Fetch step
➤ YN0000: └ Completed in 0s 220ms
➤ YN0000: ┌ Link step
Link step
➤ YN0000: └ Completed in 1s 28ms
➤ YN0000: · Done in 2s 2ms
esvu ❯ version 1.2.16
XS ❯ Checking version...
esvu ✖ TypeError: body.find is not a function
at XSInstaller.resolveVersion (/tmp/xfs-4191b526/dlx-1965/node_modules/esvu/src/engines/xs.js:[3](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:3)7:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async XSInstaller.install (/tmp/xfs-[4](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:5)191b526/dlx-1965/node_modules/esvu/src/installer.js:4[5](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:6):21)
at async installEngine (/tmp/xfs-4191b52[6](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:7)/dlx-1965/node_modules/esvu/src/bin.js:121:3)
at async main (/tmp/xfs-4191b526/dlx-1965/node_modules/esvu/src/bin.js:168:[7](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:8))
esvu ✖ Some engines were not installed.
➤ YN0000: · Yarn 4.5.1
➤ YN0000: ┌ Resolution step
Resolution step
➤ YN0000: └ Completed in 0s 712ms
➤ YN0000: ┌ Fetch step
Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
Link step
➤ YN0000: └ Completed in 1s
➤ YN0000: · Done in 1s [8](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:9)04ms
esvu ❯ version 1.2.16
V8 ❯ Checking version...
V8 ❯ Installing version 13.6.46
V8 ❯ Downloading https://storage.googleapis.com/chromium-v8/official/canary/v8-linux64-rel-13.6.46.zip
V8 ❯ Extracting /tmp/esvu-87ab78401[9](https://github.com/endojs/endo/actions/runs/13815628699/job/38647946438?pr=2723#step:6:10)4352020570b4679677fb0d.zip
V8 ❯ Installing /tmp/esvu-87ab7840194352020570b4679677fb0d.zip-extracted
V8 ❯ Testing...
V8 ✔ Installed with bin entries: v8
esvu ✖ Some engines were not installed.
Error: Process completed with exit code 1. endo/packages/benchmark/install-engines.sh Lines 12 to 18 in 0def310
perhaps it could be worth falling back on jsvu when esvu fails @muhammadahmadasifbhatti |
Co-authored-by: Zbyszek Tenerowicz <naugtur@gmail.com>
0def310
to
25407a9
Compare
Unless there is a surprise, I request that #2739 get merged before this one, and then this one adjust to that. Thanks. |
Closes: #XXXX Refs: #961 #2690 #2723 ## Description #961 deviated from our general convention that lockdown option values be kebob-case, instead adding `evalTaming:` option values `safeEval`, `unsafeEval`, `noEval`. (I approved #961 at the time, apparently without noticing this discrepancy.) This PR fixes those to be `safe-eval`, `unsafe-eval`, and `no-eval`. But to avoid breaking any old usage, this PR ensure the only names continue to work for now, but always commented in the code as "deprecated". This PR does only that. Other changes to the relevant lockdown option or relevant lockdown options machinery are left to #2723 or #2690 respectively. I request that this PR go first, with those others adjusting to this one. ### Security Considerations none ### Scaling Considerations non ### Documentation Considerations This PR simply changes the documentation to use the new names without ever mentioning the deprecated old names. That seems like an appropriate simplification for the docs. ### Testing Considerations With a bit of duplication and renaming, we now test the new names and the old deprecated names. ### Compatibility Considerations To avoid breaking any old usage, this PR ensure the only names continue to work for now, but always commented in the code as "deprecated". It would be very nice to eventually be able to retire the deprecated names, but I find it hard to imagine how we'd test that it is safe to do so. ### Upgrade Considerations Nothing BREAKING, since the old deprecated names continue to work. - [x] Update `NEWS.md` for user-facing changes.
Refs: #1891 (tracker), tested on #2334, Endo Sync: 2025-01-29
TODO
legacyHermesTaming: safe (default), unsafe4th option undefined, warn (with new error reporter) to use the new lockdown optionsince getEnvironmentOption default must be a string ('all'), warn instead of SES_DIRECT_EVAL error with a strict CSPdisable compartment-shim when bundling ses for hermesdisable: globalThis Compartment and testCompartmentHooksFollow-up: new Compartment() fails on removeUnpermittedIntrinsics at
Tolerating undeletable intrinsics.%CompartmentPrototype%.importNow.prototype === undefined
Uncaught TypeError: property is not configurable
test branch https://github.com/endojs/endo/tree/ses-hermes-p2 (from #2334)
yarn build:hermes
bundle ses for hermesyarn test:hermes
run ses/test/_hermes-smoke.jsHermes eval behaviour on
bin/hermesc
(standalone compiler) andbin/hermes
(vm, eshost)