Back to skill

Security audit

短视频去水印下载。检测到抖音、快手、小红书、B站、微博、西瓜视频等平台链接时,自动解析并下载无水印视频,直接发送文件给用户。

Security checks for vulnerabilities and agentic risk

Overview

This video downloader matches its stated purpose, but it automatically sends links to a third-party parser and stores downloaded files in a public web directory with weak controls.

Install only if you are comfortable with supported video links being sent to an external parsing API and downloaded files being stored on a publicly reachable HTTP server. The operator should add explicit confirmation, scoped network permissions, random or signed download URLs, HTTPS, size and host validation, quotas, and cleanup before using this for private or sensitive content.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/download.py:29
Finding

Unvalidated Third-Party Download URL Enables Server-Side Request Forgery and Unsafe Public File Publication

Content
View full analysis
str: headers = {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15'} resp = requests.get(download_url, stream=True, timeout=60, headers=headers, allow_redirects=True) resp.raise_for_status() with open(output_path, 'wb') as f: for chunk in resp.iter_content(chunk_size=65536): if chunk: f.write(chunk) return output_path def process(video_url: str) -> dict: os.makedirs(VIDEO_DIR, exist_ok=True) result = get_no_watermark_url(video_url) if result.get('code') not in (200, 0): return {'success': False, 'error': result.get('msg', '解析失败')} dl_url = extract_download_url(result) if not dl_url: return {'success': False, 'error': f'未找到下载链接,API返回: {result}'} filename = f'video_{int(time.time())}.mp4' output_path = os.path.join(VIDEO_DIR, filename) download_video(dl_url, output_path) size = os.path.getsize(output_path) public_url = f'{BASE_URL}/{filename}' return {'success': True, 'path': output_path, 'size': size, 'public_url': public_url} ``` ### Technical Analysis The download URL is taken from a third-party API response and passed directly to `requests.get`. The implementation only checks whether the returned string starts with `http`; it does not validate the scheme precisely, destination hostname, resolved IP address, port, redirect targets, content type, file signature, or response size. Because `allow_redirects=True` is enabled, even an initially acceptable URL could redirect to a loopback, link-local, private-network, reserved, or cloud metadata address. The downloaded response is then sa ...[truncated 1851 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download.py:7
Finding

Source-Embedded Credential Pattern and Plaintext Public Download Transport

Content
View full analysis
dict: headers = {'Content-Type': 'application/json'} data = {'appId': APP_ID, 'appKey': APP_KEY, 'url': video_url} resp = requests.post(API_URL, headers=headers, json=data, timeout=15) ``` The generated plaintext URL is subsequently returned here: ```python public_url = f'{BASE_URL}/{filename}' return {'success': True, 'path': output_path, 'size': size, 'public_url': public_url} ``` ### Technical Analysis The checked-in `APP_KEY` and server address are placeholders rather than confirmed production secrets. However, the implementation establishes a source-embedded credential pattern that encourages deployment operators to replace the placeholder with a real key directly in the script. A deployed key stored this way can be exposed through source repositories, distributed skill packages, backups, logs, or unauthorized filesystem access. The public media base URL explicitly uses unencrypted HTTP. Consequently, download URLs and video content have no transport confidentiality or integrity when sent over an untrusted network. A network-positioned attacker could observe requested files or modify responses in transit. ### Attack Path **Credential exposure path:** 1. An operator replaces the placeholder with a functional production API key. 2. The modified script is copied, packaged, backed up, or committed to source control. 3. An unauthorized party obtains the script. 4. The party extracts the application identifier and key and uses them against the third-party API, subject to that service's authorizati ...[truncated 948 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download.py:43
Finding

Predictable Public Filenames Permit Collisions and Unbounded Storage Consumption

Content
View full analysis
dict: os.makedirs(VIDEO_DIR, exist_ok=True) result = get_no_watermark_url(video_url) if result.get('code') not in (200, 0): return {'success': False, 'error': result.get('msg', '解析失败')} dl_url = extract_download_url(result) if not dl_url: return {'success': False, 'error': f'未找到下载链接,API返回: {result}'} filename = f'video_{int(time.time())}.mp4' output_path = os.path.join(VIDEO_DIR, filename) download_video(dl_url, output_path) size = os.path.getsize(output_path) public_url = f'{BASE_URL}/{filename}' return {'success': True, 'path': output_path, 'size': size, 'public_url': public_url} ``` The file is opened without exclusive creation: ```python with open(output_path, 'wb') as f: for chunk in resp.iter_content(chunk_size=65536): if chunk: f.write(chunk) ``` ### Technical Analysis Filenames contain only the current Unix timestamp rounded to one second. All requests processed during the same second therefore calculate the same output path. Opening that path with `wb` truncates an existing file, and multiple concurrent writers can overwrite or interleave operations against the same path. The returned size and URL may consequently refer to corrupted content or to a different user's download. The generated names are also predictable. When the web directory permits unauthenticated reads, a party aware of the approximate creation time can enumerate likely URLs. No maximum file size, per-user quota, global storage quota, retention period, or cleanup mechanism is implemented. Repeated successful downloads can therefore accumulate indefinitely beneath the public web root. ### Attack Pa ...[truncated 1407 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill states that it uses a third-party API to parse shared links but does not disclose this in the user-facing description or obtain consent. Sending user-supplied URLs and potentially related metadata to an external service creates a clear privacy and data-sharing risk, especially when links may be private, personalized, or sensitive.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill saves downloaded videos under a server directory and exposes them over a public HTTP endpoint, but this storage and publication behavior is not clearly disclosed to users. Publicly accessible media URLs can leak private or copyrighted content, enable unauthorized sharing, and leave residual data on the server beyond the user's expectations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes a Python downloader and explicitly relies on a third-party API, which implies network-capable behavior, yet it declares no tool scope or permission boundary. This weakens sandboxing and reviewability because the runtime can make outbound requests without the skill contract clearly stating that capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest description and operational instructions are entirely in Chinese, and the prescribed response examples are also fixed in Chinese. There is no indication that the user can opt into another language or that the skill is intentionally restricted to a Chinese-only context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is configured to auto-run on any matching platform link with no confirmation step, so ordinary conversation content can trigger downloading and transmission behavior unexpectedly. In a messaging environment this can cause unintended processing of user or third-party content and increases the chance of privacy, consent, and abuse issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function sends the user-provided video URL along with app credentials to an external API endpoint, but there is no prompt, comment, docstring, or user-facing log indicating that this data is transmitted off-system. For a code file, this qualifies as a missing warning for a network operation involving user/system data.

Content

No source excerpt is available for this finding.

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 · scripts/download.py (reported line 17)May include surrounding context.

python
def get_no_watermark_url(video_url: str) -> dict:
    headers = {'Content-Type': 'application/json'}
    data = {'appId': APP_ID, 'appKey': APP_KEY, 'url': video_url}
    resp = requests.post(API_URL, headers=headers, json=data, timeout=15)
    resp.raise_for_status()
    return resp.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Downloaded videos are stored under a web-accessible directory and a public URL is returned, making user-requested content retrievable by anyone who knows or guesses the filename. Because filenames are only timestamp-based and there is no access control, this can expose user content and create unintended public hosting of third-party media.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.