codex-imagegen-backend
Pass
Audited by Gen Agent Trust Hub on Jul 25, 2026
Risk Level: SAFEDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
- [DATA_EXFILTRATION]: The skill transmits user-provided text prompts and local image data to the OpenAI API endpoint at
https://chatgpt.com/backend-api/codex/responses. This network operation is necessary for the core functionality of generating images and targets a well-known, trusted service provider. - [PROMPT_INJECTION]: The skill processes untrusted input in the form of text prompts and image files, creating a surface for indirect prompt injection where embedded instructions could influence the agent's behavior.
- Ingestion points: Text prompts are ingested from the
--promptor--prompt-filearguments, and binary image data is read from local paths or URLs provided via--reference-imageor--edit-targetinscripts/codex_imagegen.py. - Boundary markers: The skill uses the
tool_choiceparameter in the API payload to force the model to use theimage_generationtool, which restricts the model's output to the intended generation task. - Capability inventory: The skill has capabilities to read local files, perform network POST requests, and write generated image data to the file system.
- Sanitization: The implementation includes a
_inspect_image_bytesfunction that verifies the structural integrity and signatures of PNG, JPEG, and WebP files before they are encoded and sent to the API, preventing the processing of non-image data masquerading as images.
Audit Metadata