deerflow2/scripts
Xinmin Zeng 5d61718c80
fix(security): mount host Docker socket only in aio (DooD) sandbox mode (#3517)
* fix(security): mount host Docker socket only in aio (DooD) sandbox mode

The default Compose stack mounted /var/run/docker.sock read-write into the
root gateway container in every sandbox mode, including the default `local`
mode that never uses it -- an unnecessary host-escape surface (DooD =
root-equivalent host control). deploy.sh already gated the socket *check* on
sandbox_mode != local, but the Compose files mounted it unconditionally.

Move the socket mount to an opt-in docker/docker-compose.dood.yaml overlay
that deploy.sh / docker.sh append only when detect_sandbox_mode() returns
`aio`. Default (local) and provisioner/Kubernetes modes no longer expose the
host daemon. Tighten the socket existence check from != local to == aio.
Document the DooD threat model in SECURITY.md.

Reported by @greatmengqi.

* refactor(docker): address review on socket-hardening PR

- docker.sh: use absolute path for the dood overlay (match deploy.sh, drop cwd dependency)
- deploy.sh: drop now-dead DEER_FLOW_DOCKER_SOCKET exports in down/build paths
- docker-compose.yaml: fix stale header comment to point at the overlay

Addresses codex + reviewer feedback on #3517.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-06-14 11:03:50 +08:00
..
wizard feat(community): add Brave Search web search tool (#3528) 2026-06-13 22:47:35 +08:00
_detector_cli.py chore(blocking-io): fail-loud repo-root resolution and shared detector CLI shim (#3512) 2026-06-12 17:16:01 +08:00
check.py fix(check): windows pnpm version detection in check script (#2189) 2026-04-14 10:29:44 +08:00
check.sh feat(dx): Setup Wizard + doctor command — closes #2030 (#2034) 2026-04-10 17:43:39 +08:00
cleanup-containers.sh feat: send custom event 2026-02-06 17:48:15 +08:00
config-upgrade.sh Fix Windows startup and dependency checks (#1709) 2026-04-01 23:13:00 +08:00
configure.py fix: make check/config cross-platform for Windows (#1080) (#1093) 2026-03-13 21:33:12 +08:00
deploy.sh fix(security): mount host Docker socket only in aio (DooD) sandbox mode (#3517) 2026-06-14 11:03:50 +08:00
detect_blocking_io_static.py chore(blocking-io): fail-loud repo-root resolution and shared detector CLI shim (#3512) 2026-06-12 17:16:01 +08:00
detect_thread_boundaries.py chore(blocking-io): fail-loud repo-root resolution and shared detector CLI shim (#3512) 2026-06-12 17:16:01 +08:00
detect_uv_extras.py feat(channels): enhance Discord with mention-only mode, thread routing, and typing indicators (#2842) 2026-05-15 22:30:05 +08:00
docker.sh fix(security): mount host Docker socket only in aio (DooD) sandbox mode (#3517) 2026-06-14 11:03:50 +08:00
doctor.py feat(community): add Brave Search web search tool (#3528) 2026-06-13 22:47:35 +08:00
export_claude_code_oauth.py feat: add Claude Code OAuth and Codex CLI as LLM providers (#1166) 2026-03-22 22:39:50 +08:00
load_memory_sample.py feat: add memory management actions and local filters in memory settings (#1467) 2026-03-29 13:14:45 +08:00
run-with-git-bash.cmd fix: use Git Bash for Windows local startup (#1551) 2026-03-29 21:38:29 +08:00
sandbox_memory_profile.py chore: add sandbox memory profiling tools (#3249) 2026-06-03 22:02:27 +08:00
scan_changed_blocking_io.py chore(blocking-io): fail-loud repo-root resolution and shared detector CLI shim (#3512) 2026-06-12 17:16:01 +08:00
serve.sh fix(scripts):start with make start-daemon,can not stop next-server with make stop (#3498) 2026-06-13 09:16:08 +08:00
setup_wizard.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
setup-sandbox.sh fix(makefile): extract setup-sandbox inline bash to script for Windows compatibility (#3326) 2026-06-01 07:28:13 +08:00
start-daemon.sh feat: unified serve.sh with gateway mode support (#1847) 2026-04-05 21:07:35 +08:00
sync_labels.py feat(ci): PR/issue auto-labeling + declarative label sync (#3360) 2026-06-03 16:40:24 +08:00
tool-error-degradation-detection.sh refactor(lead-agent): make build_middlewares public to drop the last cross-module private import (#3458) 2026-06-09 11:56:28 +08:00
wait-for-port.sh Fix 'make dev' failure in Windows environment (#3236) 2026-06-09 22:37:54 +08:00