Skip to content

Sandbox de seguridad

Documentación en español de Sandbox de seguridad, alineada con el monorepo y la guía inglesa.

Entrada rápida

sandbox/
├── execPolicy.ts           ← Execution policy definitions
├── approval.ts             ← Approval workflow for sensitive operations
├── profiles.ts             ← Security profiles (READ_ONLY, WORKSPACE_WRITE, FULL_ACCESS, HARDENED)
├── platforms.ts            ← Platform-specific sandbox configurations
├── manager.ts              ← Sandbox lifecycle management
├── executionRouter.ts      ← Route executions to appropriate backends
├── lane.ts                 ← Execution lane management
├── seccompBpf.ts           ← seccomp-BPF system call filtering (Linux)
├── teeEnclave.ts           ← Trusted Execution Environment sandbox
├── petriNetScheduler.ts    ← Petri net resource allocation
├── networkProxy.ts         ← Network proxy sandbox
├── backends/               ← Sandbox backend implementations
│   ├── localBackend.ts     ← Local execution
│   ├── sshBackend.ts       ← Remote SSH execution
│   └── dockerExecBackend.ts ← Docker container execution
└── types.ts                ← Shared types
typescript
interface ExecPolicy {
  allowShell: boolean;
  allowNetwork: boolean;
  allowFileWrite: boolean;
  allowFileDelete: boolean;
  allowedPaths: string[];
  deniedPaths: string[];
  maxExecutionTime: number;
  maxMemory: number;
}
typescript
import { ApprovalManager } from '@commander/core';

const approval = new ApprovalManager();

// Operations that trigger approval:
// - File deletion
// - External network requests
// - Shell commands with sudo
// - Modifying git configuration
ProfileShell AccessFile WriteNetworkBest For
READ_ONLY (strict)NoneRead-onlyBlockedCode review, untrusted input
WORKSPACE_WRITE (standard)Allowed (sandboxed)Project filesAllowedDevelopment
FULL_ACCESS (permissive)FullAnyAllowedCI/CD, automation
HARDENEDNoneDeniedBlockedUntrusted code execution
PlaceCapacityPurpose
pendingUnboundedRequests waiting for execution
v8_slots10V8 isolate execution slots
seccomp_slots4seccomp-BPF sandbox slots
wasm_slots2WebAssembly execution slots
tee_slots1Trusted Execution Environment slots
executingUnboundedCurrently executing requests
completedUnboundedFinished requests

Notas

  • CLI monorepo: cliEntry.ts · tras build: commander
  • Métricas: 25 proveedores · 5 topologías · 18 tools · 6700+ tests
  • Firmas API exactas: monorepo / API overview

Relacionado

MIT — Hecho para orquestación multi-agente.