Back to skill

Security audit

Douyin Text

Security checks for vulnerabilities and agentic risk

Overview

The skill’s goal is understandable, but it tells the agent to run an unreviewed Python script from a hard-coded local path and may use browser cookies.

Review before installing. Only use this skill if you trust the local `extract.py` it will run at the hard-coded path, and avoid browser-cookie options unless you understand they may expose logged-in session access. Expect generated transcripts and video metadata to be saved locally.

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

T07 · Tool Hijacking and Spoofing

Warning
Location
skill.md:89
Finding

Execution of an Unbundled Script from an External Hard-Coded Location

Content
View full analysis

Vulnerability Details

File Location: skill.md, lines 89–95
Vulnerability Type: T07: Tool Hijacking and Spoofing
Risk Level: Medium

bash
cd C:/Users/10911/.claude/skills/douyin-text && python extract.py --raw-json '<user-provided-link>'
bash
cd C:/Users/10911/.claude/skills/douyin-text && python extract.py --raw-json --whisper-model medium 'https://v.douyin.com/xxxxx/'

Technical Analysis

The audited project contains only skill.md; the required extract.py is not included. However, the Skill instructs the agent to change into a hard-coded, machine-specific directory outside the reviewed artifact and execute an extract.py found there.

This breaks the trust relationship between the reviewed Skill and the code that actually runs. The behavior of the external script cannot be established from the package under audit, and any file occupying the specified path can become the effective implementation. A local attacker, compromised installer, or another process able to write to that directory could replace or create the script before invocation.

The Skill also documents browser-cookie import support and requires user-supplied options to be forwarded to the absent script. Because the implementation is unavailable, cookie handling, argument validation, network destinations, and data retention cannot be verified.

Attack Path

  1. An attacker gains write access to C:/Users/10911/.claude/skills/douyin-text/, or compromises the process that installs files there.
  2. The attacker creates or replaces extract.py with attacker-controlled Python code.
  3. A user invokes the Douyin transcription Skill.
  4. The agent follows the documented workflow and executes the substituted script with the privileges of the agent process.
  5. The malicious script can access resources available to that process, potentially including supplied URLs, local files, environment variables, genera ...[truncated 1082 chars]
Remediation
View remediation

Remediation Suggestions

  1. Bundle extract.py within the reviewed Skill package so that the executable implementation is included in security review and distribution.
  2. Resolve the script relative to a trusted, canonical Skill root instead of using a user-specific absolute path.
  3. Verify the script before execution using a package signature, manifest hash, or another integrity mechanism that covers all executable files.
  4. Restrict accepted command-line options to a documented allowlist. Parse and validate the URL and model name rather than forwarding arbitrary user-provided arguments.
  5. Invoke the script through an argument-array API without shell interpretation where the host environment supports it.
  6. Make browser-cookie access explicitly opt-in rather than default behavior. Limit access to the required browser profile and domain, and avoid copying or persisting cookie material.
  7. Document all network destinations and ensure sensitive cookie or transcript data is never sent to undeclared endpoints.
  8. Include pinned dependency declarations and lockfiles for the Python runtime, downloader, media-processing libraries, and Whisper implementation.
  9. Fail closed if the bundled script is missing or fails integrity validation; do not search alternate directories or execute another file with the same name.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · skill.md (reported line 67)May include surrounding context.

text

  示例:

  ```bash
  /douyin-text https://v.douyin.com/xxxxx

参数

  • url:抖音视频链接,必填
    • 支持 https://v.douyin.com/xxxxx
    • 支持 https://www.douyin.com/video/xxxxx
  • --whisper-model:Whisper 模型大小,可选 tiny/base/small/medium/large,默认 small
  • --desc:仅提取视频描述文字,不下载视频
  • --cookies-browser:从浏览器导入 cookies,默认 chrome
  • --cookies-file:使用 cookies.txt 文件
  • --no-cookies:不使用 cookies
  • --update-ytdlp:更新 yt-dlp

必须执行的工作流

当用户调用:

bash
/douyin-text <链接>

Claude 必须严格按以下 4 步执行。绝对禁止跳步、合并步骤,或直接使用 Python 生成的旧版完整 Markdown。

步骤 1:Python 提取原始转录(不生成 Markdown)

在 skill 目录运行(必须带 --raw-json 参数):

bash
cd C:/Users/10911/.c

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs downloading third-party video content and writing transcript files to a fixed local path, but it does not clearly warn the user that media will be fetched, processed, and persisted on disk. This can expose users to privacy, copyright, and local data-retention risks, especially if the content contains personal data or the machine is shared.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill documents importing cookies from the user's browser or a cookies file to access Douyin content, but it gives no privacy or security warning about handling session credentials. Browser cookies are authentication material; using them in a skill can expose account sessions, broaden access beyond public content, and create opportunities for accidental credential leakage through logs, subprocess arguments, or saved files.

Content

No source excerpt is available for this finding.