isol8 0.11.2 → 0.12.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/dist/cli.js +332 -59
- package/dist/index.js +542 -111
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/engine/default-seccomp-profile.d.ts +8 -0
- package/dist/src/engine/default-seccomp-profile.d.ts.map +1 -0
- package/dist/src/engine/docker.d.ts.map +1 -1
- package/dist/src/engine/image-builder.d.ts +1 -1
- package/dist/src/engine/image-builder.d.ts.map +1 -1
- package/dist/src/server/index.d.ts +20 -0
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/schema/isol8.config.schema.json +5 -0
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ isol8 run script.py --host http://server:3000 --key my-api-key
|
|
|
105
105
|
|------|-------------|---------|
|
|
106
106
|
| `-e, --eval <code>` | Execute inline code | — |
|
|
107
107
|
| `-r, --runtime <rt>` | Force runtime: `python`, `node`, `bun`, `deno`, `bash` | auto-detect |
|
|
108
|
-
| `--net <mode>` | Network mode: `none`, `host`, `filtered` | `none` |
|
|
108
|
+
| `--net <mode>` | Network mode: `none`, `host`, `filtered` | `none` (unless `--install` is used without explicit `--net`, then auto `filtered`) |
|
|
109
109
|
| `--allow <regex>` | Whitelist regex (repeatable, for `filtered`) | — |
|
|
110
110
|
| `--deny <regex>` | Blacklist regex (repeatable, for `filtered`) | — |
|
|
111
111
|
| `--out <file>` | Write stdout to file | — |
|
|
@@ -113,7 +113,7 @@ isol8 run script.py --host http://server:3000 --key my-api-key
|
|
|
113
113
|
| `--persistent` | Keep container alive between runs | `false` |
|
|
114
114
|
| `--persist` | Keep container after execution for inspection/debugging | `false` |
|
|
115
115
|
| `--debug` | Enable debug logging for internal engine operations | `false` |
|
|
116
|
-
| `--timeout <ms>` |
|
|
116
|
+
| `--timeout <ms>` | Timeout in milliseconds for package install + execution phases | `30000` |
|
|
117
117
|
| `--memory <limit>` | Memory limit (e.g. `512m`, `1g`) | `512m` |
|
|
118
118
|
| `--cpu <limit>` | CPU limit as fraction (e.g. `0.5`, `2.0`) | `1.0` |
|
|
119
119
|
| `--image <name>` | Override Docker image | — |
|
|
@@ -124,7 +124,7 @@ isol8 run script.py --host http://server:3000 --key my-api-key
|
|
|
124
124
|
| `--sandbox-size <size>` | Sandbox tmpfs size (e.g. `512m`, `1g`) | `512m` |
|
|
125
125
|
| `--tmp-size <size>` | Tmp tmpfs size (e.g. `256m`, `512m`) | `256m` |
|
|
126
126
|
| `--stdin <data>` | Data to pipe to stdin | — |
|
|
127
|
-
| `--install <pkg>` | Install package for runtime (repeatable) | — |
|
|
127
|
+
| `--install <pkg>` | Install package for runtime (repeatable) | — (auto-adds default runtime registry allowlist in `filtered` mode) |
|
|
128
128
|
| `--url <url>` | Fetch code from URL (requires `remoteCode.enabled=true`) | — |
|
|
129
129
|
| `--github <owner/repo/ref/path>` | GitHub shorthand for raw source | — |
|
|
130
130
|
| `--gist <gistId/file.ext>` | Gist shorthand for raw source | — |
|
|
@@ -176,6 +176,8 @@ isol8 serve --update # Force re-download the server binary
|
|
|
176
176
|
|
|
177
177
|
If the selected port is already in use, `isol8 serve` now prompts to enter another port or auto-select an available one. In non-interactive environments, it auto-falls back to a free port.
|
|
178
178
|
|
|
179
|
+
On graceful shutdown (`SIGINT`/`SIGTERM`), the server now cleans up tracked sessions, isol8 containers, and isol8 images before exiting.
|
|
180
|
+
|
|
179
181
|
### `isol8 config`
|
|
180
182
|
|
|
181
183
|
Display the resolved configuration (merged defaults + config file). Shows the source file, defaults, network rules, cleanup policy, and dependencies.
|
|
@@ -377,7 +379,7 @@ Add the `$schema` property to get autocompletion, validation, and inline documen
|
|
|
377
379
|
"node": ["lodash"]
|
|
378
380
|
},
|
|
379
381
|
"security": {
|
|
380
|
-
"seccomp": "
|
|
382
|
+
"seccomp": "strict"
|
|
381
383
|
}
|
|
382
384
|
}
|
|
383
385
|
```
|
|
@@ -441,7 +443,7 @@ bun run bench:detailed # Phase breakdown
|
|
|
441
443
|
| **Network** | Disabled by default; optional proxy-based filtering |
|
|
442
444
|
| **Output** | Truncated at 1MB; secrets masked from stdout/stderr |
|
|
443
445
|
| **Isolation** | Each execution in its own container (ephemeral) or exec (persistent) |
|
|
444
|
-
| **Seccomp** | Default
|
|
446
|
+
| **Seccomp** | Default `strict` mode applies the built-in profile that blocks dangerous syscalls (mount, swap, ptrace). In standalone server binaries, an embedded copy is used when profile files are not present. If strict/custom profile loading fails, execution fails. |
|
|
445
447
|
|
|
446
448
|
### Container Filesystem
|
|
447
449
|
|
|
@@ -470,6 +472,7 @@ When running `isol8 serve`, these endpoints are available:
|
|
|
470
472
|
| `POST` | `/file` | Upload file (base64) |
|
|
471
473
|
| `GET` | `/file?sessionId=&path=` | Download file (base64) |
|
|
472
474
|
| `DELETE` | `/session/:id` | Destroy persistent session |
|
|
475
|
+
| `POST` | `/cleanup` | Run server-side cleanup for sessions/containers (and images by default) |
|
|
473
476
|
|
|
474
477
|
All endpoints (except `/health`) require `Authorization: Bearer <key>`.
|
|
475
478
|
|