Docker Sandboxes flaw let an agent kit update steal API keys

A Docker Sandboxes flaw let an approved AI agent kit later send real Anthropic, OpenAI or GitHub keys to an attacker. What to check and rotate.

Docker Sandboxes: Rotate keys used by agents in Docker Sandboxes

TL;DR: A flaw in Docker Sandboxes let an add-on for an AI coding agent, once approved, pick up the developer's real Anthropic, OpenAI or GitHub key through a later update. If your team runs coding agents in Docker Sandboxes, treat those keys as exposed and rotate them.

What happened

The Hacker News reports on research from Endor Labs about Docker Sandboxes, a product that isolates AI coding agents in their own virtual machines. The design goal is that the agent never sees the real API keys. The research found that a third-party agent kit could get around that promise. A developer approves the kit once, and a later update to the same kit can then send the real key to a server the attacker controls, without asking the developer again.

The report names Anthropic, OpenAI and GitHub keys as the ones at risk. It does not give a CVE id or a fixed version in the material we reviewed, so check Docker's own advisory for the current guidance before you decide what to upgrade.

Am I affected?

You may be if any developer or build machine runs an AI coding agent in Docker Sandboxes with a third-party agent kit. The risk comes from the update path: an add-on that looked safe when it was approved can change later. Work through these checks by hand:

  • List which agent kits each developer has approved, and who publishes them.
  • Remove kits nobody needs and pin the rest to a version you have reviewed.
  • Rotate the Anthropic, OpenAI and GitHub keys those developers use, and look at the provider's usage logs for calls from unexpected places.
  • Use keys with the narrowest scope and a spending limit, so a stolen one does little harm.

How to check with Stackurity

To be plain about coverage: Stackurity does not read the approved agent kits inside Docker Sandboxes, so it cannot tell you which kit a developer approved. What it does help with is the damage a stolen key causes. The agent and repository scans find keys and tokens written in files, including Anthropic, OpenAI and GitHub keys, and give each one an owner and a rotate-by date. Read how that works in our leaked keys documentation. The values never leave the machine. Only the file, the line and a masked preview are reported.

With the opt-in --docker flag the agent also reads the images of running Docker containers on a Linux host, and it matches Docker Engine and containerd packages from Docker's own repository against known vulnerabilities. Our guide to updating OS packages safely on Debian and RHEL covers the routine side of keeping those hosts current. After you rotate a key, a later scan shows whether the old one is really gone. You can try it with a Stackurity Cloud trial.