codex-imagegen

Fail

Audited by Gen Agent Trust Hub on Jul 8, 2026

Risk Level: HIGHCOMMAND_EXECUTIONDATA_EXFILTRATIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DATA_EXFILTRATION]: The PowerShell helper script reads auth.json from the $CODEX_HOME directory. This file is a high-value target as it contains sensitive ChatGPT session tokens and OpenAI API keys. While the skill claims to use these only locally, any script reading credential stores introduces a risk of exposure to the agent context.
  • [COMMAND_EXECUTION]: The skill invokes the codex CLI using the --dangerously-bypass-approvals-and-sandbox flag. This command explicitly disables the safety mechanisms and user confirmation prompts intended to restrict the actions of the underlying agent on the host system.
  • [PROMPT_INJECTION]: The skill processes user-supplied input to drive a downstream AI agent, creating a surface for indirect prompt injection.
  • Ingestion points: The -Prompt parameter in scripts/codex-image.ps1 accepts arbitrary user text.
  • Boundary markers: The script attempts to use a "Hard rules:" block to constrain the downstream agent, but these can be subverted by adversarial input.
  • Capability inventory: The script performs subprocess execution (codex exec) and file system operations (copying images).
  • Sanitization: Input is sanitized to prevent shell argument injection (by escaping quotes), but no semantic sanitization is performed to prevent the user from overriding the instructions sent to the Codex agent.
  • [EXTERNAL_DOWNLOADS]: The skill instructions and preflight checks depend on the external @openai/codex package installed via npm.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Jul 8, 2026, 10:31 PM