What goes wrong
Most serious findings against Codex fall into two groups: files it trusts when it loads, and parsers that misjudge which commands are safe. The main risks are:
- Repository configuration: a project ships
.codex/config.toml, MCP servers, hooks, rules or anAGENTS.mdthat run or approve things you never chose. - Turned-off protections:
--yolo, full access orapproval_policy = "never"on a machine that holds credentials. - Secret exposure: the agent reads
.envfiles or credential folders and sends them out over the network or through a tool. - Injected instructions: web pages, issues, emails and MCP output steer the agent.
- Extension supply chain: MCP servers, plugins and skills are third-party code running with your rights.
- Platform gaps: Windows-specific paths and parsers that behave differently from Linux and macOS.