endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

Daemon: Guests able to evaluate, makeBundle, storeValue, and storeBlob #2289

Open kriskowal opened 1 month ago

kriskowal commented 1 month ago

What is the Problem Being Solved?

Currently, host agents have the privilege of using evaluate, makeBundle, storeValue, and storeBlob, all of which are safe to extend to guest agents.

Description of the Design

Move these implementations to mail.js (which is clearly supposed to be named agent.js in MMXXIV) and expose them to both guest.js and host.js. We may need to take care to ensure that the guest can only use a worker named by the guest (not NEW). The solution to that problem may simply to remove the NEW complication entirely.

Security Considerations

Make sure guests don’t implicitly get a capability to spawn an arbitrary number of workers.

Scaling Considerations

Make sure guests don’t implicitly get a capability to spawn an arbitrary number of workers.

Test Plan

Do so.

Compatibility Considerations

Break them.

Upgrade Considerations

Not yet.