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.pyusessubprocess.runto execute image generation tools. It supports an environment variableIMAGE2_COMMANDwhich acts as a template for shell commands. The script safely parses this template usingshlex.splitand executes the command list withoutshell=True, mitigating common shell injection risks while allowing user-defined tool integration. - [DYNAMIC_EXECUTION]: The utility
scripts/validate_demo.mjsuses the Chrome DevTools Protocol (CDP) to interact with a headless browser. It employsRuntime.evaluateto 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.mdandscripts/image2_asset.py. - Boundary markers: The instructions in
SKILL.mdprovide 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
shlexfor argument parsing andsubprocesswith list-based arguments to prevent simple shell-based injection attacks during tool invocation.
Audit Metadata