docker run -it -v "$HOME":/home/agent agent-imagedocker run -it --rm \
--network none \
-v "$PWD":/workspace -w /workspace \
agent-imageMounting only the project and turning off the network keeps SSH keys and tokens out of reach and blocks data from leaving.
It is a good start if it mounts only the project, has no secrets inside and limits the network. Mounting the home folder or the Docker socket removes most of the protection.
Approvals get tiring and people stop reading them. A sandbox limits the damage when a bad command or a prompt injection slips through.
Yes, if the network allowlist includes the package registry. Keep other domains blocked so injected instructions cannot send data out.