image-to-ui-skill

Pass

Audited by Gen Agent Trust Hub on Aug 28, 2026

Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/image2_asset.py uses subprocess.run to execute image generation tools. It supports an environment variable IMAGE2_COMMAND which acts as a template for shell commands. The script safely parses this template using shlex.split and executes the command list without shell=True, mitigating common shell injection risks while allowing user-defined tool integration.
  • [DYNAMIC_EXECUTION]: The utility scripts/validate_demo.mjs uses the Chrome DevTools Protocol (CDP) to interact with a headless browser. It employs Runtime.evaluate to execute JavaScript snippets within the browser context to verify the state and integrity of generated UI demos. The scripts executed are defined statically within the project's validation configuration files.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted input in the form of user-supplied UI images and descriptive prompts to generate front-end code. This creates a potential surface for indirect prompt injection where instructions embedded in design references could attempt to influence the agent's code generation behavior.
  • Ingestion points: User-provided UI images and textual descriptions processed by SKILL.md and scripts/image2_asset.py.
  • Boundary markers: The instructions in SKILL.md provide clear logical boundaries and rules (e.g., 'image2 最小闭环') to separate code generation from image generation, although they do not use explicit text delimiters for the untrusted inputs.
  • Capability inventory: The skill has access to file system operations (Read, Write, Edit), shell command execution (Bash), and browser automation capabilities.
  • Sanitization: The Python wrapper uses shlex for argument parsing and subprocess with list-based arguments to prevent simple shell-based injection attacks during tool invocation.
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 28, 2026, 10:08 AM