Skip to content

Commit

Permalink
feat(ses,pass-style): use no-trapping integrity level for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Dec 31, 2024
1 parent aed8d00 commit 6bbdc1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 1 addition & 4 deletions packages/no-trapping-shim/test/no-trapping-shim.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import '../src/no-trapping-shim.js';
// TODO make compat with ses and uncomment
// import test from '@endo/ses-ava/prepare-endo.js';
// instead of
import test from 'ava';
import test from '@endo/ses-ava/prepare-endo.js';

Check failure on line 2 in packages/no-trapping-shim/test/no-trapping-shim.test.js

View workflow job for this annotation

GitHub Actions / lint

'@endo/ses-ava' should be listed in the project's dependencies. Run 'npm i -S @endo/ses-ava' to add it

const { freeze, isFrozen } = Object;

Expand Down
8 changes: 8 additions & 0 deletions packages/ses/src/permits.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ export const permitted = {
groupBy: fn,
// Seen on QuickJS
__getClass: false,
// https://github.com/endojs/endo/pull/2673
isNoTrapping: fn,
suppressTrapping: fn,
},

'%ObjectPrototype%': {
Expand Down Expand Up @@ -1624,12 +1627,17 @@ export const permitted = {
set: fn,
setPrototypeOf: fn,
'@@toStringTag': 'string',
// https://github.com/endojs/endo/pull/2673
isNoTrapping: fn,
suppressTrapping: fn,
},

Proxy: {
// Properties of the Proxy Constructor
'[[Proto]]': '%FunctionPrototype%',
revocable: fn,
// https://github.com/endojs/endo/pull/2673
prototype: 'undefined',
},

// Appendix B
Expand Down

0 comments on commit 6bbdc1a

Please sign in to comment.