isol8 0.6.1 → 0.7.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 +23 -16
- package/dist/cli.js +201 -34
- package/dist/docker/Dockerfile +4 -2
- package/dist/docker/seccomp-profile.json +67 -0
- package/dist/index.js +106 -10
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/engine/docker.d.ts +3 -0
- package/dist/src/engine/docker.d.ts.map +1 -1
- package/dist/src/engine/pool.d.ts +3 -2
- package/dist/src/engine/pool.d.ts.map +1 -1
- package/dist/src/server/index.d.ts +2 -0
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +20 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/schema/isol8.config.schema.json +20 -0
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ isol8 serve --update # Force re-download the server binary
|
|
|
147
147
|
| `-p, --port <port>` | Port to listen on | `3000` |
|
|
148
148
|
| `-k, --key <key>` | API key for Bearer token auth | `$ISOL8_API_KEY` |
|
|
149
149
|
| `--update` | Force re-download the server binary | `false` |
|
|
150
|
+
| `--debug` | Enable debug logging for server operations | `false` |
|
|
150
151
|
|
|
151
152
|
### `isol8 config`
|
|
152
153
|
|
|
@@ -176,7 +177,7 @@ const result = await isol8.execute({
|
|
|
176
177
|
|
|
177
178
|
console.log(result.stdout); // "Hello from isol8!"
|
|
178
179
|
console.log(result.exitCode); // 0
|
|
179
|
-
console.log(result.durationMs); // ~
|
|
180
|
+
console.log(result.durationMs); // ~38-69ms (warm pool)
|
|
180
181
|
|
|
181
182
|
await isol8.stop();
|
|
182
183
|
```
|
|
@@ -303,9 +304,14 @@ Add the `$schema` property to get autocompletion, validation, and inline documen
|
|
|
303
304
|
"autoPrune": true,
|
|
304
305
|
"maxContainerAgeMs": 3600000
|
|
305
306
|
},
|
|
307
|
+
"dependencies": {
|
|
308
|
+
"python": ["numpy", "pandas"],
|
|
306
309
|
"dependencies": {
|
|
307
310
|
"python": ["numpy", "pandas"],
|
|
308
311
|
"node": ["lodash"]
|
|
312
|
+
},
|
|
313
|
+
"security": {
|
|
314
|
+
"seccomp": "safety"
|
|
309
315
|
}
|
|
310
316
|
}
|
|
311
317
|
```
|
|
@@ -322,11 +328,11 @@ Each run creates a new `DockerIsol8` instance, executes, and tears down.
|
|
|
322
328
|
|
|
323
329
|
| Runtime | Min | Median | Max | Avg |
|
|
324
330
|
|---------|-----|--------|-----|-----|
|
|
325
|
-
| Python |
|
|
326
|
-
| Node.js |
|
|
327
|
-
| Bun |
|
|
328
|
-
| Deno |
|
|
329
|
-
| Bash |
|
|
331
|
+
| Python | 111ms | 120ms | 188ms | 140ms |
|
|
332
|
+
| Node.js | 114ms | 126ms | 178ms | 130ms |
|
|
333
|
+
| Bun | 104ms | 121ms | 196ms | 139ms |
|
|
334
|
+
| Deno | 112ms | 122ms | 199ms | 139ms |
|
|
335
|
+
| Bash | 104ms | 114ms | 152ms | 121ms |
|
|
330
336
|
|
|
331
337
|
### Warm Pool (reused engine)
|
|
332
338
|
|
|
@@ -334,11 +340,11 @@ A single `DockerIsol8` instance reused across 5 runs. The first run is cold (poo
|
|
|
334
340
|
|
|
335
341
|
| Runtime | Cold | Warm Avg | Warm Min | Speedup |
|
|
336
342
|
|---------|------|----------|----------|---------|
|
|
337
|
-
| Python |
|
|
338
|
-
| Node.js |
|
|
339
|
-
| Bun |
|
|
340
|
-
| Deno |
|
|
341
|
-
| Bash |
|
|
343
|
+
| Python | 198ms | 56ms | 49ms | 4.1x |
|
|
344
|
+
| Node.js | 145ms | 69ms | 60ms | 2.4x |
|
|
345
|
+
| Bun | 152ms | 51ms | 45ms | 3.4x |
|
|
346
|
+
| Deno | 128ms | 62ms | 54ms | 2.4x |
|
|
347
|
+
| Bash | 124ms | 43ms | 38ms | 3.3x |
|
|
342
348
|
|
|
343
349
|
### Execution Phase Breakdown
|
|
344
350
|
|
|
@@ -346,10 +352,10 @@ Where time is spent in the container lifecycle (raw Docker API, no pool):
|
|
|
346
352
|
|
|
347
353
|
| Runtime | Create | Start | Write | Exec Setup | Run | Cleanup | Total |
|
|
348
354
|
|---------|--------|-------|-------|------------|-----|---------|-------|
|
|
349
|
-
| Python |
|
|
350
|
-
| Node.js |
|
|
351
|
-
| Bun |
|
|
352
|
-
| Bash |
|
|
355
|
+
| Python | 69ms | 52ms | 19ms | 1ms | 22ms | 51ms | 213ms |
|
|
356
|
+
| Node.js | 47ms | 41ms | 15ms | 1ms | 30ms | 36ms | 169ms |
|
|
357
|
+
| Bun | 55ms | 42ms | 15ms | 1ms | 18ms | 37ms | 166ms |
|
|
358
|
+
| Bash | 50ms | 50ms | 14ms | 1ms | 13ms | 43ms | 172ms |
|
|
353
359
|
|
|
354
360
|
Run benchmarks yourself:
|
|
355
361
|
|
|
@@ -364,11 +370,12 @@ bun run bench:detailed # Phase breakdown
|
|
|
364
370
|
| Layer | Protection |
|
|
365
371
|
|-------|-----------|
|
|
366
372
|
| **Filesystem** | Read-only root, writable `/sandbox` (tmpfs, 512MB, exec allowed), writable `/tmp` (tmpfs, 256MB, noexec) |
|
|
367
|
-
| **Processes** | PID limit (default 64), `no-new-privileges` |
|
|
373
|
+
| **Processes** | PID limit (default 64), `no-new-privileges`, non-root `sandbox` user, all user processes killed between pool reuses |
|
|
368
374
|
| **Resources** | CPU (1 core), memory (512MB), execution timeout (30s) |
|
|
369
375
|
| **Network** | Disabled by default; optional proxy-based filtering |
|
|
370
376
|
| **Output** | Truncated at 1MB; secrets masked from stdout/stderr |
|
|
371
377
|
| **Isolation** | Each execution in its own container (ephemeral) or exec (persistent) |
|
|
378
|
+
| **Seccomp** | Default "safety" profile blocks dangerous syscalls (mount, swap, ptrace) but allows others for compatibility; configurable via `security.seccomp` |
|
|
372
379
|
|
|
373
380
|
### Container Filesystem
|
|
374
381
|
|