Skip to content

Commit 605c3a2

Browse files
committed
docs: update
1 parent 06bfce8 commit 605c3a2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ Those hosts then run the same codebase which is compiled to WebAssembly:
2525
- the REPL logic
2626
- the plugins
2727

28-
The plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
29-
30-
- on the CLI, a folder from the disk is mounted via the `--dir` flag
31-
- on the browser, a virtual filesystem is mounted, the I/O operations are forwarded via the `@bytecodealliance/preview2-shim/filesystem` shim, which shims the `wasi:filesystem` filesystem interface
32-
33-
The CLI host `pluginlab` supports the same kinds of permissions deno introduced:
28+
Security model: the REPL cli implements a security model inspired by [deno](https://docs.deno.com/runtime/fundamentals/security/#permissions):
3429

3530
- `--allow-net`: allows network access to the plugins, you can specify a list of domains comma separated (by default, no network access is allowed)
3631
- `--allow-read`: allows read access to the filesystem
3732
- `--allow-write`: allows write access to the filesystem
3833
- `--allow-all`: allows all permissions (same as all the flags above), short: `-A`
3934

40-
This is what it means by plugins being "sandboxed by default" - you can take any plugin from anywhere, if you don't allow any access, it won't be able to make any network request or read/write to your filesystem and it will be constrained to its own part of the memory.
35+
Plugins are sandboxed by default - they cannot access the filesystem or network unless explicitly permitted. This allows safe execution of untrusted plugins while maintaining the flexibility to grant specific permissions when needed.
36+
37+
Plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
38+
39+
- on the CLI, a folder from the disk is mounted via the `--dir` flag
40+
- on the browser, a virtual filesystem is mounted, the I/O operations are forwarded via the `@bytecodealliance/preview2-shim/filesystem` shim, which shims the `wasi:filesystem` filesystem interface
4141

4242
<p align="center"><a href="https://topheman.github.io/webassembly-component-model-experiments/"><img src="./packages/web-host/public/wasi.png" alt="Demo" /></a></p>
4343
<p align="center">

crates/pluginlab/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ Those hosts then run the same codebase which is compiled to WebAssembly:
2020
- the REPL logic
2121
- the plugins
2222

23-
The plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
24-
25-
- on the CLI, a folder from the disk is mounted via the `--dir` flag
26-
- on the browser, a virtual filesystem is mounted, the I/O operations are forwarded via the `@bytecodealliance/preview2-shim/filesystem` shim, which shims the `wasi:filesystem` filesystem interface
27-
28-
The CLI host `pluginlab` supports the same kinds of permissions deno introduced:
23+
Security model: the REPL cli implements a security model inspired by [deno](https://docs.deno.com/runtime/fundamentals/security/#permissions):
2924

3025
- `--allow-net`: allows network access to the plugins, you can specify a list of domains comma separated (by default, no network access is allowed)
3126
- `--allow-read`: allows read access to the filesystem
3227
- `--allow-write`: allows write access to the filesystem
3328
- `--allow-all`: allows all permissions (same as all the flags above), short: `-A`
3429

35-
This is what it means by plugins being "sandboxed by default" - you can take any plugin from anywhere, if you don't allow any access, it won't be able to make any network request or read/write to your filesystem and it will be constrained to its own part of the memory.
30+
Plugins are sandboxed by default - they cannot access the filesystem or network unless explicitly permitted. This allows safe execution of untrusted plugins while maintaining the flexibility to grant specific permissions when needed.
31+
32+
Plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
33+
34+
- on the CLI, a folder from the disk is mounted via the `--dir` flag
35+
- on the browser, a virtual filesystem is mounted, the I/O operations are forwarded via the `@bytecodealliance/preview2-shim/filesystem` shim, which shims the `wasi:filesystem` filesystem interface
3636

3737
More details on the github repo: [topheman/webassembly-component-model-experiments](https://github.com/topheman/webassembly-component-model-experiments).
3838

0 commit comments

Comments
 (0)