OpenAI just pushed codex-security to GitHub – an npm-installable scanner that runs a three-stage analysis of a repository and tries to auto-fix bugs.

What the launch glosses over is a deeper flaw that recent sandbox-bypass demos have laid bare. Researchers showed that agents running inside “locked-down” environments for tools such as Cursor, Codex CLI, Gemini CLI and Google Antigravity can still escape the intended protection by exploiting the very interfaces that connect the sandbox to the host system. The new OpenAI scanner does not touch that attack surface.

How the bypasses work

The agents stay inside their containers, but everything they write to disk is immediately trusted by external helpers – git hooks, Python extensions, Docker daemons, and similar services. Those helpers read the files, treat them as legitimate, and execute them on the host without prompting the user.

  • Cursor let an agent register a git hook that ran outside the sandbox.
  • Codex CLI failed to validate parameters in git commands, opening a path for arbitrary execution.
  • Several agents received direct access to the Docker socket, a privileged entry point that lets code spin up containers on the host machine.
  • DuneSlide vulnerabilities let an attacker overwrite the component that enforces the sandbox, effectively removing the wall altogether.

In each case the exploit arrived silently – a web-search result or a response from a multi-choice-prompt (MCP) tool that the agent consumed. The malicious payload executed, vanished, and never appeared in a static code scan.

Why OpenAI’s tool misses the mark

Codex-security focuses on static analysis: it inspects the source files you commit, flags insecure patterns, and can automatically rewrite them. That approach catches sloppy or dangerous code before it ships, but it scans the code you ship, while the attacks happen in the runtime environment of the agent itself.

The sandbox bypasses show that the real danger lies in the runtime bridge between the AI sandbox and the rest of the developer’s toolchain. An attacker does not need to inject malicious code into the repository; they only need to persuade the sandboxed agent to write a file that an external process will later execute.

Who wins, who loses

  • Developers
  • Tool vendors
  • OpenAI
  • Attackers

What the community can do now

The fixes that matter are operational, not just code-level. Here are practical steps that anyone integrating an AI coding agent should take:

  • Pin agent versions and read changelogs before upgrading. New releases can unintentionally open a new hook or socket.
  • Treat “clone and explore” as running unknown code. Never point an agent at a repository you do not control without additional isolation.
  • Audit every auxiliary tool (git hooks, Python extensions, Docker access). If a tool can modify a directory or a symlink based on agent output, assume it can be weaponized.
  • Remove Docker socket access from the sandbox.
  • Ask what reads what. Map the data flow from the sandbox to the host; any process that consumes files the agent writes must be scrutinized.

Counter-point: why codex-security still matters

The scanner improves one slice of the problem, but it does not replace the need to harden the runtime bridge.

What to watch next

  • Community-driven hardening guides that catalog safe configurations for common developer toolchains when paired with AI agents.

The headline may celebrate a new security scanner, but the real story is that an AI coding agent’s sandbox is only a façade if the surrounding ecosystem continues to trust everything it writes. The next wave of protection will have to start looking beyond the code and into the pipelines that execute it.