codex-imagegen

Pass

Audited by Gen Agent Trust Hub on Nov 13, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [COMMAND_EXECUTION]: The skill interacts with the local environment by executing the codex CLI and internal Python scripts via subprocess.run and subprocess.Popen.
  • Evidence includes calls to codex login status, codex exec, and background execution of image_project.py.
  • The skill implements robust security controls for these operations, including the use of a sanitized environment (filtering os.environ to a specific whitelist of safe variables) and strict validation of command-line arguments to prevent shell injection.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted user data in the form of image briefs and reference PNG files which are passed to remote models.
  • Ingestion points: Inputs are ingested via the --prompt-file and --image arguments in run_codex_imagegen.py.
  • Boundary markers: The skill uses a dedicated "relay" system prompt that explicitly instructs the model to treat the brief as data rather than instructions. It also enforces a strict JSON schema for the model's output to prevent command or context leakage.
  • Capability inventory: The skill has the ability to execute the codex CLI, write PNG files to the local filesystem, and generate a local HTML gallery for image comparison.
  • Sanitization: The skill validates image headers (PNG, JPEG, WebP) to ensure they are valid image files, resolves paths to prevent directory traversal, and escapes HTML content using html.escape to prevent cross-site scripting (XSS) in the generated gallery.
  • [EXTERNAL_DOWNLOADS]: The skill requires the @openai/codex CLI tool to be installed globally via npm.
  • This dependency is a standard requirement for accessing the OpenAI Codex infrastructure through the CLI.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 13, 2026, 08:33 AM