fix: restrict docker commands for ai-worker (SUPERSEDED by PR #65) #64
Closed
Hermes
wants to merge 1 commits from
feat/restrict-docker-commands-for-ai-worker into master
pull from: feat/restrict-docker-commands-for-ai-worker
merge into: gortium:master
gortium:master
gortium:feat/worldmonitor
gortium:feat/ups-config
gortium:feat/rollback-sentinel-on-fresh-branch
gortium:fix/honcho-vector-dim-empty
gortium:fix/backup-submodule-update
gortium:feat/restrict-docker-blacklist
gortium:fix/hermes-matrix-deps-venv-persist
gortium:feat/uconsole-cm5-v3
gortium:fix/update-compose-submodule-matrix-bridge
gortium:feat/nix-deployment-v2
gortium:kvm-pr
gortium:feat/nixos-ci-workflow
gortium:kvm-pr-consolidate
gortium:feat/hermes-workspace-combined
gortium:feat/hyperspace-pods-module
gortium:feat/hermes-workspace
gortium:feat/hermes-workers
gortium:feat/add-paperclip-agent-orchestrator
gortium:feat/syncthing-org-sync
gortium:fix/vpn-iptables-nft-v3
gortium:fix/vpn-iptables-nft-v2
gortium:fix/vpn-iptables-nft-upstream
gortium:feat/nixos-ci
gortium:feat/update-compose-submodule-custom-tools
gortium:feat/kvm-libvirt
gortium:fix/wg-easy-iptables-nft
gortium:feat/compose-submodule-v2
gortium:feat/hermes-fork-dockerfile
gortium:ai-worker-restricted-access
gortium:feat/wireguard-vpn
gortium:feat/k3s-pod-cluster
gortium:feature/server-hardening-clean
gortium:docs/merge-priority-order
gortium:feat/hermes-voice-gpu-support
gortium:feat/uconsole-cm5-v2
gortium:fix/matrix-bridge-v2
gortium:fix/backup-network-v2
gortium:feat/docker-add-qemu-cross-compilation
gortium:feat/docker-add-latex-stack
gortium:feat/docker-add-chromium-browser-deps
gortium:feat/docker-add-curl-poppler-imagemagick
gortium:feat/add-uconsole-host
gortium:home_manager
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 9459839d74 |
fix: restrict docker commands for ai-worker user
Remove ai-worker from docker group and enforce sudo whitelist. SECURITY: Being in the docker group gives unrestricted access to the Docker daemon socket (/var/run/docker.sock), allowing any docker command: docker exec, docker cp, docker run -v /:/host, docker commit, etc. Changes: - Remove extraGroups = ["docker"] from ai-worker user definition - Add comprehensive sudo NOPASSWD whitelist for safe docker subcommands ALLOWED: ps, inspect, logs, images, info, version, stats, start, stop, restart, rm, rmi, wait, pull, build, run, compose, system, network ls, volume ls BLOCKED (implicitly): exec, cp, commit, diff, export, import, load, save, attach, push, tag, create, plugin, network create, volume create - Update ai-worker-restricted.nix module to reflect new approach - Update README-ai-worker.md with new security model and examples All docker commands must now be prefixed with sudo. The Hermes agent's host_run tool needs to be updated to prepend sudo. |