Back to skill

Security audit

Ai Image Team

Security checks for vulnerabilities and agentic risk

Overview

The skill fits an e-commerce image workflow, but it can automatically run unverified local automation scripts and silently retain prompt/history data.

Review carefully before installing. Use only in a contained workspace, confirm any Jimeng or Liblib automation scripts are trusted and not writable by others, avoid putting confidential product plans or personal data in prompts, and do not rely on the built-in quality approval as real image inspection.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T07 · Tool Hijacking and Spoofing

Error
Location
tools/jimeng_tool.py:28
Finding

Untrusted External Automation Script Discovery and Execution

Content
View full analysis
Optional[str]: """查找即梦自动化脚本""" possible_paths = [ os.path.join(os.path.dirname(__file__), '../../jimeng/scripts/jimeng_auto.py'), os.path.expanduser('~/.openclaw/workspace/skills/jimeng/scripts/jimeng_auto.py'), 'skills/jimeng/scripts/jimeng_auto.py' ] for path in possible_paths: if os.path.exists(path): return os.path.abspath(path) return None ``` ```python def _call_script(self, prompt: str, negative_prompt: str, quantity: int, output_path: str, kwargs: Dict) -> Dict: cmd = [ "python", self.script_path, "--prompt", prompt, "--output", output_path, "--count", str(quantity) ] if negative_prompt: cmd.extend(["--negative", negative_prompt]) for key, value in kwargs.items(): cmd.extend([f"--{key}", str(value)]) process = subprocess.run( cmd, capture_output=True, text=True, timeout=300 ) ``` The Liblib wrapper uses the same trust model and execution pattern: ```python possible_paths = [ os.path.join(os.path.dirname(__file__), '../../liblib/scripts/liblib_auto.py'), os.path.expanduser('~/.openclaw/workspace/skills/liblib/scripts/liblib_auto.py'), 'skills/liblib/scripts/liblib_auto.py' ] for path in possible_paths: if os.path.exists(path): return os.path.abspath(path) ``` ```python process = subprocess.run( cmd, capture_output=True, text=True, timeout=300 ) ``` ### Technical Analysis The wrappers search for automation scripts outside the audited package, including paths under the user's OpenClaw workspace and paths relative t ...[truncated 2976 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
agents/maker.py:120
Finding

Fabricated Image Generation and Quality Approval Without File or Content Validation

Content
View full analysis
Dict: output_dir = f"output/jimeng/{timestamp}" return { "tool": "jimeng", "tool_name": "即梦", "status": "success", "images": [ { "path": f"{output_dir}/image_1.png", "thumbnail": f"{output_dir}/thumb_1.png" } ], "message": f"已使用即梦生成 {quantity} 张图片", "note": "即梦擅长海报和创意图,生成结果具有较强视觉冲击力" } ``` ```python def _call_liblib(self, prompt: str, negative_prompt: str, quantity: int, brief: Dict, timestamp: str) -> Dict: output_dir = f"output/liblib/{timestamp}" product_type = brief.get("product_info", {}).get("type", "") recommended_model = self._recommend_liblib_model(product_type) return { "tool": "liblib", "tool_name": "LiblibAI", "status": "success", "images": [ { "path": f"{output_dir}/image_1.png", "thumbnail": f"{output_dir}/thumb_1.png" } ], "model_used": recommended_model, "message": f"已使用 LiblibAI生成 {quantity} 张图片", "note": f"使用 {recommended_model} 模型,适合{product_type}类产品精修" } ``` The standalone wrappers exhibit the same behavior in fallback mode: ```python images = [] for i in range(quantity): images.append({ "path": os.path.join(output_path, f"image_{i+1}.png"), "thumbnail": os.path.join(output_path, f"thumb_{i+1}.png"), ...[truncated 4436 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (29)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill documentation, examples, and invocation phrases are presented only in Chinese, including the exact suggested prompts users should say. Under the policy, a skill should not force a specific language unless it clearly offers a language choice or documents a justified locale constraint; this README does neither.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises orchestration of multiple agents and references local files, config, and an agent.py coordinator, while static analysis indicates file, network, shell, and write capabilities without any declared permission boundary. In an auto-mode skill that may call downstream tools and sub-skills, missing scope declarations can lead to over-privileged execution, unintended filesystem modification, or silent external requests beyond user expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest specifies input language as "zh-CN", and the workflow text later states "用户输入中文需求", indicating a fixed language/locale requirement. This is a natural-language policy concern because the skill does not present this as an opt-in choice or explain why the locale restriction is necessary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The config block hard-codes language: "zh-CN", which indicates the skill is designed to operate only in Chinese. Without an explicit user choice or a documented region-specific justification, this constitutes a locale policy issue.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language triggers are generic phrases like '帮我生成一张...,' which overlap with ordinary user requests and can cause accidental invocation when a user is merely asking for help rather than explicitly consenting to activate this skill. Because this skill is designed for automatic multi-step execution and possible external tool use, ambiguous activation increases the chance of unintended data handling and side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill explicitly supports full-auto operation and external image-generation platforms, but it does not warn users that their prompts, product details, or other supplied content may be transmitted to third-party services. This creates a privacy and data-governance risk, especially for sensitive commercial assets, unreleased product information, or personal data embedded in requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring explicitly constrains user_input to a Chinese requirement description (用户中文需求描述), and the surrounding natural-language strings and example usage are all Chinese-only. This indicates a language policy constraint without offering the user a choice or documenting a justified locale-specific limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The coordinator persists project metadata to a local markdown history file even though its stated role is only to orchestrate planner/maker/reviewer agents. This creates unnecessary data retention and expands the skill's capabilities beyond user-visible image generation, potentially storing sensitive product or user request details on disk without a clear need.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill appends project details such as timestamp, product type, tool name, and image count to disk without any user-facing notice or consent. Undisclosed persistence can leak business-sensitive prompts or usage patterns to other local users, logs, backups, or later processes, especially in shared or multi-tenant environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring states "接收用户中文需求" and the create() docstring says the argument is a "用户中文需求描述," which imposes a Chinese-only interaction requirement in natural-language instructions. This is a locale/language policy constraint without any user opt-in or documented region-specific justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The agent persistently stores prompts, negative prompts, timestamps, output paths, and model metadata to a local history file without any consent, minimization, retention notice, or access control. Prompts can contain sensitive business information, personal data, or confidential creative instructions, so silent retention increases privacy and data-exposure risk if the host is shared, backed up, or later accessed by other components.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file states '精准中文 Prompt' and recommends specific tools in the role description, and the analyze() docstring later specifies '用户输入的中文需求描述'. This imposes a Chinese-only language expectation without any documented opt-in or alternative language handling, which is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

All clarification questions returned to the user are fixed Chinese strings, with no mechanism to adapt to the user's preferred language. This is a language-policy issue because the skill forces a specific language in user-facing output rather than offering a choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code presents itself as performing image quality review, but _check_item does not inspect image contents and instead returns mostly fixed scores based on checklist labels and brief metadata. This can cause unsafe or low-quality outputs to be marked as approved, creating a trust-boundary failure where downstream systems or operators rely on a review that never actually happened.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This JSON contains all user-facing descriptive content, labels, and guidance in Chinese only, including product types, platform rules, and style guidance. Because the file does not document that the skill is China-region-specific or offer any language/locale opt-in, it may enforce a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file presents all user-facing instructions and labels exclusively in Chinese, with no indication that the user can choose another language or that the locale restriction is intentional. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest sets both input.language and config.language to "zh-CN", which indicates a fixed language/locale requirement. Under the policy, forcing a specific language without offering user choice or documenting justified regional scope is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file presents its interface, documentation, and returned user-facing messages entirely in Chinese, including tool descriptions and status messages. Under the policy provided, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which it is not here.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
89% confidence
Finding

The code executes an external Python script using subprocess and forwards user-controlled inputs, including arbitrary kwargs, as command-line arguments. Although it avoids shell=True and thus is not a classic shell injection, this still creates a trust-boundary issue: unvalidated parameters can alter the behavior of the downstream script, and the script path may resolve to an attacker-controlled file in one of several searched locations.

Content

Scanner excerpt · tools/jimeng_tool.py (reported line 100)May include surrounding context.

python
cmd.extend([f"--{key}", str(value)])
        
        # 执行
        process = subprocess.run(
            cmd,
            capture_output=True,
            text=True,

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The capability description returned by get_capabilities lists "图生图" as a supported feature, which implies image-based transformation support. However, the only image-related operation implemented in the class is edit(), which states that Jimeng does not support image editing and returns "not_supported" without performing any operation, creating an active contradiction between documentation-like capability metadata and actual behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

This subprocess invocation executes a Python script with arguments derived from untrusted inputs, including arbitrary kwargs converted into CLI flags. Although it avoids shell injection by passing a list to subprocess.run without shell=True, it still creates an argument-injection and unsafe delegation risk because user-controlled options can alter downstream script behavior in unexpected or dangerous ways.

Content

Scanner excerpt · tools/liblib_tool.py (reported line 120)May include surrounding context.

python
cmd.extend([f"--{key}", str(value)])
        
        # 执行
        process = subprocess.run(
            cmd,
            capture_output=True,
            text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tools/liblib_tool.py (reported line 212)May include surrounding context.

python
"--control-type", control_type
                ]
                
                process = subprocess.run(
                    cmd,
                    capture_output=True,
                    text=True,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s user-facing names, messages, instructions, and examples are entirely in Chinese, with no indication that language selection is configurable or that the tool is intended only for a Chinese-speaking or region-specific audience. This can violate language/locale policy when a skill implicitly forces one language without offering user choice or documenting the restriction.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · tools/video_tool_stub.py (reported line 145)May include surrounding context.

python
class JimengVideoTool:
    def __init__(self):
        self.name = "即梦视频"
        self.api_endpoint = "https://api.jimeng.jianying.com/video/generate"
    
    def generate(self, prompt: str, duration: int = 5, **kwargs):
        # 调用即梦视频 API

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · tools/video_tool_stub.py (reported line 149)May include surrounding context.

python
def generate(self, prompt: str, duration: int = 5, **kwargs):
        # 调用即梦视频 API
        response = requests.post(self.api_endpoint, json={
            "prompt": prompt,
            "duration": duration,
            **kwargs