ses 0.14.2 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/NEWS.md +60 -1
- package/README.md +0 -1
- package/dist/lockdown.cjs +1769 -992
- package/dist/lockdown.mjs +1769 -992
- package/dist/lockdown.umd.js +1769 -992
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +1769 -992
- package/dist/ses.mjs +1769 -992
- package/dist/ses.umd.js +1769 -992
- package/dist/ses.umd.min.js +1 -1
- package/index.d.ts +2 -1
- package/index.js +6 -13
- package/package.json +24 -11
- package/src/commons.js +44 -9
- package/src/compartment-evaluate.js +102 -0
- package/src/compartment-shim.js +78 -106
- package/src/enable-property-overrides.js +5 -4
- package/src/enablements.js +7 -2
- package/src/environment-options.js +125 -0
- package/src/error/assert.js +51 -39
- package/src/error/console.js +32 -14
- package/src/error/fatal-assert.js +2 -0
- package/src/error/stringify-utils.js +26 -3
- package/src/error/tame-console.js +12 -4
- package/src/error/tame-error-constructor.js +18 -17
- package/src/error/tame-v8-error-constructor.js +30 -14
- package/src/get-anonymous-intrinsics.js +11 -8
- package/src/get-source-url.js +4 -4
- package/src/global-object.js +33 -26
- package/src/intrinsics.js +76 -67
- package/src/lockdown-shim.js +111 -119
- package/src/make-eval-function.js +3 -5
- package/src/make-function-constructor.js +3 -4
- package/src/make-safe-evaluator.js +117 -0
- package/src/module-instance.js +31 -17
- package/src/module-link.js +11 -4
- package/src/module-load.js +169 -44
- package/src/module-proxy.js +12 -4
- package/src/scope-constants.js +6 -3
- package/src/scope-handler.js +41 -17
- package/src/tame-date-constructor.js +8 -2
- package/src/tame-domains.js +46 -0
- package/src/tame-function-constructors.js +1 -0
- package/src/tame-locale-methods.js +6 -6
- package/src/tame-math-object.js +2 -2
- package/src/tame-regexp-constructor.js +7 -7
- package/src/transforms.js +13 -6
- package/src/whitelist-intrinsics.js +9 -3
- package/src/evaluate.js +0 -98
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,70 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.15.1](https://github.com/endojs/endo/compare/ses@0.15.0...ses@0.15.1) (2021-11-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ses:** Add errorTrapping none to type definition ([#935](https://github.com/endojs/endo/issues/935)) ([313d47c](https://github.com/endojs/endo/commit/313d47c5a5c02afcd57e933ca876fec22a059972))
|
|
12
|
+
* **ses:** Include error in trapped error log ([#936](https://github.com/endojs/endo/issues/936)) ([22c4644](https://github.com/endojs/endo/commit/22c4644b6ad31c9eb7fdb4d760d91f8667e7a2c7))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.15.0](https://github.com/endojs/endo/compare/ses@0.14.4...ses@0.15.0) (2021-11-02)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ⚠ BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* **ses:** Withdraw support for muli-lockdown (#921)
|
|
22
|
+
* **ses:** Domain taming safe by default (#917)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **ses:** Read lockdown options from environment ([#871](https://github.com/endojs/endo/issues/871)) ([789d639](https://github.com/endojs/endo/commit/789d639c25c6882153a8090f4bd74d350bb29721))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **ses:** Domain taming safe by default ([#917](https://github.com/endojs/endo/issues/917)) ([7039276](https://github.com/endojs/endo/commit/7039276ef91a2de2b048c91085a7557c8830f677))
|
|
32
|
+
* **ses:** Withdraw support for muli-lockdown ([#921](https://github.com/endojs/endo/issues/921)) ([99752b0](https://github.com/endojs/endo/commit/99752b046c2a3e2d866559bb9d58f625eb94b1a8)), closes [#814](https://github.com/endojs/endo/issues/814)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### [0.14.4](https://github.com/endojs/endo/compare/ses@0.14.3...ses@0.14.4) (2021-10-15)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* **ses:** lazily create evaluate ([f1cf92a](https://github.com/endojs/endo/commit/f1cf92a3b8e23aab3894f8431d8b65b4f75daa77))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* **ses:** Add test and warning about the `has` hazard ([9066c97](https://github.com/endojs/endo/commit/9066c97b41b35a4e37fd12256a0802fb656af755))
|
|
47
|
+
* **ses:** more detailed `has` hazard test ([f010a9e](https://github.com/endojs/endo/commit/f010a9ebe09dadc72a8f22bd54caed8aa3787243))
|
|
48
|
+
* **ses:** Refactor Compartment to use shared evaluator ([dc0bad6](https://github.com/endojs/endo/commit/dc0bad6c1f963ff379e45f320852218228203050))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### [0.14.3](https://github.com/endojs/endo/compare/ses@0.14.2...ses@0.14.3) (2021-09-18)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* **eslint-plugin:** Add no-polymorphic-call rule ([03e8c5f](https://github.com/endojs/endo/commit/03e8c5f566a52d9d6e7fb9d876a67347ecf37324))
|
|
58
|
+
* **ses:** Lockdown option domainTaming ([ee3e4c3](https://github.com/endojs/endo/commit/ee3e4c309ece70249d6c95b806ca8d02549f1837))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Bug Fixes
|
|
62
|
+
|
|
63
|
+
* **ses:** Fix reflexive imports ([d259db7](https://github.com/endojs/endo/commit/d259db75022941c4ea1881b4ca4005acc1a37a1c))
|
|
64
|
+
* **ses:** Search engine optimization ([#886](https://github.com/endojs/endo/issues/886)) ([ef03184](https://github.com/endojs/endo/commit/ef031843b445a4a9df7b717fba7a315371eadae0))
|
|
65
|
+
* add "name" to moderate override of all errors ([#867](https://github.com/endojs/endo/issues/867)) ([d608325](https://github.com/endojs/endo/commit/d608325c3edade0c64f9ca9a84379f8d3e3addf0))
|
|
66
|
+
* update NEWS with news of [#867](https://github.com/endojs/endo/issues/867) ([#869](https://github.com/endojs/endo/issues/869)) ([c3139d2](https://github.com/endojs/endo/commit/c3139d2ff7433afce3653639fc71a65dbe3c6313))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
6
70
|
### [0.14.2](https://github.com/endojs/endo/compare/ses@0.14.1...ses@0.14.2) (2021-08-14)
|
|
7
71
|
|
|
8
72
|
**Note:** Version bump only for package ses
|
package/NEWS.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
User-visible changes in SES:
|
|
2
2
|
|
|
3
|
+
# 0.15.1 (2021-11-15)
|
|
4
|
+
|
|
5
|
+
- The TypeScript definition of `lockdown` now allows for the option
|
|
6
|
+
`"errorTrapping": "none"`.
|
|
7
|
+
- Fixes error trapping on the web, showing both the message (and stack) of any
|
|
8
|
+
error that throws out of the top of an event.
|
|
9
|
+
|
|
10
|
+
# 0.15.0 (2021-11-02)
|
|
11
|
+
|
|
12
|
+
- *BREAKING CHANGE*: The lockdown option `domainTaming` is now `safe` by
|
|
13
|
+
default, which will break any application that depends transtively on the
|
|
14
|
+
Node.js `domain` module.
|
|
15
|
+
Notably, [standard-things/esm](https://github.com/standard-things/esm)
|
|
16
|
+
uses domains and so SES will not support `node -r esm` going forward.
|
|
17
|
+
|
|
18
|
+
This protects against the unhardened `domain` property appearing on shared
|
|
19
|
+
objects like callbacks and promises.
|
|
20
|
+
This overcomes the last *known* obstacle toward object capability containment.
|
|
21
|
+
- Lockdown will now read options from the environment as defined by the Node.js
|
|
22
|
+
`process.env` parameter space.
|
|
23
|
+
- *BREAKING CHANGE*: Lockdown may no longer be called more than once.
|
|
24
|
+
Lockdown no longer returns a boolean to indicate whether it was effective
|
|
25
|
+
(true) or redundant (false). Instead, Lockdown will return undefined for
|
|
26
|
+
its first invocation or throw an error otherwise.
|
|
27
|
+
|
|
28
|
+
# 0.14.4 (2021-10-14)
|
|
29
|
+
|
|
30
|
+
- Fixes a defect in the per-compartment `Function` and `eval` functions, such
|
|
31
|
+
that these environments did not have the compartment's `globalLexicals`.
|
|
32
|
+
There is no known environment depending on this invariant for security
|
|
33
|
+
reasons, but such a scenario would be a program arranging a translator that
|
|
34
|
+
introduces run-time security checks, like metering, that depend on the
|
|
35
|
+
existence of a named global lexical.
|
|
36
|
+
[#898](https://github.com/endojs/endo/issues/898)
|
|
37
|
+
- The above fix incidentally improved the performance of compartment evaluation
|
|
38
|
+
for cases that do not require special global lexicals, by sharing a single
|
|
39
|
+
per-compartment evaluator.
|
|
40
|
+
|
|
41
|
+
# 0.14.3 (2021-09-18)
|
|
42
|
+
|
|
43
|
+
- Due to a peculiar bit of error handling code in Node 14, as explained at
|
|
44
|
+
[Hardened JavaScript interferes with Node.js 14 Error
|
|
45
|
+
construction](https://github.com/endojs/endo/issues/868),
|
|
46
|
+
we have added more overrides to the default `overrideTaming: 'moderate'`
|
|
47
|
+
setting. At this setting, assigning to the `name` property of a mutable error
|
|
48
|
+
instance should work. It will continue not to work at the `'min'` setting, so
|
|
49
|
+
use the default `'moderate'` setting if you need to.
|
|
50
|
+
- Adds a lockdown option `domainTaming` to detect whether Node.js domains have
|
|
51
|
+
been initialized and prevents them from being initialized afterward.
|
|
52
|
+
Domains otherwise presented a hazard to the integrity of SES containment on
|
|
53
|
+
Node.js.
|
|
54
|
+
The option defaults to `"unsafe"` in this version and will be switched to
|
|
55
|
+
`"safe"` by default in the next release that allows for breaking-changes, to
|
|
56
|
+
afford a gradual migration.
|
|
57
|
+
Thank you to @dominictarr with [Least Authority](https://leastauthority.com/)
|
|
58
|
+
for devising this feature.
|
|
59
|
+
- Fixes reflexive module imports. Previously, SES would fail to initialize a
|
|
60
|
+
module graph where a module imported an alias to itself.
|
|
61
|
+
|
|
3
62
|
# 0.14.1 (2021-08-12)
|
|
4
63
|
|
|
5
64
|
- Adds permits for `Array.prototype.at` and `String.prototype.at` which are
|
|
@@ -71,7 +130,7 @@ User-visible changes in SES:
|
|
|
71
130
|
mistake. Most useful as `overrideTaming: 'severe', overrideDebug:
|
|
72
131
|
['constructor']`.
|
|
73
132
|
- We reopened Safari bug
|
|
74
|
-
[Object.defineProperties triggering a setter](https://bugs.webkit.org/show_bug.cgi?id=222538#c17)
|
|
133
|
+
[Object.defineProperties triggering a setter](https://bugs.webkit.org/show_bug.cgi?id=222538#c17)
|
|
75
134
|
when we found that it was causing an infinite recursion initializing SES
|
|
76
135
|
on Safari.
|
|
77
136
|
- We revised an error message to include the error tag of a new error
|