# Sandboxed Agent Gateways: Secure Local Execution

Category: Agent Orchestration
Stack: Docker, Non-Root Containers, ClawdBot, API Gateways

## Overview
Hardening local developer agents against dangerous command execution, unauthorized filesystem access, and credential leakage.

## The Problem
Giving agents unrestrained root terminal access on local developer machines risks accidental data destruction or credential exposure.

## Production Rule
Mount only project-scoped subdirectories into non-root containers. Set execution timeouts and intercept sensitive shell commands (rm -rf, git push --force).

## Code / Specification
File: `docker-compose.agent.yml`

```security & infra
version: '3.8'
services:
  agent-runner:
    image: python:3.11-slim
    user: "1000:1000"
    working_dir: /workspace
    volumes:
      - ./project:/workspace:rw
    read_only: false
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
```
