Gungnir Hardened Container Sandbox & Isolation Jail

Gungnir Hardened Container Sandbox & Isolation Jail

Official Core
@deepseek-ai/dsh-sandbox-gungnir·v2.1.2·sandbox

A zero-trust hardened container sandbox for executing untrusted AI code. Powered by Linux namespaces, strict seccomp syscall filters, and read-only rootfs with sub-millisecond cold starts.

Sandbox · Zero-Trust · Container · Seccomp

GitHubNPM
Installation & Integration
bash
manager:
$ pnpm add @deepseek-ai/dsh-sandbox-gungnir

Architecture

Gungnir Sandbox provides an impenetrable safety perimeter for autonomous code execution. When LLMs write and test scripts, catastrophic errors—such as recursive file deletions, secret leaks, or accidental port scans—can easily compromise host machines. This plugin leverages Linux namespaces, cgroups v2, and seccomp-BPF filters directly via Cordis. Execution occurs within isolated, ephemeral overlay filesystems where host mounts remain strictly read-only. Network egress can be disabled entirely or restricted to explicit domain whitelists, providing zero-trust isolation with sub-second lifecycle teardowns.

Core Features

01

Complete Linux Namespaces Isolation: Fully partitions net, pid, mount, and ipc domains

02

Seccomp-BPF Syscall Shield: Blacklists dangerous kernel primitives including ptrace and mount

03

Granular Egress Firewall: Allows full offline airgap or strict domain whitelist tunneling

04

Instant Ephemeral Cleanup: All disk writes reside on overlay RAM, vanishing instantly upon exit

Core Workflow

01

Ephemeral Jail Boot

Instantiates an isolated namespace with read-only rootfs and writable OverlayFS.

02

Seccomp Policy Compilation

Applies strict seccomp-BPF filters blocking privileged kernel system calls.

03

Sandboxed Execution

Executes target scripts bounded by strict memory, CPU, and egress quotas.

04

Artifact Extraction & Kill

Collects standard outputs and generated artifacts before destroying the jail.

Configuration Parameters Reference (YAML / JSON)

ParameterTypeDefaultDescription
memoryLimitMbnumber1024Maximum memory limit in megabytes
allowInternetbooleanfalseAllow outbound internet egress
timeoutSecondsnumber120Execution timeout limit before SIGKILL