ses 0.14.3 → 0.15.2
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 +60 -0
- package/NEWS.md +51 -1
- package/dist/lockdown.cjs +3090 -3792
- package/dist/lockdown.mjs +3090 -3792
- package/dist/lockdown.umd.js +3090 -3792
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +3090 -3792
- package/dist/ses.mjs +3090 -3792
- package/dist/ses.umd.js +3090 -3792
- package/dist/ses.umd.min.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -11
- package/package.json +8 -8
- package/src/compartment-evaluate.js +58 -28
- package/src/compartment-shim.js +44 -27
- package/src/environment-options.js +125 -0
- package/src/error/stringify-utils.js +24 -1
- package/src/error/tame-console.js +1 -3
- package/src/global-object.js +33 -26
- package/src/lockdown-shim.js +91 -109
- package/src/make-eval-function.js +3 -5
- package/src/make-function-constructor.js +3 -4
- package/src/make-hardener.js +2 -2
- package/src/make-safe-evaluator.js +117 -0
- package/src/scope-handler.js +13 -2
- package/src/whitelist-intrinsics.js +3 -3
- package/src/whitelist.js +13 -0
- package/src/evaluate.js +0 -102
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,66 @@
|
|
|
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.2](https://github.com/endojs/endo/compare/ses@0.15.1...ses@0.15.2) (2021-12-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ses:** Constrain URL types in bundle script ([bdd7996](https://github.com/endojs/endo/commit/bdd79964c56e1716113f2b852f39eb3af3022742))
|
|
12
|
+
* **ses:** Send removal warnings to STDERR ([#949](https://github.com/endojs/endo/issues/949)) ([761774c](https://github.com/endojs/endo/commit/761774c25d318d675c3e665f6112ff946ac7b59c))
|
|
13
|
+
* **ses:** Windows support for bundle build script ([f8c6885](https://github.com/endojs/endo/commit/f8c6885116c52436e2fb675c1544bc765a1dd0f1))
|
|
14
|
+
* **ses:** Windows support for tests ([3bc504b](https://github.com/endojs/endo/commit/3bc504b5356d13e1411d127cefc7ad3bc99fbfa5))
|
|
15
|
+
* Avoid eslint globs for Windows ([4b4f3cc](https://github.com/endojs/endo/commit/4b4f3ccaf3f5e8d53faefb4264db343dd603bf80))
|
|
16
|
+
* update whitelist with stage 3 and 4 proposals ([#946](https://github.com/endojs/endo/issues/946)) ([8112430](https://github.com/endojs/endo/commit/811243015cc2e3e588080ceef6146b7b5e42f2bb))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### [0.15.1](https://github.com/endojs/endo/compare/ses@0.15.0...ses@0.15.1) (2021-11-16)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **ses:** Add errorTrapping none to type definition ([#935](https://github.com/endojs/endo/issues/935)) ([313d47c](https://github.com/endojs/endo/commit/313d47c5a5c02afcd57e933ca876fec22a059972))
|
|
26
|
+
* **ses:** Include error in trapped error log ([#936](https://github.com/endojs/endo/issues/936)) ([22c4644](https://github.com/endojs/endo/commit/22c4644b6ad31c9eb7fdb4d760d91f8667e7a2c7))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.15.0](https://github.com/endojs/endo/compare/ses@0.14.4...ses@0.15.0) (2021-11-02)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### ⚠ BREAKING CHANGES
|
|
34
|
+
|
|
35
|
+
* **ses:** Withdraw support for muli-lockdown (#921)
|
|
36
|
+
* **ses:** Domain taming safe by default (#917)
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* **ses:** Read lockdown options from environment ([#871](https://github.com/endojs/endo/issues/871)) ([789d639](https://github.com/endojs/endo/commit/789d639c25c6882153a8090f4bd74d350bb29721))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* **ses:** Domain taming safe by default ([#917](https://github.com/endojs/endo/issues/917)) ([7039276](https://github.com/endojs/endo/commit/7039276ef91a2de2b048c91085a7557c8830f677))
|
|
46
|
+
* **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)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### [0.14.4](https://github.com/endojs/endo/compare/ses@0.14.3...ses@0.14.4) (2021-10-15)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* **ses:** lazily create evaluate ([f1cf92a](https://github.com/endojs/endo/commit/f1cf92a3b8e23aab3894f8431d8b65b4f75daa77))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* **ses:** Add test and warning about the `has` hazard ([9066c97](https://github.com/endojs/endo/commit/9066c97b41b35a4e37fd12256a0802fb656af755))
|
|
61
|
+
* **ses:** more detailed `has` hazard test ([f010a9e](https://github.com/endojs/endo/commit/f010a9ebe09dadc72a8f22bd54caed8aa3787243))
|
|
62
|
+
* **ses:** Refactor Compartment to use shared evaluator ([dc0bad6](https://github.com/endojs/endo/commit/dc0bad6c1f963ff379e45f320852218228203050))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
6
66
|
### [0.14.3](https://github.com/endojs/endo/compare/ses@0.14.2...ses@0.14.3) (2021-09-18)
|
|
7
67
|
|
|
8
68
|
|
package/NEWS.md
CHANGED
|
@@ -1,9 +1,59 @@
|
|
|
1
1
|
User-visible changes in SES:
|
|
2
2
|
|
|
3
|
+
# 0.15.2 (2021-12-08)
|
|
4
|
+
|
|
5
|
+
- The `Removing...` messages that Lockdown emits when encountering unrecognized
|
|
6
|
+
properties on shared intrinsics are now logged as "warnings".
|
|
7
|
+
This has the material benefit of sending these messages to STDERR on Node.js.
|
|
8
|
+
- Updates permits for all current TC39 stage 3 and 4 proposals, notably
|
|
9
|
+
suppressing the `Removing...` messages for `Object.hasOwn`; `findLast` and
|
|
10
|
+
`findLastIndex` on both `Array.prototype` and `TypedArray.prototype`; and the
|
|
11
|
+
properties `transfer`, `resize`, `resizable`, and `maxByteLength` of
|
|
12
|
+
`ArrayBuffer.prototype`.
|
|
13
|
+
|
|
14
|
+
# 0.15.1 (2021-11-15)
|
|
15
|
+
|
|
16
|
+
- The TypeScript definition of `lockdown` now allows for the option
|
|
17
|
+
`"errorTrapping": "none"`.
|
|
18
|
+
- Fixes error trapping on the web, showing both the message (and stack) of any
|
|
19
|
+
error that throws out of the top of an event.
|
|
20
|
+
|
|
21
|
+
# 0.15.0 (2021-11-02)
|
|
22
|
+
|
|
23
|
+
- *BREAKING CHANGE*: The lockdown option `domainTaming` is now `safe` by
|
|
24
|
+
default, which will break any application that depends transtively on the
|
|
25
|
+
Node.js `domain` module.
|
|
26
|
+
Notably, [standard-things/esm](https://github.com/standard-things/esm)
|
|
27
|
+
uses domains and so SES will not support `node -r esm` going forward.
|
|
28
|
+
|
|
29
|
+
This protects against the unhardened `domain` property appearing on shared
|
|
30
|
+
objects like callbacks and promises.
|
|
31
|
+
This overcomes the last *known* obstacle toward object capability containment.
|
|
32
|
+
- Lockdown will now read options from the environment as defined by the Node.js
|
|
33
|
+
`process.env` parameter space.
|
|
34
|
+
- *BREAKING CHANGE*: Lockdown may no longer be called more than once.
|
|
35
|
+
Lockdown no longer returns a boolean to indicate whether it was effective
|
|
36
|
+
(true) or redundant (false). Instead, Lockdown will return undefined for
|
|
37
|
+
its first invocation or throw an error otherwise.
|
|
38
|
+
|
|
39
|
+
# 0.14.4 (2021-10-14)
|
|
40
|
+
|
|
41
|
+
- Fixes a defect in the per-compartment `Function` and `eval` functions, such
|
|
42
|
+
that these environments did not have the compartment's `globalLexicals`.
|
|
43
|
+
There is no known environment depending on this invariant for security
|
|
44
|
+
reasons, but such a scenario would be a program arranging a translator that
|
|
45
|
+
introduces run-time security checks, like metering, that depend on the
|
|
46
|
+
existence of a named global lexical.
|
|
47
|
+
[#898](https://github.com/endojs/endo/issues/898)
|
|
48
|
+
- The above fix incidentally improved the performance of compartment evaluation
|
|
49
|
+
for cases that do not require special global lexicals, by sharing a single
|
|
50
|
+
per-compartment evaluator.
|
|
51
|
+
|
|
3
52
|
# 0.14.3 (2021-09-18)
|
|
4
53
|
|
|
5
54
|
- Due to a peculiar bit of error handling code in Node 14, as explained at
|
|
6
|
-
[Hardened JavaScript interferes with Node.js 14 Error
|
|
55
|
+
[Hardened JavaScript interferes with Node.js 14 Error
|
|
56
|
+
construction](https://github.com/endojs/endo/issues/868),
|
|
7
57
|
we have added more overrides to the default `overrideTaming: 'moderate'`
|
|
8
58
|
setting. At this setting, assigning to the `name` property of a mutable error
|
|
9
59
|
instance should work. It will continue not to work at the `'min'` setting, so
|