
AI Code Review Invented a CVE: Why Read-Only Agents Still Bite
Enterprise Developer PlatformsA platform engineer bumped a bundled PostgreSQL from 16.11 to 16.13, a two-line change meant to close known vulnerabilities. His self-hosted AI code reviewer answered with about 1,500 words calling it an “architectural takeover”, cited a CVE that has never been issued, and told him to revoke all IAM access immediately. The bot was read-only and couldn’t do any of it. For DevSecOps teams running AI reviewers in CI, that’s the uncomfortable part: the risk was the person who might act on the report.
What Happened
Docker’s sixth Coding Agent Horror Story, submitted by Pratik Kumar Singh, describes BuaJi, a review bot that runs on local models through Ollama as a CI job. No code leaves the company. Its one firm rule: read and comment only. No terraform apply, no kubectl apply, no commits.
On the version bump, BuaJi’s report claimed the new PostgreSQL build would send internal data to a named third-party company that doesn’t exist. It named Kubernetes resources as if it had inspected the cluster, though it had no cluster access and the resources never existed. It wrote Go scripts to “isolate the infected PostgreSQL nodes”, when nothing was infected. The Markdown was clean, the proposed YAML would have parsed, and the tone was urgent. The engineer spent about two minutes on the CI logs, saw none of it was real, and moved on.
Why It Matters
Docker is clear that the read-only rule worked: the episode cost two minutes. But the rule controlled what the bot could do, not what it could say, and the person reading its output usually has exactly the access the bot was denied. Docker’s scenario is a newer engineer on call at 2 a.m. who takes the report at face value. Revoking all IAM access in production is an outage on its own, and running unreviewed scripts against database nodes could be worse. No permission model would flag it, because no permission was violated.
The fabricated detail landed where it was easiest to check. A CVE identifier can be looked up in a public registry in seconds, yet the report still looked convincing.
What This Means for Builders
Docker’s answer has two halves. The first is its own product: Docker Sandboxes run agents in isolated microVMs with their own kernel and filesystem and a deny-by-default network, so the read-only rule becomes a property of the environment rather than one engineer’s pipeline config that someone might later copy and change. The post walks through moving BuaJi into one, keeping the model on the GPU runner and noting that, as originally run, the bot shared a container with every CI variable, including CI_JOB_TOKEN.
The second half applies to any setup, and Docker says no sandbox will fix it: treat agent output as untrusted, like agent input. Label AI review comments so they don’t carry a colleague’s weight, verify any CVE number before acting, and never run agent-written remediation until a person has read and understood it.
Stack Archive covered Datadog’s test of self-replicating prompt injection, where an agent’s final message also hid what it had done. Together they show why agent output needs checks of its own.
The So What
Teams with AI reviewers in CI should add one automated check today: any CVE ID in a bot comment is looked up in a public registry, and the comment is flagged if it doesn’t exist. Mark bot reviews visibly as machine-generated, keep them out of on-call alerting, and require a human to approve any remediation command an AI reviewer suggests.
Source: Docker
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →