components/execd 1.1.0
What's New
✨ Features
-
execd as sandbox init (OSEP-0018). execd can now run as PID 1: single reaper with a
managedProcessabstraction on every launch path, signal forwarding (TERM/HUP/USR1/USR2/WINCH), entrypoint-owned exit-code propagation, and a subreaper fallback for the Pool path. Opt-in viaEXECD_INIT=1(injected by the server'sruntime.execd_run_as_initfor Docker/K8s Batch/Agent/Pool); classic topology unchanged and default off. (#1474) -
Pre-exec hardening floor. The new
opensandbox-launchernative helper applies env strip → KEEPCAPS → bounding-set trim →no_new_privs→ identity drop → seccomp → execve;[landlock]adds a filesystem allowlist (fail-open below ABI/kernel 5.13, reported asunsupported).GET /v1/isolated/capabilitiesgains ahardeningobject with per-layer state; every layer degrades fail-open. (#1474) -
eBPF observation variant.
execd-ebpf(CGO + cilium/ebpf) hooks exec/connect/privilege with CO-RE, scoped to the sandbox cgroup, emitting a rotating JSONL audit; needs kernel ≥5.10 with BTF. The default image is unchanged. (#1474 #1562) -
preStartandperiodiclifecycle hooks (OSEP-0020).CreateSandboxRequest.lifecycleis transported to the sandbox via the internalOPEN_SANDBOX_LIFECYCLEenv (Kubernetes; the Docker provider rejects lifecycle requests). execd starts HTTP beforepreStart, runs non-overlappingperiodichooks through the reaper-aware managed-process path, and only releases the user process afterpreStartsucceeds. Config persists at$HOME/.execd/lifecycle.toml, withEXECD_LIFECYCLE_CONFIGas exact override; bootstrap sync and preStart shutdown are fail-closed with TERM/KILL watchdogs, and internal transport vars are stripped from user code. API models aligned across Go/Python/JS/Kotlin/C# SDKs. (#1587 #1588 #1589)
🐛 Bug Fixes
-
In-namespace signals no longer leak into
/commandin init mode.kill -HUP 1previously killed whatever/commandwas running (signal: hangup); signals are now owned by the init forwarder only. (#1546) -
PTY creation failure emitted a second success body.
POST /ptynow stops immediately after the error response instead of appending a success body and a nonexistent session id. (#1603) -
cwdvalidation now honors request-scoped envs. Foreground/background/commandrequests can use acwdvariable from their ownenvsmap instead of being rejected with 400. (#1611) -
Non-root workloads could not start:
/bootstrap.shnormalized to0755. A deployed image carriedbootstrap.shas0751 root:root, sending images with a non-root default user (e.g.admin) into CrashLoopBackOff before hooks ran. The image build now forces exec bits onexecd/execd-ebpf/opensandbox-supervisor/bootstrap.shregardless of checkout permissions. (#1619 #1606) -
preStarttimeout raised from 300s to 10800s (3h).periodic.timeoutSecondsstays at 300s; product policy bounds are now enforced Server-side only, with execd keeping just a technical overflow guard. (#1637)
📦 Misc
-
OSEP-0018 coverage closed out: server-path and Kubernetes hardening e2e (ConfigMap-carried isolation TOML, no server logic change), PTY-under-hardening, bwrap + init-reaper integration, custom
[seccomp]/keep_capabilitiespolicy,EXECD_INIT↔TOML drift pin, K8s Restart recycle against init-mode pods, runtime-initiated stop, and anexecd-ebpfbare-container smoke (doubles as kernel-5.10 validation). Test redundancy and dead code trimmed (-359 lines). (#1554 #1555 #1562 #1574) -
OTLP endpoint auto-allow shipped in the shared components (egress honors
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT/OTEL_EXPORTER_OTLP_ENDPOINT; PTY viewer read loop refactored along the way). (#1504) -
Lifecycle hook guide with timing diagram and per-SDK creation examples; SDK client-side timeout validation aligned with the Server. (#1605)
👥 Contributors
Thanks to these contributors ❤️
- Docker Hub: opensandbox/execd:v1.1.0
- Aliyun Registry: sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.1.0
- GHCR: ghcr.io/opensandbox-group/opensandbox/execd:v1.1.0