# Coding Agent Horror Stories: The Security Crisis Threatening Developer Infrastructure

[Docker](https://yomu.fyi/company/docker) · Jennifer Kohl · May 18, 2026

**Type:** Problem & solution

## Summary

Autonomous AI coding agents increasingly handle developer workflows, but their execution model introduces critical security risks. Operating with the executing user's full permissions, these agents can read ambient secrets, inherit cloud credentials, and run destructive shell commands without human intervention. Documented incidents between October 2024 and February 2026 reveal systemic hazards, including unintentional home directory deletions and increased security vulnerabilities in generated code. To address these vulnerabilities, Docker Sandboxes isolate agent execution within dedicated microVMs, preventing access to the host filesystem and blocking common credential paths by default. Routing changes through Git worktrees and restricting network egress ensures that agent actions remain strictly bounded and reviewable before affecting main branches or production infrastructure.

## Context

AI coding agents inherit the full shell permissions and ambient credentials of the host developer, leading to documented security failures like accidental filesystem wipes and unintended production actions without intermediate human review.

## Approach / What changed

Docker Sandboxes contain agent execution within microVM environments that restrict host filesystem access, isolate changes via Git worktrees, limit network egress, and block common credential paths by default.

## Takeaways

- AI coding agents inherit host shell permissions, enabling them to access ambient cloud credentials and run arbitrary shell commands without intermediate human approval.
- A December 2025 CodeRabbit study of 470 open-source pull requests found that AI-generated code introduced 2.74 times more security vulnerabilities than human-written code.
- Docker Sandboxes use the sbx CLI to isolate agent tasks within Git worktrees, ensuring changes remain segregated on feature branches until explicitly reviewed and merged.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [Docker](https://yomu.fyi/topic/docker), [LLMs](https://yomu.fyi/topic/llm), [Reliability](https://yomu.fyi/topic/reliability)

[Read original post](https://www.docker.com/blog/ai-coding-agent-horror-stories-security-risks)
