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 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); // ~55-95ms (warm pool)
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 | 148ms | 155ms | 414ms | 239ms |
326
- | Node.js | 152ms | 155ms | 186ms | 165ms |
327
- | Bun | 124ms | 145ms | 260ms | 176ms |
328
- | Deno | 339ms | 372ms | 626ms | 446ms |
329
- | Bash | 115ms | 123ms | 148ms | 128ms |
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 | 285ms | 95ms | 89ms | 3.2x |
338
- | Node.js | 177ms | 91ms | 76ms | 2.3x |
339
- | Bun | 157ms | 72ms | 66ms | 2.4x |
340
- | Deno | 330ms | 264ms | 231ms | 1.4x |
341
- | Bash | 222ms | 68ms | 55ms | 4.0x |
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 | 41ms | 49ms | 17ms | 1ms | 40ms | 43ms | 190ms |
350
- | Node.js | 32ms | 63ms | 34ms | 1ms | 39ms | 43ms | 212ms |
351
- | Bun | 32ms | 56ms | 26ms | 1ms | 27ms | 44ms | 186ms |
352
- | Bash | 35ms | 69ms | 23ms | 1ms | 20ms | 48ms | 196ms |
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