codex-image-gen
Pass
Audited by Gen Agent Trust Hub on Oct 30, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/codex_image.pyexecutes the externalcodexbinary using thesubprocess.Popenfunction. The implementation correctly passes the command as a list rather than a shell string, which follows security best practices for preventing shell injection vulnerabilities. - [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted data in the form of text prompts and reference images, which are then passed to the image generation model. This creates a standard surface for indirect prompt injection where instructions could be hidden in the data to influence the model's output or tool usage.
- Ingestion points: The script accepts untrusted user input via the
--prompt,--prompt-file,--edit, and--referencearguments inscripts/codex_image.py. - Boundary markers: The script wraps the user-provided request in internal templates like
PREAMBLEandEDIT_PREAMBLE. While these guide the model's behavior, they do not serve as formal security boundaries or sanitization layers. - Capability inventory: The skill has the capability to execute the
codexCLI and write files (generated images) to the local filesystem. - Sanitization: No sanitization, filtering, or escaping is performed on the input prompt text before it is passed to the execution tool.
Audit Metadata