endo icon indicating copy to clipboard operation
endo copied to clipboard

Endo: thread powers by policy

Open kriskowal opened this issue 5 years ago • 7 comments

Endo currently creates compartment graphs where all third-party packages are completely powerless. They do not receive any powerful built-in modules and do not receive any global or lexical “endowments”. The intention is for the run-time to thread built-in modules and globals or lexicals as described in the “compartment map”. Endo’s module loader would need to generate these threads based on the policies generated by LavaMoat. LavaMoat would in turn use Endo’s loader API to generate policies based on static analysis of the loaded module working set. LavaMoat would in turn collect suggestions from third-party package.json (e.g., this library is designed to run with a frozen global and defends its own API objects so advises you not to create unnecessary membranes) and overrides from the application package.json (e.g., use this package in place of that package).

To do this, we need an ESM LavaMoatStaticRecord constructor and will use the existing policy aggregator in LavaMoat core.

kriskowal avatar Aug 19 '20 01:08 kriskowal

cc @erights @kumavis

kriskowal avatar Aug 19 '20 01:08 kriskowal

I’ve since change Endo such that every package receives all of the endowed globals and modules. This gives us parity with our existing Rollup solution. This issue tracks support for least-authority linkage.

kriskowal avatar Sep 03 '20 22:09 kriskowal

Passing this to @naugtur to sign off if it’s done done.

kriskowal avatar Jan 10 '24 05:01 kriskowal

cc @boneskull -- i believe this is the top-level "endomoat" ticket for this repo

kumavis avatar Jan 19 '24 21:01 kumavis

@kumavis I seem to have misplaced my context. What is this?

boneskull avatar Jan 19 '24 21:01 boneskull

@boneskull

🤠 this here is the endomoatiest ticket this side of the endo-lavamoat divide 🌵

This ticket is for tracking policy support in Endo. At present, the exact criteria for closing this ticket can only be viewed in a dream state. If you awake from this dream and find the criteria has been met, please close this ticket.

kumavis avatar Jan 22 '24 10:01 kumavis

Ref:

  • lavamoat/lavamoat#772

boneskull avatar Jan 23 '24 22:01 boneskull