Back to skill

Security audit

Douyin Video Analyst

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Douyin video-analysis purpose, but its setup and troubleshooting instructions can expose API keys and read local MCP configuration too broadly.

Install only if you are comfortable with a skill that uses a browser profile, local MCP configuration, and API-backed transcription. Do not run the troubleshooting config-dump command with real credentials unless it is redacted first, avoid pasting API keys into shell commands or support chats, and prefer pinned, reviewed versions of mcporter and douyin-mcp-server.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
references/troubleshooting.md:12
Finding
MCP troubleshooting procedure exposes configured API credentials<![CDATA[ ## Vulnerability Details **File Location**: `references/troubleshooting.md`, lines 12–22 **Vulnerability Type**: Credential disclosure through unsafe diagnostic output **Risk Level**: High ### Vulnerable Code ```python # 查看当前配置(mcporter 会加载这两个文件) python3 << 'EOF' import json, os for path in ['~/.cursor/mcp.json', '~/.claude.json']: p = os.path.expanduser(path) if not os.path.exists(p): continue d = json.load(open(p)) cfg = d.get('mcpServers', {}).get('douyin-mcp') if cfg: print(f"Found in {path}:", json.dumps(cfg, indent=2, ensure_ascii=False)) EOF ``` ### Technical Analysis The troubleshooting procedure reads the `douyin-mcp` configuration from `~/.cursor/mcp.json` and `~/.claude.json` and serializes the complete configuration object to standard output. The documented configuration format stores either `DOUYIN_API_KEY` or `DASHSCOPE_API_KEY` inside the `env` object. Consequently, `json.dumps(cfg, ...)` prints the plaintext API credential along with the remaining configuration. Displaying the complete configuration is unnecessary for diagnosing a version mismatch. The relevant information is limited to the configured command arguments and the names—not values—of environment variables. ### Attack Path 1. A user encounters an invalid API-key or configuration error. 2. The user or agent executes the documented troubleshooting command. 3. The script reads a configuration file containing a plaintext API key. 4. The entire `douyin-mcp` configuration, including the key value, is written to standard output. 5. The output may be retained in terminal scrollback, execution logs, shell-capture systems, support tickets, or agent tool transcripts. 6. A party with access to those records can recover and misuse the credential. ### Impact Assessment An exposed key may allow unauthorized use of the associated SiliconFlow or Alibaba Cloud Model Studio account. The resulting scope depends on the key's provider-side permissions and can ...[truncated 298 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Never serialize the complete MCP configuration. - Print only non-sensitive fields required for diagnosis, such as `args` and environment-variable names: ```python if cfg: print(f"Found in {path}") print(" args:", cfg.get("args")) print(" env keys:", list(cfg.get("env", {}).keys())) ``` - Apply recursive redaction before displaying configuration data. Treat field names containing `key`, `token`, `secret`, `password`, or `credential` as sensitive. - Warn users not to paste unredacted MCP configurations into support channels or agent conversations. - If the existing procedure has been used, advise affected users to review captured logs and rotate potentially disclosed credentials. ]]>

T08 · Insecure Dependencies

Warning
Location
references/setup.md:6
Finding
Unpinned third-party packages are installed and executed<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md`, line 6 and lines 27–31 **Vulnerability Type**: Mutable dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g mcporter ``` ```json { "mcpServers": { "douyin-mcp": { "command": "uvx", "args": ["douyin-mcp-server"], "env": { "DASHSCOPE_API_KEY": "sk-xxxxxxxxxxxxxxxx" } } } } ``` ### Technical Analysis The setup instructions install `mcporter` without an exact version and configure `uvx` to run `douyin-mcp-server` without a version constraint. Both operations resolve a mutable current release from an external package registry. Because the MCP server executes locally and receives an API credential through its environment, a compromised, malicious, or unexpectedly incompatible future release could run with the user's local privileges and access the credential. The absence of a lockfile, exact version, or integrity hash prevents users from reliably reproducing the reviewed dependency set. This is a supply-chain risk rather than proof that the current packages are malicious. ### Attack Path 1. An attacker compromises the relevant registry account, publication pipeline, or latest package release. 2. The attacker publishes a malicious version under the expected package name. 3. A user follows the setup instructions or starts the unpinned `uvx` configuration. 4. The package manager resolves and downloads the attacker-controlled latest release. 5. The package executes locally with the user's permissions. 6. In the MCP-server case, the malicious process can also read the API key supplied in its environment and access files available to the invoking user. ### Impact Assessment A malicious dependency could execute arbitrary code with the privileges of the user running `npm`, `uvx`, or `mcporter`. Potential scope includes theft of MCP/API credentials, access to user-readable files, network communica ...[truncated 288 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `mcporter` to an exact reviewed version, for example `npm install -g mcporter@<reviewed-version>`. - Pin `douyin-mcp-server` to an exact reviewed version instead of resolving the latest release. - Use lockfiles and registry integrity metadata where supported. - Document the expected package registry and verify package ownership and provenance. - Prefer signed releases, checksums, or reproducible artifacts. - Run MCP dependencies with the minimum necessary filesystem, environment, and network access. - Review and test dependency updates before changing the documented pinned versions. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:59
Finding
API keys are propagated through generated shell command text<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 59–68; `references/setup.md`, lines 61–69; `references/troubleshooting.md`, lines 31–39 **Vulnerability Type**: Unsafe secret handling in shell commands **Risk Level**: Medium ### Vulnerable Code From `SKILL.md`: ```bash # v1.1.0(硅基流动) DOUYIN_API_KEY="<key>" mcporter call douyin-mcp.extract_douyin_text \ share_link="https://www.douyin.com/video/<video_id>" 2>&1 # v1.2.0+(阿里云百炼) DASHSCOPE_API_KEY="<key>" mcporter call douyin-mcp.extract_douyin_text \ share_link="https://www.douyin.com/video/<video_id>" 2>&1 ``` From `references/setup.md`: ```bash # v1.1.0 验证 DOUYIN_API_KEY="sk-xxx" mcporter call douyin-mcp.parse_douyin_video_info \ share_link="https://www.douyin.com/video/7612354982592343675" 2>&1 # 期望:返回 {"status":"success","title":"...","download_url":"..."} # v1.2.0+ 验证 DASHSCOPE_API_KEY="sk-xxx" mcporter call douyin-mcp.parse_douyin_video_info \ share_link="https://www.douyin.com/video/7612354982592343675" 2>&1 ``` From `references/troubleshooting.md`: ```bash # v1.1.0 DOUYIN_API_KEY="sk-xxx" mcporter call douyin-mcp.extract_douyin_text share_link="..." # v1.2.0+ DASHSCOPE_API_KEY="sk-xxx" mcporter call douyin-mcp.extract_douyin_text share_link="..." ``` ### Technical Analysis The workflow instructs the agent or user to substitute API credentials directly into shell command text. Although environment assignment limits inheritance to the invoked process, the secret still becomes part of the generated command representation. Depending on the execution environment, command text may be retained in shell history, terminal recording, debug output, orchestration logs, audit telemetry, or agent tool-call transcripts. This expands the number of systems exposed to the secret. The documentation also states that `mcporter` automatically loads MCP configuration from the supported configuration files. Therefore, repeatedly placing literal keys into command text may exceed what is ...[truncated 1039 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not interpolate literal API keys into generated shell commands. - Allow `mcporter` to use the environment already defined in the MCP configuration when supported. - If explicit injection is required, retrieve the secret from a protected secret manager at process launch without displaying it in command text. - Disable shell tracing and command echoing around secret-dependent operations. - Ensure execution tools redact sensitive environment variables and command arguments from logs and transcripts. - Avoid asking users or agents to copy credentials from configuration files. - Rotate credentials if commands containing real keys have already been stored in history or execution logs. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to read local MCP configuration files and enumerate configured environment-variable keys from user-local paths such as ~/.cursor/mcp.json and ~/.claude.json. Accessing local configuration is not required to analyze Douyin videos, and it expands the skill’s scope into sensitive host inspection that could expose secret-management details or normalize unnecessary local file access.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The workflow directs access to sensitive local configuration files but provides no warning, consent boundary, or minimization guidance. Even though it only prints environment key names in the example, reading these files can reveal broader configuration data and conditions the agent to inspect user-local secrets infrastructure without necessity for the stated task.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The entire troubleshooting document is written in Chinese and does not indicate that other languages are supported or that the Chinese-only format is a region-specific requirement. This can violate a language/locale policy when users are not given an explicit opt-in or alternative.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The file consistently prescribes the skill behavior and output format in Chinese, but does not indicate that users may choose another language. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This markdown file contains user-facing instructions only in Chinese, beginning with the title and continuing throughout the document. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale policy issue when no alternative language option or justification is provided.

Static analysis

No suspicious patterns detected.