Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lavamoat + @endo/compartment-mapper PoC #772

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Dec 6, 2023

Continuation of #742

This is a prototype re-implementation of lavamoat based on @endo/compartment-mapper. There's still work to be done here, but it's now ready for review. We'd like to get it merged into main, but it needn't be published yet (imo).

Ref: endojs/endo#423

@boneskull
Copy link
Contributor Author

boneskull commented Dec 6, 2023

Copy link

socket-security bot commented Mar 20, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@endo/compartment-mapper@1.1.3 Transitive: environment +26 7.48 MB kriskowal
npm/@endo/eslint-plugin@2.1.0 Transitive: environment, filesystem +45 36.2 MB kriskowal
npm/@endo/evasive-transform@1.0.4 Transitive: environment, filesystem, network +24 7.25 MB kriskowal
npm/@jessie.js/eslint-plugin@0.4.0 Transitive: filesystem +1 44 kB michaelfig
npm/@types/node@18.19.28 None +1 2.04 MB types
npm/ses@1.4.1 None +1 3.35 MB kriskowal
npm/type-fest@4.14.0 None 0 356 kB sindresorhus

🚮 Removed packages: npm/ses@1.4.0

View full report↗︎

@boneskull boneskull force-pushed the endo-refactor-gutted branch 5 times, most recently from 95b74d9 to ca8ff0b Compare March 27, 2024 20:42
@boneskull boneskull force-pushed the endo-refactor-gutted branch 2 times, most recently from 1a03f41 to f61382e Compare March 28, 2024 23:54
@github-actions github-actions bot added the documentation Docs, examples, tutorials, and associated tooling label Mar 28, 2024
@boneskull
Copy link
Contributor Author

CLI is now:

endomoat <entrypoint>

Run an application

Positionals:
  entrypoint  Path to the application entry point            [string] [required]

Options:
      --help                         Show help                         [boolean]
      --version                      Show version number               [boolean]
  -p, --policy                       Filepath to a policy file
                                 [string] [default: "lavamoat/node/policy.json"]
  -o, --policy-override, --override  Filepath to a policy override file
                        [string] [default: "lavamoat/node/policy-override.json"]
      --policy-debug, --pd           Filepath to a policy debug file
                           [string] [default: "lavamoat/node/policy-debug.json"]
      --cwd                          Path to application root directory
                                         [string] [default: (current directory)]

See #969 for how policy gen fits in

@boneskull boneskull force-pushed the endo-refactor-gutted branch 2 times, most recently from b452d58 to a2ce280 Compare April 1, 2024 22:51
@naugtur
Copy link
Member

naugtur commented Apr 8, 2024

I think it's time to merge this one. I'll dig deeper into some details here and there before we do, but I think the only change I'd want to see in this PR or the 969 one is giving it its final name. (that we're yet to choose)

@boneskull boneskull force-pushed the endo-refactor-gutted branch 3 times, most recently from 1b16d1a to 559a3ff Compare April 11, 2024 18:57
@github-actions github-actions bot added pkg:lavamoat-perf Changes in package lavamoat-perf pkg:@lavamoat/webpack Changes in package @lavamoat/webpack labels Apr 16, 2024
This eases development when using `npm link` to hack on Endo as well, due to other workspaces using disparate versions of these two packages.
This is essentially a `lavamoat` reimplementation on top of `@endo/compartment-mapper`.  It includes:

1. A minimal CLI
2. Conversion of LavaMoat to Endo policies
3. Execution via `@endo/compartment-mapper`

As of this commit, it currently does _not_ support:

1. Policy generation
2. Scuttling
3. Native modules
4. Writable globals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore overhead, tests, dev env, etc. dependencies Pull requests that update a dependency file documentation Docs, examples, tutorials, and associated tooling enhancement New feature or request pkg:@lavamoat/webpack Changes in package @lavamoat/webpack pkg:lavamoat-browserify Changes in package lavamoat-browserify pkg:lavamoat-core Changes in package lavamoat-core pkg:lavamoat-perf Changes in package lavamoat-perf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants