codex-gateway-imagegen
Fail
Audited by Gen Agent Trust Hub on Aug 28, 2026
Risk Level: HIGHCREDENTIALS_UNSAFEPRIVILEGE_ESCALATIONDATA_EXFILTRATIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [PRIVILEGE_ESCALATION]: The skill instructions in
SKILL.mdandreferences/troubleshooting.mdexplicitly direct the agent to "rerun the same command with escalated host-network access" if sandboxed requests fail due to networking or TLS errors. This is a direct instruction for the agent to attempt to bypass security boundaries and request higher permissions than originally granted. - [CREDENTIALS_UNSAFE]: The Python script
scripts/generate_gateway_image.pyis designed to read sensitive authentication data from the user's home directory. It specifically accesses~/.codex/auth.jsonto retrieveOPENAI_API_KEYandaccess_tokenvalues. - [DATA_EXFILTRATION]: The script extracts local authentication tokens and transmits them in an
Authorization: Bearerheader to a remote API gateway. While it defaults to a well-known service, the destination URL is dynamically loaded from~/.codex/config.toml, which could allow exfiltration to an arbitrary endpoint if the configuration is modified. - [COMMAND_EXECUTION]: The skill's primary function is implemented through the execution of a Python script (
scripts/generate_gateway_image.py) that performs network operations and file system writes based on command-line arguments provided by the agent. - [INDIRECT_PROMPT_INJECTION]: The skill exhibits an indirect prompt injection surface by ingesting untrusted data from external image URLs (
--image-url) and user-supplied prompts. These are interpolated into a JSON payload and sent to a remote model gateway. - Ingestion points: User-provided prompt and remote image URLs in
scripts/generate_gateway_image.py. - Boundary markers: The script does not use specific delimiters or instructions to prevent the remote model from following instructions embedded in the image content or prompt.
- Capability inventory: The script has the capability to write files to the workspace (
Path.write_bytes) and perform network requests (urlopen). - Sanitization: No evidence of sanitization or filtering of the input prompt or remote content before transmission.
Recommendations
- AI detected serious security threats
Audit Metadata