You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,16 @@ Those hosts then run the same codebase which is compiled to WebAssembly:
25
25
- the REPL logic
26
26
- the plugins
27
27
28
-
The plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
28
+
Security model: the REPL cli implements a security model inspired by [deno](https://docs.deno.com/runtime/fundamentals/security/#permissions):
29
+
30
+
-`--allow-net`: allows network access to the plugins, you can specify a list of domains comma separated (by default, no network access is allowed)
31
+
-`--allow-read`: allows read access to the filesystem
32
+
-`--allow-write`: allows write access to the filesystem
33
+
-`--allow-all`: allows all permissions (same as all the flags above), short: `-A`
34
+
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.
29
38
30
39
- on the CLI, a folder from the disk is mounted via the `--dir` flag
31
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
@@ -35,6 +44,13 @@ The plugins like `ls` or `cat` can interact with the filesystem using the primit
35
44
Check the online demo at<br/><ahref="https://topheman.github.io/webassembly-component-model-experiments/">topheman.github.io/webassembly-component-model-experiments</a>
36
45
</p>
37
46
47
+
<palign="center">
48
+
Example of running the CLI <code>pluginlab</code>
49
+
<ahref="https://asciinema.org/a/DWYAgrjSpwlejvRJQY8AHCEfD?speed=1.5"title="Click to watch the demo">
Copy file name to clipboardExpand all lines: crates/pluginlab/README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,29 @@ Those hosts then run the same codebase which is compiled to WebAssembly:
20
20
- the REPL logic
21
21
- the plugins
22
22
23
-
The plugins like `ls` or `cat` can interact with the filesystem using the primitives of the languages they are written in.
23
+
Security model: the REPL cli implements a security model inspired by [deno](https://docs.deno.com/runtime/fundamentals/security/#permissions):
24
+
25
+
-`--allow-net`: allows network access to the plugins, you can specify a list of domains comma separated (by default, no network access is allowed)
26
+
-`--allow-read`: allows read access to the filesystem
27
+
-`--allow-write`: allows write access to the filesystem
28
+
-`--allow-all`: allows all permissions (same as all the flags above), short: `-A`
29
+
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.
24
33
25
34
- on the CLI, a folder from the disk is mounted via the `--dir` flag
26
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
27
36
28
37
More details on the github repo: [topheman/webassembly-component-model-experiments](https://github.com/topheman/webassembly-component-model-experiments).
29
38
39
+
<palign="center">
40
+
Example of running the CLI <code>pluginlab</code>
41
+
<ahref="https://asciinema.org/a/DWYAgrjSpwlejvRJQY8AHCEfD?speed=1.5"title="Click to watch the demo">
0 commit comments