ses 0.18.0 → 0.18.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/NEWS.md +17 -0
- package/README.md +10 -5
- package/SECURITY.md +1 -1
- package/dist/lockdown.cjs +319 -243
- package/dist/lockdown.mjs +319 -243
- package/dist/lockdown.umd.js +319 -243
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +319 -243
- package/dist/ses.mjs +319 -243
- package/dist/ses.umd.js +319 -243
- package/dist/ses.umd.min.js +1 -1
- package/index.js +1 -0
- package/package.json +15 -12
- package/src/commons.js +2 -0
- package/src/compartment-evaluate.js +2 -4
- package/src/compartment-shim.js +3 -3
- package/src/enablements.js +12 -0
- package/src/environment-options.js +10 -19
- package/src/error/assert.js +24 -16
- package/src/error/console.js +2 -6
- package/src/error/internal-types.js +3 -3
- package/src/error/types.js +76 -81
- package/src/get-anonymous-intrinsics.js +6 -4
- package/src/get-source-url.js +3 -0
- package/src/global-object.js +9 -9
- package/src/intrinsics.js +1 -1
- package/src/lockdown-shim.js +11 -13
- package/src/make-hardener.js +1 -1
- package/src/make-safe-evaluator.js +4 -4
- package/src/module-instance.js +29 -13
- package/src/module-link.js +2 -6
- package/src/module-load.js +58 -21
- package/src/scope-constants.js +2 -2
- package/src/sloppy-globals-scope-terminator.js +1 -0
- package/src/tame-domains.js +1 -0
- package/src/tame-function-constructors.js +3 -2
- package/src/tame-locale-methods.js +2 -2
- package/src/tame-math-object.js +2 -3
- package/src/transforms.js +15 -0
- package/src/whitelist-intrinsics.js +2 -2
- package/tools.js +25 -0
- package/{index.d.ts → types.d.ts} +2 -1
- package/CHANGELOG.md +0 -596
package/NEWS.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
User-visible changes in SES:
|
|
2
2
|
|
|
3
|
+
# v0.18.2 (2023-03-07)
|
|
4
|
+
|
|
5
|
+
- Introduces the `__syncModuleFunctor__` property of static module record
|
|
6
|
+
to replace evauluation of `__syncModuleProgram__` for environments without eval.
|
|
7
|
+
|
|
8
|
+
# v0.18.1 (2022-12-23)
|
|
9
|
+
|
|
10
|
+
- Fixes a bug for SES initialization in a no-unsafe-eval
|
|
11
|
+
Content-Security-Policy.
|
|
12
|
+
- Fixes a bug where reexport of multiple named exports of the same name was
|
|
13
|
+
causing them to be overridden by the last value. Now named exports are
|
|
14
|
+
handled in the same manner as `export *`.
|
|
15
|
+
- Allows Compatment `importHook` implementations to return aliases: module
|
|
16
|
+
descriptors that refer to a module by its specifier in the same or a
|
|
17
|
+
specified compartment, without providing a static module record (module
|
|
18
|
+
source).
|
|
19
|
+
|
|
3
20
|
# v0.18.0 (2022-11-14)
|
|
4
21
|
|
|
5
22
|
- *BREAKING*: Removes support for `globalLexicals`.
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ JavaScript engineering community.
|
|
|
39
39
|
|
|
40
40
|
_Hardened JavaScript_, Kris Kowal:
|
|
41
41
|
|
|
42
|
-
[](https://www.youtube.com/watch?v=RZ7bBIU8DRc)
|
|
43
43
|
|
|
44
44
|
_Don't add Security, Remove Insecurity_, Mark Miller:
|
|
45
45
|
|
|
@@ -441,6 +441,11 @@ A compiled static module record has the following shape:
|
|
|
441
441
|
- `onceVar` is a record that maps constants exported by this
|
|
442
442
|
module to a function that may be called to initialize the
|
|
443
443
|
corresponding value in another module.
|
|
444
|
+
- `__syncModuleFunctor__` is an optional function that if present is used
|
|
445
|
+
instead of the evaluation of the `__syncModuleProgram__` string. It will be
|
|
446
|
+
called with the initialization record described above. It is intended to be
|
|
447
|
+
used in environments where eval is not available. Sandboxing of the functor is
|
|
448
|
+
the responsibility of the author of the StaticModuleRecord.
|
|
444
449
|
- `__liveExportsMap__` is a record that maps import names or names in the lexical
|
|
445
450
|
scope of the module to export names, for variables that may change after
|
|
446
451
|
initialization. Any reexported name is assumed to possibly change.
|
|
@@ -525,7 +530,7 @@ console uses these side tables to output more informative diagnostics.
|
|
|
525
530
|
|
|
526
531
|
The `ses` shim concerns boundaries between programs in the same process and
|
|
527
532
|
JavaScript realm.
|
|
528
|
-
In terms of the [Taxonomy of Security Issues](https://agoric.com/
|
|
533
|
+
In terms of the [Taxonomy of Security Issues](https://papers.agoric.com/taxonomy-of-security-issues/),
|
|
529
534
|
the `ses` shim creates a boundary that is finer than an operating system
|
|
530
535
|
process or thread and facilitates boundaries as fine as individual objects.
|
|
531
536
|
While `ses` can interpose at granularities where process isolation is not a
|
|
@@ -696,7 +701,7 @@ As a result of the search for flaws, deficiencies, and weaknesses in the code
|
|
|
696
701
|
(which is currently a Stage 1 proposal with the ECMA TC39 committee), a series
|
|
697
702
|
of small code changes and documentation improvements were made. There is a
|
|
698
703
|
report available on the
|
|
699
|
-
[Agoric blog](https://agoric.com/blog/technology/metamask-agoric-
|
|
704
|
+
[Agoric blog](https://agoric.com/blog/technology/purple-teaming-how-metamask-and-agoric-hunted-bugs-to-harden-javascript)
|
|
700
705
|
that includes links to recordings of code walk-throughs and technical
|
|
701
706
|
discussion, and issues are tagged
|
|
702
707
|
[audit-SEStival](https://github.com/endojs/endo/issues?q=label%3Aaudit-sestival).
|
|
@@ -706,11 +711,11 @@ provide useful background for future audits, reviews, and for learning more
|
|
|
706
711
|
about how the `ses` shim constructs a Hardened JavaScript environment.
|
|
707
712
|
|
|
708
713
|
In addition to vulnerability assessments, active efforts to [formally verify
|
|
709
|
-
the Agoric kernel](https://agoric.com/blog/technology/the-path-to-verified-blds-how-informal-systems-and-agoric-are-using-formal
|
|
714
|
+
the Agoric kernel](https://agoric.com/blog/technology/the-path-to-verified-blds-how-informal-systems-and-agoric-are-using-formal)
|
|
710
715
|
have found the object capability model that `ses` provides to be sound.
|
|
711
716
|
|
|
712
717
|
Hardened JavaScript is also within the scope of the [Agoric bug bounty
|
|
713
|
-
program](hackerone.com/agoric), which rewards researchers for surfacing valid
|
|
718
|
+
program](https://hackerone.com/agoric), which rewards researchers for surfacing valid
|
|
714
719
|
bugs in our code. We welcome the opportunity to cooperate with researchers,
|
|
715
720
|
whose efforts will undoubtedly yield stronger, more resilient code.
|
|
716
721
|
|
package/SECURITY.md
CHANGED
|
@@ -10,7 +10,7 @@ be made for the most recent branch only.
|
|
|
10
10
|
|
|
11
11
|
SES stands for fearless cooperation, and strong security requires strong collaboration with security researchers. If you believe that you have found a security sensitive bug that should not be disclosed until a fix has been made available, we encourage you to report it. To report a bug in HardenedJS, you have several options that include:
|
|
12
12
|
|
|
13
|
-
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](hackerone.com/agoric).
|
|
13
|
+
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](https://hackerone.com/agoric).
|
|
14
14
|
|
|
15
15
|
* Sending an email to security at (@) agoric.com., encrypted or unencrypted. To encrypt, please use @Warner’s personal GPG key [A476E2E6 11880C98 5B3C3A39 0386E81B 11CAA07A](http://www.lothar.com/warner-gpg.html) .
|
|
16
16
|
|