isol8 0.11.2 → 0.12.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 +241 -23
- package/dist/index.js +181 -20
- 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/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 +1 -1
- 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
|
|
package/dist/cli.js
CHANGED
|
@@ -54780,7 +54780,8 @@ function mergeConfig(defaults, overrides) {
|
|
|
54780
54780
|
maxConcurrent: overrides.maxConcurrent ?? defaults.maxConcurrent,
|
|
54781
54781
|
defaults: {
|
|
54782
54782
|
...defaults.defaults,
|
|
54783
|
-
...overrides.defaults
|
|
54783
|
+
...overrides.defaults,
|
|
54784
|
+
readonlyRootFs: overrides.defaults?.readonlyRootFs ?? defaults.defaults.readonlyRootFs
|
|
54784
54785
|
},
|
|
54785
54786
|
network: {
|
|
54786
54787
|
whitelist: overrides.network?.whitelist ?? defaults.network.whitelist,
|
|
@@ -54824,7 +54825,8 @@ var init_config = __esm(() => {
|
|
|
54824
54825
|
cpuLimit: 1,
|
|
54825
54826
|
network: "none",
|
|
54826
54827
|
sandboxSize: "512m",
|
|
54827
|
-
tmpSize: "256m"
|
|
54828
|
+
tmpSize: "256m",
|
|
54829
|
+
readonlyRootFs: true
|
|
54828
54830
|
},
|
|
54829
54831
|
network: {
|
|
54830
54832
|
whitelist: [],
|
|
@@ -55412,6 +55414,73 @@ class Semaphore {
|
|
|
55412
55414
|
}
|
|
55413
55415
|
}
|
|
55414
55416
|
|
|
55417
|
+
// src/engine/default-seccomp-profile.ts
|
|
55418
|
+
var EMBEDDED_DEFAULT_SECCOMP_PROFILE;
|
|
55419
|
+
var init_default_seccomp_profile = __esm(() => {
|
|
55420
|
+
EMBEDDED_DEFAULT_SECCOMP_PROFILE = JSON.stringify({
|
|
55421
|
+
defaultAction: "SCMP_ACT_ALLOW",
|
|
55422
|
+
architectures: ["SCMP_ARCH_X86_64", "SCMP_ARCH_X86", "SCMP_ARCH_X32", "SCMP_ARCH_AARCH64"],
|
|
55423
|
+
syscalls: [
|
|
55424
|
+
{
|
|
55425
|
+
names: [
|
|
55426
|
+
"acct",
|
|
55427
|
+
"add_key",
|
|
55428
|
+
"bpf",
|
|
55429
|
+
"clock_adjtime",
|
|
55430
|
+
"clock_settime",
|
|
55431
|
+
"create_module",
|
|
55432
|
+
"delete_module",
|
|
55433
|
+
"finit_module",
|
|
55434
|
+
"get_mempolicy",
|
|
55435
|
+
"init_module",
|
|
55436
|
+
"ioperm",
|
|
55437
|
+
"iopl",
|
|
55438
|
+
"kcmp",
|
|
55439
|
+
"kexec_file_load",
|
|
55440
|
+
"kexec_load",
|
|
55441
|
+
"keyctl",
|
|
55442
|
+
"lookup_dcookie",
|
|
55443
|
+
"mbind",
|
|
55444
|
+
"mount",
|
|
55445
|
+
"move_pages",
|
|
55446
|
+
"name_to_handle_at",
|
|
55447
|
+
"open_by_handle_at",
|
|
55448
|
+
"perf_event_open",
|
|
55449
|
+
"pivot_root",
|
|
55450
|
+
"process_vm_readv",
|
|
55451
|
+
"process_vm_writev",
|
|
55452
|
+
"ptrace",
|
|
55453
|
+
"query_module",
|
|
55454
|
+
"quotactl",
|
|
55455
|
+
"reboot",
|
|
55456
|
+
"request_key",
|
|
55457
|
+
"set_mempolicy",
|
|
55458
|
+
"setns",
|
|
55459
|
+
"settimeofday",
|
|
55460
|
+
"stime",
|
|
55461
|
+
"swapon",
|
|
55462
|
+
"swapoff",
|
|
55463
|
+
"sysfs",
|
|
55464
|
+
"syslog",
|
|
55465
|
+
"umount",
|
|
55466
|
+
"umount2",
|
|
55467
|
+
"unshare",
|
|
55468
|
+
"uselib",
|
|
55469
|
+
"userfaultfd",
|
|
55470
|
+
"ustat",
|
|
55471
|
+
"vm86",
|
|
55472
|
+
"vm86old"
|
|
55473
|
+
],
|
|
55474
|
+
action: "SCMP_ACT_ERRNO",
|
|
55475
|
+
args: [],
|
|
55476
|
+
comment: "",
|
|
55477
|
+
includes: {},
|
|
55478
|
+
excludes: {}
|
|
55479
|
+
}
|
|
55480
|
+
]
|
|
55481
|
+
});
|
|
55482
|
+
});
|
|
55483
|
+
|
|
55415
55484
|
// src/engine/utils.ts
|
|
55416
55485
|
var exports_utils = {};
|
|
55417
55486
|
__export(exports_utils, {
|
|
@@ -56155,7 +56224,19 @@ function wrapWithTimeout(cmd, timeoutSec) {
|
|
|
56155
56224
|
function getInstallCommand(runtime, packages) {
|
|
56156
56225
|
switch (runtime) {
|
|
56157
56226
|
case "python":
|
|
56158
|
-
return [
|
|
56227
|
+
return [
|
|
56228
|
+
"pip",
|
|
56229
|
+
"install",
|
|
56230
|
+
"--user",
|
|
56231
|
+
"--no-cache-dir",
|
|
56232
|
+
"--break-system-packages",
|
|
56233
|
+
"--disable-pip-version-check",
|
|
56234
|
+
"--retries",
|
|
56235
|
+
"0",
|
|
56236
|
+
"--timeout",
|
|
56237
|
+
"15",
|
|
56238
|
+
...packages
|
|
56239
|
+
];
|
|
56159
56240
|
case "node":
|
|
56160
56241
|
return ["npm", "install", "--prefix", "/sandbox", ...packages];
|
|
56161
56242
|
case "bun":
|
|
@@ -56168,8 +56249,9 @@ function getInstallCommand(runtime, packages) {
|
|
|
56168
56249
|
throw new Error(`Unknown runtime for package install: ${runtime}`);
|
|
56169
56250
|
}
|
|
56170
56251
|
}
|
|
56171
|
-
async function installPackages(container, runtime, packages) {
|
|
56172
|
-
const
|
|
56252
|
+
async function installPackages(container, runtime, packages, timeoutMs) {
|
|
56253
|
+
const timeoutSec = Math.max(1, Math.ceil(timeoutMs / 1000));
|
|
56254
|
+
const cmd = wrapWithTimeout(getInstallCommand(runtime, packages), timeoutSec);
|
|
56173
56255
|
logger.debug(`Installing packages: ${JSON.stringify(cmd)}`);
|
|
56174
56256
|
const env2 = [
|
|
56175
56257
|
"PATH=/sandbox/.local/bin:/sandbox/.npm-global/bin:/sandbox/.bun-global/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
|
@@ -56180,6 +56262,12 @@ async function installPackages(container, runtime, packages) {
|
|
|
56180
56262
|
env2.push("NPM_CONFIG_PREFIX=/sandbox/.npm-global");
|
|
56181
56263
|
env2.push("NPM_CONFIG_CACHE=/sandbox/.npm-cache");
|
|
56182
56264
|
env2.push("npm_config_cache=/sandbox/.npm-cache");
|
|
56265
|
+
env2.push("NPM_CONFIG_FETCH_RETRIES=0");
|
|
56266
|
+
env2.push("npm_config_fetch_retries=0");
|
|
56267
|
+
env2.push("NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=1000");
|
|
56268
|
+
env2.push("npm_config_fetch_retry_mintimeout=1000");
|
|
56269
|
+
env2.push("NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=2000");
|
|
56270
|
+
env2.push("npm_config_fetch_retry_maxtimeout=2000");
|
|
56183
56271
|
} else if (runtime === "bun") {
|
|
56184
56272
|
env2.push("BUN_INSTALL_GLOBAL_DIR=/sandbox/.bun-global");
|
|
56185
56273
|
env2.push("BUN_INSTALL_CACHE_DIR=/sandbox/.bun-cache");
|
|
@@ -56201,7 +56289,13 @@ async function installPackages(container, runtime, packages) {
|
|
|
56201
56289
|
const stderrStream = new PassThrough;
|
|
56202
56290
|
container.modem.demuxStream(stream, stdoutStream, stderrStream);
|
|
56203
56291
|
stderrStream.on("data", (chunk) => {
|
|
56204
|
-
|
|
56292
|
+
const text = chunk.toString();
|
|
56293
|
+
stderr += text;
|
|
56294
|
+
logger.debug(`[install:${runtime}:stderr] ${text.trimEnd()}`);
|
|
56295
|
+
});
|
|
56296
|
+
stdoutStream.on("data", (chunk) => {
|
|
56297
|
+
const text = chunk.toString();
|
|
56298
|
+
logger.debug(`[install:${runtime}:stdout] ${text.trimEnd()}`);
|
|
56205
56299
|
});
|
|
56206
56300
|
stream.on("end", async () => {
|
|
56207
56301
|
try {
|
|
@@ -56531,7 +56625,7 @@ class DockerIsol8 {
|
|
|
56531
56625
|
const filePath = `${SANDBOX_WORKDIR}/main${ext}`;
|
|
56532
56626
|
await writeFileViaExec(container, filePath, request.code);
|
|
56533
56627
|
if (request.installPackages?.length) {
|
|
56534
|
-
await installPackages(container, request.runtime, request.installPackages);
|
|
56628
|
+
await installPackages(container, request.runtime, request.installPackages, timeoutMs);
|
|
56535
56629
|
}
|
|
56536
56630
|
if (request.files) {
|
|
56537
56631
|
for (const [fPath, fContent] of Object.entries(request.files)) {
|
|
@@ -56660,7 +56754,7 @@ class DockerIsol8 {
|
|
|
56660
56754
|
rawCmd = adapter.getCommand(req.code, filePath);
|
|
56661
56755
|
}
|
|
56662
56756
|
if (req.installPackages?.length) {
|
|
56663
|
-
await installPackages(container, req.runtime, req.installPackages);
|
|
56757
|
+
await installPackages(container, req.runtime, req.installPackages, timeoutMs);
|
|
56664
56758
|
}
|
|
56665
56759
|
const timeoutSec = Math.ceil(timeoutMs / 1000);
|
|
56666
56760
|
let cmd;
|
|
@@ -56768,7 +56862,7 @@ class DockerIsol8 {
|
|
|
56768
56862
|
const rawCmd = adapter.getCommand(req.code, filePath);
|
|
56769
56863
|
const timeoutSec = Math.ceil(timeoutMs / 1000);
|
|
56770
56864
|
if (req.installPackages?.length) {
|
|
56771
|
-
await installPackages(this.container, req.runtime, req.installPackages);
|
|
56865
|
+
await installPackages(this.container, req.runtime, req.installPackages, timeoutMs);
|
|
56772
56866
|
}
|
|
56773
56867
|
let cmd;
|
|
56774
56868
|
if (req.stdin) {
|
|
@@ -56911,17 +57005,15 @@ class DockerIsol8 {
|
|
|
56911
57005
|
const profile = readFileSync3(this.security.customProfilePath, "utf-8");
|
|
56912
57006
|
opts.push(`seccomp=${profile}`);
|
|
56913
57007
|
} catch (e) {
|
|
56914
|
-
|
|
57008
|
+
throw new Error(`Failed to load custom seccomp profile at ${this.security.customProfilePath}: ${e}`);
|
|
56915
57009
|
}
|
|
56916
57010
|
return opts;
|
|
56917
57011
|
}
|
|
56918
57012
|
try {
|
|
56919
57013
|
const profile = this.loadDefaultSeccompProfile();
|
|
56920
|
-
|
|
56921
|
-
opts.push(`seccomp=${profile}`);
|
|
56922
|
-
}
|
|
57014
|
+
opts.push(`seccomp=${profile}`);
|
|
56923
57015
|
} catch (e) {
|
|
56924
|
-
|
|
57016
|
+
throw new Error(`Failed to load default seccomp profile: ${e}`);
|
|
56925
57017
|
}
|
|
56926
57018
|
return opts;
|
|
56927
57019
|
}
|
|
@@ -56934,8 +57026,11 @@ class DockerIsol8 {
|
|
|
56934
57026
|
if (existsSync4(prodPath)) {
|
|
56935
57027
|
return readFileSync3(prodPath, "utf-8");
|
|
56936
57028
|
}
|
|
56937
|
-
|
|
56938
|
-
|
|
57029
|
+
if (EMBEDDED_DEFAULT_SECCOMP_PROFILE.length > 0) {
|
|
57030
|
+
logger.debug(`Default seccomp profile file not found. Using embedded profile. Tried: ${devPath.pathname}, ${prodPath.pathname}`);
|
|
57031
|
+
return EMBEDDED_DEFAULT_SECCOMP_PROFILE;
|
|
57032
|
+
}
|
|
57033
|
+
throw new Error("Embedded default seccomp profile is unavailable");
|
|
56939
57034
|
}
|
|
56940
57035
|
buildEnv(extra) {
|
|
56941
57036
|
const env2 = [
|
|
@@ -57160,6 +57255,7 @@ var init_docker = __esm(() => {
|
|
|
57160
57255
|
init_logger();
|
|
57161
57256
|
init_audit();
|
|
57162
57257
|
init_code_fetcher();
|
|
57258
|
+
init_default_seccomp_profile();
|
|
57163
57259
|
init_image_builder();
|
|
57164
57260
|
init_pool();
|
|
57165
57261
|
import_dockerode = __toESM(require_docker(), 1);
|
|
@@ -57171,7 +57267,7 @@ var package_default;
|
|
|
57171
57267
|
var init_package = __esm(() => {
|
|
57172
57268
|
package_default = {
|
|
57173
57269
|
name: "isol8",
|
|
57174
|
-
version: "0.11.
|
|
57270
|
+
version: "0.11.3",
|
|
57175
57271
|
description: "Secure code execution engine for AI agents",
|
|
57176
57272
|
author: "Illusion47586",
|
|
57177
57273
|
license: "MIT",
|
|
@@ -58919,6 +59015,50 @@ async function createServer(options) {
|
|
|
58919
59015
|
logger.debug(`[Server] Auto-prune: ${config.cleanup.autoPrune}`);
|
|
58920
59016
|
const app = new Hono2;
|
|
58921
59017
|
const globalSemaphore = new Semaphore(config.maxConcurrent);
|
|
59018
|
+
let pruneInterval;
|
|
59019
|
+
let cleanupInFlight = null;
|
|
59020
|
+
const cleanupSessions = async () => {
|
|
59021
|
+
let removed = 0;
|
|
59022
|
+
let failed = 0;
|
|
59023
|
+
const errors = [];
|
|
59024
|
+
for (const [id, session] of sessions) {
|
|
59025
|
+
try {
|
|
59026
|
+
await session.engine.stop();
|
|
59027
|
+
removed++;
|
|
59028
|
+
} catch (err) {
|
|
59029
|
+
failed++;
|
|
59030
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
59031
|
+
errors.push(`${id}: ${errorMsg}`);
|
|
59032
|
+
} finally {
|
|
59033
|
+
sessions.delete(id);
|
|
59034
|
+
}
|
|
59035
|
+
}
|
|
59036
|
+
return { removed, failed, errors };
|
|
59037
|
+
};
|
|
59038
|
+
const runCleanup = async (includeImages) => {
|
|
59039
|
+
if (cleanupInFlight) {
|
|
59040
|
+
return cleanupInFlight;
|
|
59041
|
+
}
|
|
59042
|
+
cleanupInFlight = (async () => {
|
|
59043
|
+
logger.info(`[Server] Starting cleanup (sessions=true containers=true images=${includeImages})`);
|
|
59044
|
+
const sessionsResult = await cleanupSessions();
|
|
59045
|
+
const containersResult = await DockerIsol82.cleanup();
|
|
59046
|
+
const result = {
|
|
59047
|
+
sessions: sessionsResult,
|
|
59048
|
+
containers: containersResult
|
|
59049
|
+
};
|
|
59050
|
+
if (includeImages) {
|
|
59051
|
+
result.images = await DockerIsol82.cleanupImages();
|
|
59052
|
+
}
|
|
59053
|
+
logger.info(`[Server] Cleanup complete: sessions=${result.sessions.removed}/${result.sessions.failed} containers=${result.containers.removed}/${result.containers.failed}${result.images ? ` images=${result.images.removed}/${result.images.failed}` : ""}`);
|
|
59054
|
+
return result;
|
|
59055
|
+
})();
|
|
59056
|
+
try {
|
|
59057
|
+
return await cleanupInFlight;
|
|
59058
|
+
} finally {
|
|
59059
|
+
cleanupInFlight = null;
|
|
59060
|
+
}
|
|
59061
|
+
};
|
|
58922
59062
|
app.use("*", authMiddleware(options.apiKey));
|
|
58923
59063
|
app.get("/health", (c) => c.json({ status: "ok", version: VERSION }));
|
|
58924
59064
|
app.post("/execute", async (c) => {
|
|
@@ -59099,8 +59239,21 @@ async function createServer(options) {
|
|
|
59099
59239
|
}
|
|
59100
59240
|
return c.json({ ok: true });
|
|
59101
59241
|
});
|
|
59242
|
+
app.post("/cleanup", async (c) => {
|
|
59243
|
+
const body = await c.req.json().catch(() => ({}));
|
|
59244
|
+
const includeImages = body.images ?? true;
|
|
59245
|
+
logger.debug(`[Server] POST /cleanup images=${includeImages}`);
|
|
59246
|
+
try {
|
|
59247
|
+
const result = await runCleanup(includeImages);
|
|
59248
|
+
return c.json({ ok: true, ...result });
|
|
59249
|
+
} catch (err) {
|
|
59250
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
59251
|
+
logger.error(`[Server] Cleanup failed: ${message}`);
|
|
59252
|
+
return c.json({ error: message }, 500);
|
|
59253
|
+
}
|
|
59254
|
+
});
|
|
59102
59255
|
if (config.cleanup.autoPrune) {
|
|
59103
|
-
setInterval(async () => {
|
|
59256
|
+
pruneInterval = setInterval(async () => {
|
|
59104
59257
|
const maxAge = config.cleanup.maxContainerAgeMs;
|
|
59105
59258
|
const now = Date.now();
|
|
59106
59259
|
for (const [id, session] of sessions) {
|
|
@@ -59118,7 +59271,15 @@ async function createServer(options) {
|
|
|
59118
59271
|
return {
|
|
59119
59272
|
app,
|
|
59120
59273
|
fetch: app.fetch,
|
|
59121
|
-
port: options.port
|
|
59274
|
+
port: options.port,
|
|
59275
|
+
cleanup: async (includeImages = true) => runCleanup(includeImages),
|
|
59276
|
+
shutdown: async (includeImages = true) => {
|
|
59277
|
+
if (pruneInterval) {
|
|
59278
|
+
clearInterval(pruneInterval);
|
|
59279
|
+
pruneInterval = undefined;
|
|
59280
|
+
}
|
|
59281
|
+
await runCleanup(includeImages);
|
|
59282
|
+
}
|
|
59122
59283
|
};
|
|
59123
59284
|
}
|
|
59124
59285
|
var sessions;
|
|
@@ -62633,7 +62794,7 @@ program2.command("setup").description("Check Docker and build isol8 images").opt
|
|
|
62633
62794
|
console.log(`
|
|
62634
62795
|
[DONE] Setup complete!`);
|
|
62635
62796
|
});
|
|
62636
|
-
program2.command("run").description("Execute code in isol8").argument("[file]", "Script file to execute").option("-e, --eval <code>", "Execute inline code string").option("-r, --runtime <name>", "Force runtime (python, node, bun, deno, bash)").option("--net <mode>", "Network mode: none, host, filtered", "none").option("--allow <regex>", "Whitelist regex for filtered mode (repeatable)", collect, []).option("--deny <regex>", "Blacklist regex for filtered mode (repeatable)", collect, []).option("--out <file>", "Write output to file").option("--persistent", "Use persistent container").option("--timeout <ms>", "Execution timeout in milliseconds").option("--memory <limit>", "Memory limit (e.g. 512m, 1g)").option("--cpu <limit>", "CPU limit as fraction (e.g. 0.5, 2.0)").option("--image <name>", "Override Docker image").option("--pids-limit <n>", "Maximum number of processes").option("--
|
|
62797
|
+
program2.command("run").description("Execute code in isol8").argument("[file]", "Script file to execute").option("-e, --eval <code>", "Execute inline code string").option("-r, --runtime <name>", "Force runtime (python, node, bun, deno, bash)").option("--net <mode>", "Network mode: none, host, filtered", "none").option("--allow <regex>", "Whitelist regex for filtered mode (repeatable)", collect, []).option("--deny <regex>", "Blacklist regex for filtered mode (repeatable)", collect, []).option("--out <file>", "Write output to file").option("--persistent", "Use persistent container").option("--timeout <ms>", "Execution timeout in milliseconds").option("--memory <limit>", "Memory limit (e.g. 512m, 1g)").option("--cpu <limit>", "CPU limit as fraction (e.g. 0.5, 2.0)").option("--image <name>", "Override Docker image").option("--pids-limit <n>", "Maximum number of processes").option("--max-output <bytes>", "Maximum output size in bytes").option("--secret <KEY=VALUE>", "Secret env var (repeatable, values masked)", collect, []).option("--sandbox-size <size>", "Sandbox tmpfs size (e.g. 128m, 512m)").option("--tmp-size <size>", "Tmp tmpfs size (e.g. 256m, 512m)").option("--stdin <data>", "Data to pipe to stdin").option("--install <package>", "Install package for runtime (repeatable)", collect, []).option("--url <url>", "Fetch code from URL").option("--github <path>", "GitHub shorthand: owner/repo/ref/path/to/file").option("--gist <path>", "Gist shorthand: gistId/file.ext").option("--hash <sha256>", "Expected SHA-256 hash of fetched code").option("--allow-insecure-code-url", "Allow insecure HTTP code URLs").option("--host <url>", "Execute on remote server").option("--key <key>", "API key for remote server").option("--no-stream", "Disable real-time output streaming").option("--debug", "Enable debug logging").option("--persist", "Keep container running after execution for inspection").option("--log-network", "Log all network requests (requires --net filtered)").action(async (file, opts) => {
|
|
62637
62798
|
const {
|
|
62638
62799
|
code,
|
|
62639
62800
|
codeUrl,
|
|
@@ -62762,9 +62923,39 @@ program2.command("serve").description("Start the isol8 remote server").option("-
|
|
|
62762
62923
|
logger.debug("[Serve] Running under Bun, starting server in-process");
|
|
62763
62924
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), exports_server));
|
|
62764
62925
|
const server = await createServer2({ port, apiKey, debug: opts.debug ?? false });
|
|
62926
|
+
let shuttingDown = false;
|
|
62927
|
+
const bunServer = Bun.serve({ fetch: server.app.fetch, port });
|
|
62928
|
+
const shutdown = async () => {
|
|
62929
|
+
if (shuttingDown) {
|
|
62930
|
+
return;
|
|
62931
|
+
}
|
|
62932
|
+
shuttingDown = true;
|
|
62933
|
+
logger.info("[Serve] Shutting down server and cleaning up resources...");
|
|
62934
|
+
bunServer.stop();
|
|
62935
|
+
try {
|
|
62936
|
+
await server.shutdown();
|
|
62937
|
+
logger.info("[Serve] Cleanup complete");
|
|
62938
|
+
process.exit(0);
|
|
62939
|
+
} catch (err) {
|
|
62940
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
62941
|
+
logger.error(`[Serve] Cleanup failed: ${message}`);
|
|
62942
|
+
process.exit(1);
|
|
62943
|
+
}
|
|
62944
|
+
};
|
|
62945
|
+
process.on("SIGINT", () => {
|
|
62946
|
+
shutdown().catch((err) => {
|
|
62947
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
62948
|
+
logger.error(`[Serve] Shutdown handler failed: ${message}`);
|
|
62949
|
+
});
|
|
62950
|
+
});
|
|
62951
|
+
process.on("SIGTERM", () => {
|
|
62952
|
+
shutdown().catch((err) => {
|
|
62953
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
62954
|
+
logger.error(`[Serve] Shutdown handler failed: ${message}`);
|
|
62955
|
+
});
|
|
62956
|
+
});
|
|
62765
62957
|
console.log(`[INFO] isol8 server v${VERSION} listening on http://localhost:${port}`);
|
|
62766
62958
|
console.log(" Auth: Bearer token required");
|
|
62767
|
-
Bun.serve({ fetch: server.app.fetch, port });
|
|
62768
62959
|
return;
|
|
62769
62960
|
}
|
|
62770
62961
|
logger.debug("[Serve] Running under Node.js, launching standalone binary");
|
|
@@ -63185,6 +63376,7 @@ program2.command("cleanup").description("Remove orphaned isol8 containers (and o
|
|
|
63185
63376
|
async function resolveRunInput(file, opts) {
|
|
63186
63377
|
const config = loadConfig();
|
|
63187
63378
|
logger.debug("[Run] Config loaded");
|
|
63379
|
+
const hasExplicitNetFlag = process.argv.some((arg) => arg === "--net");
|
|
63188
63380
|
let code;
|
|
63189
63381
|
let codeUrl;
|
|
63190
63382
|
let codeHash;
|
|
@@ -63249,7 +63441,6 @@ async function resolveRunInput(file, opts) {
|
|
|
63249
63441
|
timeoutMs: opts.timeout ? Number.parseInt(opts.timeout, 10) : config.defaults.timeoutMs,
|
|
63250
63442
|
...opts.image ? { image: opts.image } : {},
|
|
63251
63443
|
...opts.pidsLimit ? { pidsLimit: Number.parseInt(opts.pidsLimit, 10) } : {},
|
|
63252
|
-
...opts.writable ? { readonlyRootFs: false } : {},
|
|
63253
63444
|
...opts.maxOutput ? { maxOutputSize: Number.parseInt(opts.maxOutput, 10) } : {},
|
|
63254
63445
|
...opts.tmpSize ? { tmpSize: opts.tmpSize } : {},
|
|
63255
63446
|
debug: opts.debug ?? config.debug,
|
|
@@ -63258,6 +63449,20 @@ async function resolveRunInput(file, opts) {
|
|
|
63258
63449
|
dependencies: config.dependencies,
|
|
63259
63450
|
remoteCode: config.remoteCode
|
|
63260
63451
|
};
|
|
63452
|
+
if (opts.install.length > 0 && !hasExplicitNetFlag) {
|
|
63453
|
+
engineOptions.network = "filtered";
|
|
63454
|
+
logger.debug("[Run] --install detected without explicit --net; using filtered network mode automatically");
|
|
63455
|
+
}
|
|
63456
|
+
if (opts.install.length > 0 && engineOptions.network === "filtered") {
|
|
63457
|
+
const runtimeRegistryAllowlist = getDefaultRegistryAllowPatterns(runtime);
|
|
63458
|
+
if (runtimeRegistryAllowlist.length > 0) {
|
|
63459
|
+
engineOptions.networkFilter = {
|
|
63460
|
+
whitelist: Array.from(new Set([...engineOptions.networkFilter?.whitelist ?? [], ...runtimeRegistryAllowlist])),
|
|
63461
|
+
blacklist: engineOptions.networkFilter?.blacklist ?? []
|
|
63462
|
+
};
|
|
63463
|
+
logger.debug(`[Run] Added default package registries for ${runtime}: ${runtimeRegistryAllowlist.join(", ")}`);
|
|
63464
|
+
}
|
|
63465
|
+
}
|
|
63261
63466
|
logger.debug(`[Run] Engine options: mode=${engineOptions.mode}, network=${engineOptions.network}`);
|
|
63262
63467
|
let fileExtension;
|
|
63263
63468
|
if (file) {
|
|
@@ -63333,6 +63538,19 @@ function detectRuntimeFromPath(pathValue) {
|
|
|
63333
63538
|
return;
|
|
63334
63539
|
}
|
|
63335
63540
|
}
|
|
63541
|
+
function getDefaultRegistryAllowPatterns(runtime) {
|
|
63542
|
+
switch (runtime) {
|
|
63543
|
+
case "python":
|
|
63544
|
+
return ["^pypi\\.org$", "^files\\.pythonhosted\\.org$"];
|
|
63545
|
+
case "node":
|
|
63546
|
+
case "bun":
|
|
63547
|
+
return ["^registry\\.npmjs\\.org$"];
|
|
63548
|
+
case "bash":
|
|
63549
|
+
return ["^dl-cdn\\.alpinelinux\\.org$"];
|
|
63550
|
+
default:
|
|
63551
|
+
return [];
|
|
63552
|
+
}
|
|
63553
|
+
}
|
|
63336
63554
|
function collect(value, previous) {
|
|
63337
63555
|
return previous.concat([value]);
|
|
63338
63556
|
}
|
|
@@ -63342,4 +63560,4 @@ if (!process.argv.slice(2).length) {
|
|
|
63342
63560
|
}
|
|
63343
63561
|
program2.parse();
|
|
63344
63562
|
|
|
63345
|
-
//# debugId=
|
|
63563
|
+
//# debugId=CC119428D90FAE3C64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -546,6 +546,73 @@ class Semaphore {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
// src/engine/default-seccomp-profile.ts
|
|
550
|
+
var EMBEDDED_DEFAULT_SECCOMP_PROFILE;
|
|
551
|
+
var init_default_seccomp_profile = __esm(() => {
|
|
552
|
+
EMBEDDED_DEFAULT_SECCOMP_PROFILE = JSON.stringify({
|
|
553
|
+
defaultAction: "SCMP_ACT_ALLOW",
|
|
554
|
+
architectures: ["SCMP_ARCH_X86_64", "SCMP_ARCH_X86", "SCMP_ARCH_X32", "SCMP_ARCH_AARCH64"],
|
|
555
|
+
syscalls: [
|
|
556
|
+
{
|
|
557
|
+
names: [
|
|
558
|
+
"acct",
|
|
559
|
+
"add_key",
|
|
560
|
+
"bpf",
|
|
561
|
+
"clock_adjtime",
|
|
562
|
+
"clock_settime",
|
|
563
|
+
"create_module",
|
|
564
|
+
"delete_module",
|
|
565
|
+
"finit_module",
|
|
566
|
+
"get_mempolicy",
|
|
567
|
+
"init_module",
|
|
568
|
+
"ioperm",
|
|
569
|
+
"iopl",
|
|
570
|
+
"kcmp",
|
|
571
|
+
"kexec_file_load",
|
|
572
|
+
"kexec_load",
|
|
573
|
+
"keyctl",
|
|
574
|
+
"lookup_dcookie",
|
|
575
|
+
"mbind",
|
|
576
|
+
"mount",
|
|
577
|
+
"move_pages",
|
|
578
|
+
"name_to_handle_at",
|
|
579
|
+
"open_by_handle_at",
|
|
580
|
+
"perf_event_open",
|
|
581
|
+
"pivot_root",
|
|
582
|
+
"process_vm_readv",
|
|
583
|
+
"process_vm_writev",
|
|
584
|
+
"ptrace",
|
|
585
|
+
"query_module",
|
|
586
|
+
"quotactl",
|
|
587
|
+
"reboot",
|
|
588
|
+
"request_key",
|
|
589
|
+
"set_mempolicy",
|
|
590
|
+
"setns",
|
|
591
|
+
"settimeofday",
|
|
592
|
+
"stime",
|
|
593
|
+
"swapon",
|
|
594
|
+
"swapoff",
|
|
595
|
+
"sysfs",
|
|
596
|
+
"syslog",
|
|
597
|
+
"umount",
|
|
598
|
+
"umount2",
|
|
599
|
+
"unshare",
|
|
600
|
+
"uselib",
|
|
601
|
+
"userfaultfd",
|
|
602
|
+
"ustat",
|
|
603
|
+
"vm86",
|
|
604
|
+
"vm86old"
|
|
605
|
+
],
|
|
606
|
+
action: "SCMP_ACT_ERRNO",
|
|
607
|
+
args: [],
|
|
608
|
+
comment: "",
|
|
609
|
+
includes: {},
|
|
610
|
+
excludes: {}
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
|
|
549
616
|
// src/engine/image-builder.ts
|
|
550
617
|
import { createHash as createHash2 } from "node:crypto";
|
|
551
618
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
@@ -1087,7 +1154,19 @@ function wrapWithTimeout(cmd, timeoutSec) {
|
|
|
1087
1154
|
function getInstallCommand(runtime, packages) {
|
|
1088
1155
|
switch (runtime) {
|
|
1089
1156
|
case "python":
|
|
1090
|
-
return [
|
|
1157
|
+
return [
|
|
1158
|
+
"pip",
|
|
1159
|
+
"install",
|
|
1160
|
+
"--user",
|
|
1161
|
+
"--no-cache-dir",
|
|
1162
|
+
"--break-system-packages",
|
|
1163
|
+
"--disable-pip-version-check",
|
|
1164
|
+
"--retries",
|
|
1165
|
+
"0",
|
|
1166
|
+
"--timeout",
|
|
1167
|
+
"15",
|
|
1168
|
+
...packages
|
|
1169
|
+
];
|
|
1091
1170
|
case "node":
|
|
1092
1171
|
return ["npm", "install", "--prefix", "/sandbox", ...packages];
|
|
1093
1172
|
case "bun":
|
|
@@ -1100,8 +1179,9 @@ function getInstallCommand(runtime, packages) {
|
|
|
1100
1179
|
throw new Error(`Unknown runtime for package install: ${runtime}`);
|
|
1101
1180
|
}
|
|
1102
1181
|
}
|
|
1103
|
-
async function installPackages(container, runtime, packages) {
|
|
1104
|
-
const
|
|
1182
|
+
async function installPackages(container, runtime, packages, timeoutMs) {
|
|
1183
|
+
const timeoutSec = Math.max(1, Math.ceil(timeoutMs / 1000));
|
|
1184
|
+
const cmd = wrapWithTimeout(getInstallCommand(runtime, packages), timeoutSec);
|
|
1105
1185
|
logger.debug(`Installing packages: ${JSON.stringify(cmd)}`);
|
|
1106
1186
|
const env = [
|
|
1107
1187
|
"PATH=/sandbox/.local/bin:/sandbox/.npm-global/bin:/sandbox/.bun-global/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
|
@@ -1112,6 +1192,12 @@ async function installPackages(container, runtime, packages) {
|
|
|
1112
1192
|
env.push("NPM_CONFIG_PREFIX=/sandbox/.npm-global");
|
|
1113
1193
|
env.push("NPM_CONFIG_CACHE=/sandbox/.npm-cache");
|
|
1114
1194
|
env.push("npm_config_cache=/sandbox/.npm-cache");
|
|
1195
|
+
env.push("NPM_CONFIG_FETCH_RETRIES=0");
|
|
1196
|
+
env.push("npm_config_fetch_retries=0");
|
|
1197
|
+
env.push("NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=1000");
|
|
1198
|
+
env.push("npm_config_fetch_retry_mintimeout=1000");
|
|
1199
|
+
env.push("NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=2000");
|
|
1200
|
+
env.push("npm_config_fetch_retry_maxtimeout=2000");
|
|
1115
1201
|
} else if (runtime === "bun") {
|
|
1116
1202
|
env.push("BUN_INSTALL_GLOBAL_DIR=/sandbox/.bun-global");
|
|
1117
1203
|
env.push("BUN_INSTALL_CACHE_DIR=/sandbox/.bun-cache");
|
|
@@ -1133,7 +1219,13 @@ async function installPackages(container, runtime, packages) {
|
|
|
1133
1219
|
const stderrStream = new PassThrough;
|
|
1134
1220
|
container.modem.demuxStream(stream, stdoutStream, stderrStream);
|
|
1135
1221
|
stderrStream.on("data", (chunk) => {
|
|
1136
|
-
|
|
1222
|
+
const text = chunk.toString();
|
|
1223
|
+
stderr += text;
|
|
1224
|
+
logger.debug(`[install:${runtime}:stderr] ${text.trimEnd()}`);
|
|
1225
|
+
});
|
|
1226
|
+
stdoutStream.on("data", (chunk) => {
|
|
1227
|
+
const text = chunk.toString();
|
|
1228
|
+
logger.debug(`[install:${runtime}:stdout] ${text.trimEnd()}`);
|
|
1137
1229
|
});
|
|
1138
1230
|
stream.on("end", async () => {
|
|
1139
1231
|
try {
|
|
@@ -1463,7 +1555,7 @@ class DockerIsol8 {
|
|
|
1463
1555
|
const filePath = `${SANDBOX_WORKDIR}/main${ext}`;
|
|
1464
1556
|
await writeFileViaExec(container, filePath, request.code);
|
|
1465
1557
|
if (request.installPackages?.length) {
|
|
1466
|
-
await installPackages(container, request.runtime, request.installPackages);
|
|
1558
|
+
await installPackages(container, request.runtime, request.installPackages, timeoutMs);
|
|
1467
1559
|
}
|
|
1468
1560
|
if (request.files) {
|
|
1469
1561
|
for (const [fPath, fContent] of Object.entries(request.files)) {
|
|
@@ -1592,7 +1684,7 @@ class DockerIsol8 {
|
|
|
1592
1684
|
rawCmd = adapter.getCommand(req.code, filePath);
|
|
1593
1685
|
}
|
|
1594
1686
|
if (req.installPackages?.length) {
|
|
1595
|
-
await installPackages(container, req.runtime, req.installPackages);
|
|
1687
|
+
await installPackages(container, req.runtime, req.installPackages, timeoutMs);
|
|
1596
1688
|
}
|
|
1597
1689
|
const timeoutSec = Math.ceil(timeoutMs / 1000);
|
|
1598
1690
|
let cmd;
|
|
@@ -1700,7 +1792,7 @@ class DockerIsol8 {
|
|
|
1700
1792
|
const rawCmd = adapter.getCommand(req.code, filePath);
|
|
1701
1793
|
const timeoutSec = Math.ceil(timeoutMs / 1000);
|
|
1702
1794
|
if (req.installPackages?.length) {
|
|
1703
|
-
await installPackages(this.container, req.runtime, req.installPackages);
|
|
1795
|
+
await installPackages(this.container, req.runtime, req.installPackages, timeoutMs);
|
|
1704
1796
|
}
|
|
1705
1797
|
let cmd;
|
|
1706
1798
|
if (req.stdin) {
|
|
@@ -1843,17 +1935,15 @@ class DockerIsol8 {
|
|
|
1843
1935
|
const profile = readFileSync3(this.security.customProfilePath, "utf-8");
|
|
1844
1936
|
opts.push(`seccomp=${profile}`);
|
|
1845
1937
|
} catch (e) {
|
|
1846
|
-
|
|
1938
|
+
throw new Error(`Failed to load custom seccomp profile at ${this.security.customProfilePath}: ${e}`);
|
|
1847
1939
|
}
|
|
1848
1940
|
return opts;
|
|
1849
1941
|
}
|
|
1850
1942
|
try {
|
|
1851
1943
|
const profile = this.loadDefaultSeccompProfile();
|
|
1852
|
-
|
|
1853
|
-
opts.push(`seccomp=${profile}`);
|
|
1854
|
-
}
|
|
1944
|
+
opts.push(`seccomp=${profile}`);
|
|
1855
1945
|
} catch (e) {
|
|
1856
|
-
|
|
1946
|
+
throw new Error(`Failed to load default seccomp profile: ${e}`);
|
|
1857
1947
|
}
|
|
1858
1948
|
return opts;
|
|
1859
1949
|
}
|
|
@@ -1866,8 +1956,11 @@ class DockerIsol8 {
|
|
|
1866
1956
|
if (existsSync4(prodPath)) {
|
|
1867
1957
|
return readFileSync3(prodPath, "utf-8");
|
|
1868
1958
|
}
|
|
1869
|
-
|
|
1870
|
-
|
|
1959
|
+
if (EMBEDDED_DEFAULT_SECCOMP_PROFILE.length > 0) {
|
|
1960
|
+
logger.debug(`Default seccomp profile file not found. Using embedded profile. Tried: ${devPath.pathname}, ${prodPath.pathname}`);
|
|
1961
|
+
return EMBEDDED_DEFAULT_SECCOMP_PROFILE;
|
|
1962
|
+
}
|
|
1963
|
+
throw new Error("Embedded default seccomp profile is unavailable");
|
|
1871
1964
|
}
|
|
1872
1965
|
buildEnv(extra) {
|
|
1873
1966
|
const env = [
|
|
@@ -2092,6 +2185,7 @@ var init_docker = __esm(() => {
|
|
|
2092
2185
|
init_logger();
|
|
2093
2186
|
init_audit();
|
|
2094
2187
|
init_code_fetcher();
|
|
2188
|
+
init_default_seccomp_profile();
|
|
2095
2189
|
init_image_builder();
|
|
2096
2190
|
init_pool();
|
|
2097
2191
|
MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
@@ -2235,7 +2329,8 @@ var DEFAULT_CONFIG = {
|
|
|
2235
2329
|
cpuLimit: 1,
|
|
2236
2330
|
network: "none",
|
|
2237
2331
|
sandboxSize: "512m",
|
|
2238
|
-
tmpSize: "256m"
|
|
2332
|
+
tmpSize: "256m",
|
|
2333
|
+
readonlyRootFs: true
|
|
2239
2334
|
},
|
|
2240
2335
|
network: {
|
|
2241
2336
|
whitelist: [],
|
|
@@ -2304,7 +2399,8 @@ function mergeConfig(defaults, overrides) {
|
|
|
2304
2399
|
maxConcurrent: overrides.maxConcurrent ?? defaults.maxConcurrent,
|
|
2305
2400
|
defaults: {
|
|
2306
2401
|
...defaults.defaults,
|
|
2307
|
-
...overrides.defaults
|
|
2402
|
+
...overrides.defaults,
|
|
2403
|
+
readonlyRootFs: overrides.defaults?.readonlyRootFs ?? defaults.defaults.readonlyRootFs
|
|
2308
2404
|
},
|
|
2309
2405
|
network: {
|
|
2310
2406
|
whitelist: overrides.network?.whitelist ?? defaults.network.whitelist,
|
|
@@ -2349,7 +2445,7 @@ init_logger();
|
|
|
2349
2445
|
// package.json
|
|
2350
2446
|
var package_default = {
|
|
2351
2447
|
name: "isol8",
|
|
2352
|
-
version: "0.11.
|
|
2448
|
+
version: "0.11.3",
|
|
2353
2449
|
description: "Secure code execution engine for AI agents",
|
|
2354
2450
|
author: "Illusion47586",
|
|
2355
2451
|
license: "MIT",
|
|
@@ -2501,6 +2597,50 @@ async function createServer(options) {
|
|
|
2501
2597
|
logger.debug(`[Server] Auto-prune: ${config.cleanup.autoPrune}`);
|
|
2502
2598
|
const app = new Hono;
|
|
2503
2599
|
const globalSemaphore = new Semaphore(config.maxConcurrent);
|
|
2600
|
+
let pruneInterval;
|
|
2601
|
+
let cleanupInFlight = null;
|
|
2602
|
+
const cleanupSessions = async () => {
|
|
2603
|
+
let removed = 0;
|
|
2604
|
+
let failed = 0;
|
|
2605
|
+
const errors = [];
|
|
2606
|
+
for (const [id, session] of sessions) {
|
|
2607
|
+
try {
|
|
2608
|
+
await session.engine.stop();
|
|
2609
|
+
removed++;
|
|
2610
|
+
} catch (err) {
|
|
2611
|
+
failed++;
|
|
2612
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
2613
|
+
errors.push(`${id}: ${errorMsg}`);
|
|
2614
|
+
} finally {
|
|
2615
|
+
sessions.delete(id);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
return { removed, failed, errors };
|
|
2619
|
+
};
|
|
2620
|
+
const runCleanup = async (includeImages) => {
|
|
2621
|
+
if (cleanupInFlight) {
|
|
2622
|
+
return cleanupInFlight;
|
|
2623
|
+
}
|
|
2624
|
+
cleanupInFlight = (async () => {
|
|
2625
|
+
logger.info(`[Server] Starting cleanup (sessions=true containers=true images=${includeImages})`);
|
|
2626
|
+
const sessionsResult = await cleanupSessions();
|
|
2627
|
+
const containersResult = await DockerIsol82.cleanup();
|
|
2628
|
+
const result = {
|
|
2629
|
+
sessions: sessionsResult,
|
|
2630
|
+
containers: containersResult
|
|
2631
|
+
};
|
|
2632
|
+
if (includeImages) {
|
|
2633
|
+
result.images = await DockerIsol82.cleanupImages();
|
|
2634
|
+
}
|
|
2635
|
+
logger.info(`[Server] Cleanup complete: sessions=${result.sessions.removed}/${result.sessions.failed} containers=${result.containers.removed}/${result.containers.failed}${result.images ? ` images=${result.images.removed}/${result.images.failed}` : ""}`);
|
|
2636
|
+
return result;
|
|
2637
|
+
})();
|
|
2638
|
+
try {
|
|
2639
|
+
return await cleanupInFlight;
|
|
2640
|
+
} finally {
|
|
2641
|
+
cleanupInFlight = null;
|
|
2642
|
+
}
|
|
2643
|
+
};
|
|
2504
2644
|
app.use("*", authMiddleware(options.apiKey));
|
|
2505
2645
|
app.get("/health", (c) => c.json({ status: "ok", version: VERSION }));
|
|
2506
2646
|
app.post("/execute", async (c) => {
|
|
@@ -2681,8 +2821,21 @@ async function createServer(options) {
|
|
|
2681
2821
|
}
|
|
2682
2822
|
return c.json({ ok: true });
|
|
2683
2823
|
});
|
|
2824
|
+
app.post("/cleanup", async (c) => {
|
|
2825
|
+
const body = await c.req.json().catch(() => ({}));
|
|
2826
|
+
const includeImages = body.images ?? true;
|
|
2827
|
+
logger.debug(`[Server] POST /cleanup images=${includeImages}`);
|
|
2828
|
+
try {
|
|
2829
|
+
const result = await runCleanup(includeImages);
|
|
2830
|
+
return c.json({ ok: true, ...result });
|
|
2831
|
+
} catch (err) {
|
|
2832
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
2833
|
+
logger.error(`[Server] Cleanup failed: ${message}`);
|
|
2834
|
+
return c.json({ error: message }, 500);
|
|
2835
|
+
}
|
|
2836
|
+
});
|
|
2684
2837
|
if (config.cleanup.autoPrune) {
|
|
2685
|
-
setInterval(async () => {
|
|
2838
|
+
pruneInterval = setInterval(async () => {
|
|
2686
2839
|
const maxAge = config.cleanup.maxContainerAgeMs;
|
|
2687
2840
|
const now = Date.now();
|
|
2688
2841
|
for (const [id, session] of sessions) {
|
|
@@ -2700,7 +2853,15 @@ async function createServer(options) {
|
|
|
2700
2853
|
return {
|
|
2701
2854
|
app,
|
|
2702
2855
|
fetch: app.fetch,
|
|
2703
|
-
port: options.port
|
|
2856
|
+
port: options.port,
|
|
2857
|
+
cleanup: async (includeImages = true) => runCleanup(includeImages),
|
|
2858
|
+
shutdown: async (includeImages = true) => {
|
|
2859
|
+
if (pruneInterval) {
|
|
2860
|
+
clearInterval(pruneInterval);
|
|
2861
|
+
pruneInterval = undefined;
|
|
2862
|
+
}
|
|
2863
|
+
await runCleanup(includeImages);
|
|
2864
|
+
}
|
|
2704
2865
|
};
|
|
2705
2866
|
}
|
|
2706
2867
|
export {
|
|
@@ -2717,4 +2878,4 @@ export {
|
|
|
2717
2878
|
BunAdapter
|
|
2718
2879
|
};
|
|
2719
2880
|
|
|
2720
|
-
//# debugId=
|
|
2881
|
+
//# debugId=91FAFD2CE7996A4E64756E2164756E21
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,QAAA,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,QAAA,MAAM,cAAc,EAAE,WA0DrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAepD;AAiDD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedded default seccomp profile.
|
|
3
|
+
*
|
|
4
|
+
* This keeps strict seccomp available in standalone compiled binaries where
|
|
5
|
+
* docker/seccomp-profile.json may not be present on disk.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EMBEDDED_DEFAULT_SECCOMP_PROFILE: string;
|
|
8
|
+
//# sourceMappingURL=default-seccomp-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-seccomp-profile.d.ts","sourceRoot":"","sources":["../../../src/engine/default-seccomp-profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,QA6D3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/engine/docker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,WAAW,EAEX,YAAY,EAKZ,YAAY,EACZ,WAAW,EACZ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/engine/docker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,WAAW,EAEX,YAAY,EAKZ,YAAY,EACZ,WAAW,EACZ,MAAM,UAAU,CAAC;AAuWlB,2HAA2H;AAC3H,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C,OAAO,CAAC,QAAQ,CAAC,MA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,MAAM,GACd,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CA2BlE"}
|
|
@@ -15,6 +15,23 @@ export interface ServerOptions {
|
|
|
15
15
|
/** Enable debug logging for internal server operations. */
|
|
16
16
|
debug?: boolean;
|
|
17
17
|
}
|
|
18
|
+
interface CleanupResult {
|
|
19
|
+
sessions: {
|
|
20
|
+
removed: number;
|
|
21
|
+
failed: number;
|
|
22
|
+
errors: string[];
|
|
23
|
+
};
|
|
24
|
+
containers: {
|
|
25
|
+
removed: number;
|
|
26
|
+
failed: number;
|
|
27
|
+
errors: string[];
|
|
28
|
+
};
|
|
29
|
+
images?: {
|
|
30
|
+
removed: number;
|
|
31
|
+
failed: number;
|
|
32
|
+
errors: string[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
18
35
|
/**
|
|
19
36
|
* Creates and configures the isol8 HTTP server.
|
|
20
37
|
*
|
|
@@ -36,5 +53,8 @@ export declare function createServer(options: ServerOptions): Promise<{
|
|
|
36
53
|
app: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
37
54
|
fetch: (request: Request, Env?: unknown, executionCtx?: import("hono").ExecutionContext) => Response | Promise<Response>;
|
|
38
55
|
port: number;
|
|
56
|
+
cleanup: (includeImages?: boolean) => Promise<CleanupResult>;
|
|
57
|
+
shutdown: (includeImages?: boolean) => Promise<void>;
|
|
39
58
|
}>;
|
|
59
|
+
export {};
|
|
40
60
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAS5B,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAS5B,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAaD,UAAU,aAAa;IACrB,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChE,UAAU,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAClE,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAChE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa;;;;;;GAyWxD"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -389,6 +389,8 @@ export interface Isol8Defaults {
|
|
|
389
389
|
sandboxSize: string;
|
|
390
390
|
/** Default size of the `/tmp` tmpfs mount. @default "256m" */
|
|
391
391
|
tmpSize: string;
|
|
392
|
+
/** Whether the root filesystem should be read-only. @default true */
|
|
393
|
+
readonlyRootFs: boolean;
|
|
392
394
|
}
|
|
393
395
|
/** Configuration for container cleanup and lifecycle. */
|
|
394
396
|
export interface Isol8Cleanup {
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAExC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC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{
|
|
144
|
+
"default": true,
|
|
145
|
+
"description": "Whether the root filesystem should be read-only.",
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
},
|
|
143
148
|
"sandboxSize": {
|
|
144
149
|
"default": "512m",
|
|
145
150
|
"description": "Default size of the `/sandbox` tmpfs mount.",
|