
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@agentforge-ai/sandbox
Advanced tools
Docker-based sandbox provider for AgentForge agent tool execution isolation
Docker-based sandbox provider for AgentForge agent tool execution isolation.
This package implements container-based isolation for agent tool execution using Docker. It provides:
DockerSandbox — a container-backed SandboxProvider that manages the full lifecycle of a Docker containerContainerPool — a warm-container pool to amortise Docker cold-start latency (LRU eviction, idle timeout)SandboxManager — factory that creates the right sandbox type (Docker vs E2B) based on config, with graceful shutdown on process exitpnpm add @agentforge-ai/sandbox dockerode
import { SandboxManager } from '@agentforge-ai/sandbox';
const manager = new SandboxManager({ provider: 'docker' });
await manager.initialize();
const sb = await manager.create({ scope: 'agent', workspaceAccess: 'none' });
const { stdout, exitCode } = await sb.exec('node --version');
console.log(stdout); // v22.x.x
await sb.writeFile('/tmp/hello.js', 'console.log("hello from container")');
const result = await sb.exec('node /tmp/hello.js');
console.log(result.stdout); // hello from container
await manager.destroy(sb);
await manager.shutdown();
DockerSandboxConfig| Field | Type | Default | Description |
|---|---|---|---|
scope | 'session' | 'agent' | 'shared' | required | Lifecycle scope |
workspaceAccess | 'none' | 'ro' | 'rw' | required | Host workspace mount mode |
image | string | 'node:22-slim' | Docker image |
workspacePath | string | — | Host workspace directory |
containerWorkspacePath | string | '/workspace' | Mount point inside container |
resourceLimits.cpuShares | number | Docker default | CPU weight |
resourceLimits.memoryMb | number | unlimited | Memory cap in MB |
resourceLimits.pidsLimit | number | 256 | Max PIDs in container |
resourceLimits.networkDisabled | boolean | false | Disable networking |
binds | string[] | [] | Extra bind mounts (host:container:mode) |
env | Record<string, string> | {} | Environment variables |
timeout | number | none | Auto-kill after N seconds |
PoolConfigconst pool = new ContainerPool({
image: 'node:22-slim',
scope: 'agent',
maxSize: 3, // warm containers to keep ready (default: 3)
idleTimeoutSeconds: 300 // evict after 5 min idle (default: 300)
});
await pool.warmUp();
const sb = await pool.acquire();
// ... use sandbox ...
await pool.release(sb);
await pool.drain(); // cleanup
| Variable | Description |
|---|---|
DOCKER_HOST | Docker daemon host (default: Unix socket) |
DOCKER_IMAGE | Default image for agent sandboxes |
AGENTFORGE_ALLOWED_IMAGES | Comma-separated image prefixes allowed in production |
/var/run/docker.sock, /etc, /proc, /sys, /dev, /boot, /rootCapDrop: ALL)SecurityOpt: no-new-privileges:true applied to every containerNODE_ENV=production), only images with approved prefixes are allowedConnects to the Docker daemon via:
/var/run/docker.sockSandboxManager({ dockerHost: { host, port, protocol } })DOCKER_HOST environment variabledockerode peer dependencyApache-2.0
FAQs
Docker-based sandbox provider for AgentForge agent tool execution isolation
The npm package @agentforge-ai/sandbox receives a total of 0 weekly downloads. As such, @agentforge-ai/sandbox popularity was classified as not popular.
We found that @agentforge-ai/sandbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.