Back to skill

Security audit

Douyin Video Transcriber

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Douyin transcription tool, but its downloader is too broadly scoped and can contact unexpected network targets or use unsafe temporary files.

Review this skill before installing. It is not showing clear malicious behavior, but you should only run it with trusted Douyin URLs and a TikHub token you are comfortable using. Avoid running it in privileged or shared environments until it validates URL destinations, limits download size, and uses private temporary directories.

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

Warning
Location
scripts/run.py:51
Finding

Unrestricted User-Controlled URL Resolution Enables Server-Side Request Forgery

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run.py:139
Finding

Unvalidated API-Controlled Media URL Allows Arbitrary Network Requests and Unbounded Downloads

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run.py:186
Finding

Predictable Files in the Shared Temporary Directory Permit Symlink-Based File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tainted flow: 'headers' from os.getenv (line 127, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/run.py (reported line 128)May include surrounding context.

python
def get_video_download_url(modal_id, token):
    url = f"{TIKHUB_VIDEO_API}?aweme_id={modal_id}"
    headers = {"Authorization": f"Bearer {token}"}
    resp = requests.get(url, headers=headers, timeout=30)
    resp.raise_for_status()
    data = resp.json()
    aweme_detail = data.get("aweme_detail", {})

Tainted flow: 'headers' from os.getenv (line 127, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/run.py (reported line 144)May include surrounding context.

python
def download_video(url, output_path):
    headers = {"User-Agent": "Mozilla/5.0", "Referer": "https://www.douyin.com/"}
    with requests.get(url, headers=headers, stream=True, timeout=120) as r:
        r.raise_for_status()
        with open(output_path, "wb") as f:
            for chunk in r.iter_content(chunk_size=8192):

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares capabilities that imply environment access, file read/write, network access, and shell execution, but it does not define any explicit tool scope or permission boundaries. This creates unnecessary ambiguity for an agent runtime and can enable over-privileged execution, especially because the workflow uses external binaries, local config secrets, and network-backed downloading.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill metadata and user instructions are written entirely in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Per the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

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

python
'-acodec', 'libmp3lame', '-y', audio_path
    ]
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8', errors='replace', check=False)
        if result.returncode != 0:
            if "ffmpeg: not found" in result.stderr or "不是内部或外部命令" in result.stderr:
                 raise FileNotFoundError("错误:'ffmpeg' 未在系统 PATH 中找到。请安装 ffmpeg 并将其添加到环境变量中。")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code hard-codes language='zh' and a Mandarin-specific prompt in the Whisper transcription call. This imposes a specific language/locale policy on all inputs without offering user opt-in or documenting a region-specific constraint, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
75% confidence
Finding

The skill sends user-supplied Douyin identifiers to a third-party service, TikHub, and relies on that external service to return the final media URL. In this context, the transmission is core functionality rather than overtly malicious, but it still introduces privacy, dependency, and trust-boundary risk because user activity and referenced content are disclosed to an external provider.

Content

Scanner excerpt · scripts/run.py (reported line 97)May include surrounding context.

python
return None

# ==================== 抖音下载逻辑 ====================
TIKHUB_VIDEO_API = "https://api.tikhub.io/api/v1/douyin/web/fetch_one_video"

def get_config_value(key: str, default: Optional[str] = None) -> Optional[str]:
    """从 config.json 安全地读取配置值"""

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill instructs users to configure an API token and submit Douyin URLs to an external service, but it does not disclose the privacy implications of transmitting video identifiers, request metadata, and potentially user-associated access patterns to a third party. While this is primarily a transparency and privacy issue rather than direct code execution, it can expose sensitive research interests or user activity if operators assume the process is fully local.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.