KVM-based sandbox for secure AI agent code execution, email scanning, and CI isolation
- Dockerfile 62.7%
- Shell 37.3%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| docs | ||
| images | ||
| .gitignore | ||
| adversarial-audit.md | ||
| gap-analysis.md | ||
| prd.json | ||
| README.md | ||
CubeSandbox Integration
KVM-based sandbox service for secure AI agent code execution, email scanning, and CI isolation.
Source
- Upstream: https://github.com/TencentCloud/CubeSandbox
- License: Apache 2.0
Planned Use Cases
- Agent task execution — Replace
--dangerously-skip-permissionsClaude CLI with sandboxed execution - Email attachment scanning — Behavioral analysis in isolated VM (ClamAV + oletools)
- PR test isolation — Each PR test in its own hardware-isolated VM
- Dependency auditing — Install untrusted packages, monitor network calls via eBPF
- Client code sandbox — ContractPilot/ComplianceBot code review in isolation
- OpenClaw plugin execution — Untrusted LLM-generated code runs in VM
Architecture
Agent Worker → CubeAPI (REST) → CubeMaster → Cubelet → CubeHypervisor (KVM)
↓
CubeVS (eBPF network isolation)
Requirements
- Linux host with KVM (
/dev/kvm) - x86_64 with Intel VT / AMD-V
- 8+ CPU cores, 16+ GB RAM recommended
- BatKave: ✅ bare metal, KVM ready
- VPS: ❌ likely no nested KVM (Contabo)
Key Specs
| Metric | Value |
|---|---|
| Cold start | <60ms |
| Memory overhead | <5MB per sandbox |
| API | E2B-compatible REST |
| Network isolation | eBPF (blocks LAN, per-sandbox egress policy) |
| Guest images | Any OCI/Docker + envd daemon |
| License | Apache 2.0 |
Integration Points
apps/worker/src/executor.ts— swaprunCommand('claude-glm', ...)for CubeSandbox API callapps/monitor/— add CubeSandbox health check endpoint- Custom guest images: Ubuntu 22.04 + ClamAV + oletools (email), Node+Python (agent tasks)
Status
PLANNING — pending BatKave deployment and guest image build.