While working on #1686, I found out that some shared prototypes are currently hardened as a side effect of an instance being hardened. This PR adds explicit harden for these.
It also contains a small refactor to harden all intrinsics in one shot instead of multiple calls to harden, as there are cycles in those, and some intrinsics were effectively hardened in other calls.
Security Considerations
More explicit hardening brings more security
Scaling Considerations
None
Documentation Considerations
In Node.js, the Buffer and when the console is untamed, the internal SafeMap are now explicitly hardened. These would likely get hardened as side-effect of hardening instances before.
Testing Considerations
Tested in #1914 and https://github.com/Agoric/agoric-sdk/pull/8700 that these are all prototypes found through instances by existing tests. There may be others lurking, but until we have shallow hardening implemented, we won't find them.
Upgrade Considerations
This is a non breaking change that should be mostly unobservable to consumers.
refs: #1914
Description
While working on #1686, I found out that some shared prototypes are currently hardened as a side effect of an instance being hardened. This PR adds explicit harden for these.
It also contains a small refactor to harden all intrinsics in one shot instead of multiple calls to
harden
, as there are cycles in those, and some intrinsics were effectively hardened in other calls.Security Considerations
More explicit hardening brings more security
Scaling Considerations
None
Documentation Considerations
In Node.js, the
Buffer
and when the console is untamed, the internalSafeMap
are now explicitly hardened. These would likely get hardened as side-effect of hardening instances before.Testing Considerations
Tested in #1914 and https://github.com/Agoric/agoric-sdk/pull/8700 that these are all prototypes found through instances by existing tests. There may be others lurking, but until we have shallow hardening implemented, we won't find them.
Upgrade Considerations
This is a non breaking change that should be mostly unobservable to consumers.