Back to skill

Security audit

1688图片下载器

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a product-image downloader, but its helper script can fetch and save arbitrary URL contents without enough validation or scope control.

Review this skill before installing. It is not evidence of malware, but only use it with URL lists you trust, avoid pointing it at internal or private services, choose an output directory deliberately, and expect the advertised product-URL/search script path to be incomplete unless the agent performs browser extraction separately.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download_images.py:26
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery and Resource Exhaustion

Content
View full analysis
bool: """下载单张图片""" if headers is None: headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', 'Referer': 'https://www.taobao.com/' } try: # 处理URL协议 if url.startswith('//'): url = 'https:' + url resp = requests.get(url, headers=headers, timeout=30) resp.raise_for_status() with open(save_path, 'wb') as f: f.write(resp.content) return True except Exception as e: print(f" 下载失败: {url[:50]}... - {e}") return False ``` The URLs passed to the vulnerable function are read directly from a user-selected file: ```python if args.images: urls_file = Path(args.images) if not urls_file.exists(): print(f"错误: 图片列表文件不存在: {args.images}") sys.exit(1) urls = [line.strip() for line in urls_file.read_text().split('\n') if line.strip()] print(f"从文件读取到 {len(urls)} 个图片URL") success = 0 for i, url in enumerate(urls, 1): ext = '.jpg' if '.png' in url.lower(): ext = '.png' elif '.webp' in url.lower(): ext = '.webp' save_path = output_dir / f"image_{i:03d}{ext}" print(f"[{i}/{len(urls)}] 下载中...") if download_image(url, str(save_path)): success += 1 ``` ### Technical Analysis Each nonempty line in the supplied image-list file is passed directly to `requests.get`. The implementation does not restrict URL schemes or destination domains, resolve and inspect destination IP addresses, validate redirec ...[truncated 2283 chars]
Remediation
View remediation
MAX_IMAGE_BYTES: raise ValueError("Image exceeds the permitted size") output.write(chunk) ``` 7. Validate the downloaded file's magic bytes or decode it with a trusted image library before retaining it. 8. Limit the number of URLs processed per invocation and enforce a maximum aggregate download size. 9. Remove partially written files when validation or downloading fails. 10. Apply outbound network controls at the container or host level so the process cannot reach metadata endpoints or internal management network ...[truncated 49 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior does not match the actual capability set: promised URL/search-based extraction is not implemented, while downloading arbitrary image URLs from a local config or URL list is supported but undisclosed. This mismatch is dangerous because it can conceal broader file/network behavior from users and reviewers, creating an opportunity for misuse or unexpected data retrieval.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes browser access, network retrieval, and local file writes, but does not declare any explicit tool scope or permissions. This weakens reviewability and can let a skill operate with broader capabilities than users or platforms expect, increasing the chance of unintended network access or file operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description lists triggers such as “商品图片下载”, “淘宝主图”, and “下载商品图”, which are broad enough to overlap with common user requests rather than a narrowly defined invocation phrase. The file does not provide exclusion conditions or negative examples to clarify when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill instructs browser-based retrieval and local saving of downloaded content without an upfront warning that it will access external sites and write files locally. This can surprise users and lead to unintended persistence of remote content on disk, especially when the skill is triggered casually.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The same workflow again shows persistent saving into ~/.openclaw/sharespace, which creates durable local artifacts from remote content. In context, this is not inherently malicious, but it increases risk because the skill handles arbitrary external resources and retains them beyond the immediate session.

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

  1. 创建保存目录

    bash
    mkdir -p ~/.openclaw/sharespace/商品图片/{商品名}/{主图,颜色图,详情图}
    
  2. 下载图片

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The same workflow again shows persistent saving into ~/.openclaw/sharespace, which creates durable local artifacts from remote content. In context, this is not inherently malicious, but it increases risk because the skill handles arbitrary external resources and retains them beyond the immediate session.

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

  1. 创建保存目录

    bash
    mkdir -p ~/.openclaw/sharespace/商品图片/{商品名}/{主图,颜色图,详情图}
    
  2. 下载图片

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest and module/docstrings describe a downloader that supports direct product URLs, but download_from_url only prints status information and returns zero-count results without requesting the page or downloading images. This creates a clear mismatch between the advertised URL-download behavior and the implemented code path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module title and description are written only in Chinese, and the CLI help and user-facing messages throughout the file are likewise Chinese-only. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest scopes the skill to downloading product images from Taobao/1688 via product name search or product URL, but the --images mode accepts a file of direct image URLs and downloads them regardless of source domain. That adds a more general bulk image downloader capability beyond the described marketplace-specific use case.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.