Files
Yash Shah a9d1c6554b feat(v0.7): Docker sandbox backend for real isolation
Context:
- Subprocess + netns probes are not enough for production agent code execution.
- Ephemeral docker run --rm with --network=none and optional --memory is the
  essential isolation path for agentbox-backed products like agentforge.

Test Plan:
- docker compose run --rm test
- ruff check src tests
- pytest tests/test_docker.py (mocks CLI; live skip without docker)

Additional Notes:
- Default remains subprocess for local/CI unit tests.
- Set AGENTBOX_SANDBOX_BACKEND=docker (plus Docker CLI/daemon) for production.
2026-09-14 23:49:33 +05:30

1.1 KiB

Security Policy

Reporting a vulnerability

Email yash376351@gmail.com with the repo name, a short description, and steps to reproduce. Please do not open a public issue for exploitable findings until we have had a reasonable chance to respond.

Threat model (honest)

agentbox executes untrusted code on your machine via a configurable sandbox backend.

  • Recommended: AGENTBOX_SANDBOX_BACKEND=docker — ephemeral containers (--rm, --network=none, optional --memory). Still not gVisor/Firecracker; do not expose it to the public internet without additional hardening/auth.
  • Default: subprocess + optional RLIMIT_AS — convenient for local tests, not production-grade isolation.
  • Credential stripping and timeouts reduce accidents; they are not a full kernel isolation story.
  • limits.memory_mb uses Docker --memory (docker backend) or RLIMIT_AS (subprocess); behavior differs by OS/backend.
  • Snapshots persist workspace files on disk under AGENTBOX_SNAPSHOT_DIR.
  • Prefer running the API only on trusted networks, behind auth you add yourself.