Back to skill

Security audit

WhatsApp图片发送-免费版

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed WhatsApp image sender, but its broad local file and URL handling, external message-sending authority, and inconsistent scope need user review before install.

Review this before installing. Use it only for explicit single-image sends, verify the exact recipient and file before every send, avoid sensitive documents or arbitrary local paths, and treat downloaded URLs cautiously. The publisher should tighten the scope text, remove unrelated triggers, validate images and URLs, and require a clear confirmation before sending.

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
SKILL.md:90
Finding

Unrestricted Local File and URL Handling May Enable Unintended Data Transmission

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 90–106
Vulnerability Type: Unrestricted file-source handling and unsafe temporary-file workflow
Risk Level: Medium

The documented workflow accepts a user-provided image URL or local path, downloads or copies the resource into the platform workspace, and then transmits it to a user-supplied WhatsApp recipient:

text
用户提供图片 URL 或路径 + 联系人手机号
      ↓
Step 1: 下载图片到 /tmp/ 目录
      ↓
Step 2: 复制到工作区目录
      ↓
Step 3: 调用发送命令(含说明文字)
      ↓
Step 4: 清理临时文件
      ↓
返回发送结果

Concrete executable examples appear at lines 145–163:

bash
# Step 1: 下载图片
curl -o /tmp/funny.jpg https://example.com/funny.jpg
# ...
# Step 2: 复制到工作区
cp /tmp/funny.jpg ~/.skill-platform/workspace/
# ...
# Step 3: 发送到 WhatsApp
message --channel whatsapp \
  --target +8613800138000 \
  --filePath ~/.skill-platform/workspace/funny.jpg \
  --message "看到这张图觉得很有趣"
# ...
# Step 4: 清理临时文件
rm /tmp/funny.jpg

Local-file handling is demonstrated at lines 259–268:

bash
# 直接复制到工作区
cp /path/to/local.png ~/.skill-platform/workspace/
# ...
# 发送
message --channel whatsapp \
  --target +14843124960 \
  --filePath ~/.skill-platform/workspace/local.png \
  --message "本地图片"

Technical Analysis

The Skill declares support for JPG, PNG, and GIF files but does not specify or enforce:

  • Canonical-path validation or an approved source-directory boundary.
  • Rejection of symbolic links, device files, or other non-regular files.
  • File-signature validation to confirm that content is genuinely an image.
  • Maximum download or file-size limits.
  • URL-scheme restrictions.
  • Blocking of loopback, private, link-local, or cloud metadata addresses.
  • Secure, uniquely generated temporary filenames.
  • A final confirmation that identifies the canonical source and recipient before transmission.

Consequently, extension-based assumptions d ...[truncated 2105 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict local inputs to explicitly approved image directories and canonicalize every path before access.
  2. Verify that the canonical source remains inside the approved directory.
  3. Reject symbolic links, device nodes, FIFOs, sockets, and all non-regular files.
  4. Validate image magic bytes using a trusted image parser; do not rely only on filename extensions or response headers.
  5. Impose strict file-size, download-size, timeout, and redirect limits.
  6. Permit only HTTPS URLs. After every DNS resolution and redirect, reject loopback, private, link-local, multicast, reserved, and cloud metadata addresses.
  7. Create temporary files with secure random names and exclusive creation permissions, preferably inside a private per-run directory.
  8. Avoid fixed filenames under shared /tmp; open and validate the created file safely before copying or transmitting it.
  9. Quote and safely construct all command arguments when values originate from users.
  10. Require explicit confirmation immediately before sending, displaying the canonical source path or validated URL, verified media type, size, and full recipient number.
  11. Remove callback_url if it is unnecessary. If implemented, limit it to an approved HTTPS allowlist and apply the same SSRF protections.
  12. Delete both temporary and workspace copies through a bounded cleanup routine that cannot operate outside the designated per-run directory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

--message "看到这张图觉得很有趣"

...

Step 4: 清理临时文件

rm /tmp/funny.jpg

text

### 场景 2:发送本地截图

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

--message "分享一张图片"

...

清理

rm /tmp/share.jpg

text

### 第三步:发送本地图片

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

--message "分享一张图片"

...

清理

rm /tmp/share.jpg

text

### 第三步:发送本地图片

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest positions the skill as a lightweight WhatsApp image sender, and the capability table later states that document sending is not supported. However, the overview at L058 says it sends '图片或文件', and the use case at L025 says '工作文档快速传递', which broadens behavior beyond single-image sending. This is a semantic mismatch in stated scope for the free version.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill instructs users to send images and phone numbers over a networked messaging platform, but the privacy implications are not clearly surfaced before use. This can lead to unintended disclosure of personal data, especially because the workflow includes downloading, copying into a workspace, and transmitting user content through platform tooling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L078 explicitly says '文档发送' is not supported, yet L058 describes sending '图片或文件' and L025 lists '工作文档快速传递' as a use case. These statements actively contradict each other about what the skill is intended to do, creating intent-code/documentation divergence within the skill file.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger section says to use the skill when 'video processing, audio editing, media conversion, voice generation' are needed, even though the document repeatedly states the free version only sends single images and does not support video or audio. This makes activation scope unclear and could cause unintended invocation for unrelated requests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is consistently documented as a WhatsApp image-sending free edition that does not support video or audio, but L226 says it should be used when '需要视频处理、音频编辑、媒体转换、配音生成时使用'. That instruction directly conflicts with the stated scope and limitations elsewhere in the file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.