Back to skill

Security audit

抖音内容提取总结

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Douyin transcription, but it needs review because its instructions can let untrusted share text execute shell commands and its download/upload scope is broader than stated.

Install only after the publisher fixes the unsafe shell invocation, stops sourcing .env as executable code, restricts accepted URLs to expected Douyin hosts, and documents that downloaded media is sent to SiliconFlow. Treat the current version as review-required rather than malicious: the risky behaviors appear tied to the intended transcription workflow, but the implementation gives too much room for command execution and unintended data transfer.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:51
Finding

Shell Command Injection Through Raw User-Supplied Share Text

Content
View full analysis
" ``` The surrounding instructions require the Agent to place the complete, untrusted share text received from the user directly inside the quoted command-line argument. ### Technical Analysis The Skill instructs the Agent to interpolate raw user input into a shell command. Shell double quotes do not neutralize every form of shell evaluation. Command substitutions such as `$(command)` and backtick substitutions are still evaluated inside double quotes. An embedded quotation mark may also terminate the intended argument and allow additional shell syntax to be introduced. Consequently, a malicious share message can cause shell commands to execute before `douyin_skill.py` starts. The Python URL-extraction logic does not mitigate this issue because exploitation occurs in the shell before Python receives the argument. This behavior is not necessary for the declared transcription functionality. User input can be passed through standard input or a subprocess argument array without invoking a shell parser. ### Attack Path 1. An attacker submits share text containing a syntactically valid URL and shell substitution syntax, such as: ```text $(attacker-controlled-command) https://v.douyin.com/example/ ``` 2. The Agent follows `SKILL.md` and embeds the complete text into the documented shell command. 3. The shell evaluates the command substitution despite the surrounding double quotes. 4. The injected command executes with the same operating-system privileges, filesystem access, environment variables ...[truncated 661 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
douyin_skill.py:6
Finding

Unrestricted URL Download Enables SSRF and Third-Party Disclosure of Retrieved Content

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:27
Finding

Unpinned Runtime Dependency Installation Creates a Supply-Chain Execution Risk

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:37
Finding

Credential Configuration File Is Executed as Shell Code

Content
View full analysis
" ``` ### Technical Analysis The declared functionality requires reading one configuration value, `SF_API_KEY`. The `source` command does not parse the file as passive key-value data; it executes every line as shell syntax in the current shell. If the file is maliciously modified, contains unintended shell constructs, or is writable by another compromised process, arbitrary commands will execute whenever the Skill is invoked. This exceeds least privilege because the Skill only needs one value and does not need to execute commands from the credential file. There is also a reliability issue: the documented assignment form does not include `export`. Depending on the existing environment and shell behavior, a variable assigned by `source` may not be inherited by the subsequently launched Python process, which reads the key using `os.environ.get("SF_API_KEY")`. ### Attack Path 1. An attacker or compromised local process gains write access to `~/.openclaw/.env`. 2. The attacker adds shell syntax or a command to the file while preserving an apparently valid `SF_API_KEY` assignment. 3. A user invokes the Douyin Skill. 4. The Agent executes the documented `source ~/.openclaw/.env` command. 5. The malicious shell statements run with the Agent's privileges before the Python script starts. 6. The commands may access other credentials, modify files, or establish further execution mechanisms within the Agent's permission bounda ...[truncated 481 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
本 Skill 目录下的 `douyin_skill.py`(始终与你正在阅读的 `SKILL.md` 同目录)。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
本 Skill 目录下的 `douyin_skill.py`(始终与你正在阅读的 `SKILL.md` 同目录)。

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

The skill instructs the agent to source ~/.openclaw/.env before running, causing the shell to ingest all variables from a sensitive secrets file into the execution environment of a skill-controlled process. Even though the markdown says not to print the key, this pattern unnecessarily expands secret exposure to the script and any subprocesses, increasing the blast radius if the Python code, dependencies, or downstream tools are compromised.

Content

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

命令模板 (Agent 严格遵守):

注意:命令会自动尝试加载系统的 .env 文件获取真实密钥。你绝不能在命令中自行捏造或填写 SF_API_KEY=sk-xxx 这样的明文参数。

bash
# 自动寻找并加载环境变量,然后使用相对路径执行脚本

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The command explicitly sources ~/.openclaw/.env and then executes douyin_skill.py with those secrets in-process, exposing credentials to the full runtime context of the script and imported packages. Because this skill also downloads remote content and uses third-party packages, the context makes the secret-loading pattern more dangerous by combining external network access with broad credential availability.

Content

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

bash
# 自动寻找并加载环境变量,然后使用相对路径执行脚本
if [ -f ~/.openclaw/.env ]; then source ~/.openclaw/.env; fi && PYTHONPATH=/tmp/pylibs python3 douyin_skill.py "<包含链接的整段分享文案>"

执行时长预估: 5秒~15秒(取决于视频长度和网络下载速度)

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 106)May include surrounding context.

  • 如发现异常残留,Agent 可通过命令清理:
bash
rm -rf ./temp_douyin/*.mp4

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 161)May include surrounding context.

md
| `执行失败:系统未配置硅基流动 API Key` | 告知用户:"系统缺少 API 密钥,请检查 `~/.openclaw/.env` 配置文件中是否已正确写入 `SF_API_KEY`。" |
| `执行失败:未在您的输入中检测到有效的 http/https 链接` | 告知用户无法提取,提示其检查发送的文案中是否包含完整的网址。 |
| `API识别报错: 401 / 403 / 429` | 告知用户:"硅基流动 API 额度不足或 Key 无效,请检查账号状态。" |
| `临时视频文件残留` | Agent 自行执行 `rm -rf ./temp_douyin/*.mp4` 进行清理。 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill title and all operational instructions are written in Chinese, and the prescribed prompts and response patterns assume Chinese-language use, but the document does not offer a language choice or state that the skill is intentionally restricted to Chinese-speaking users. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states it will download Douyin videos and use a cloud model/transcription service, but it does not clearly warn users that their shared text and downloaded media will be transmitted to a third-party provider. This creates a privacy and consent problem, especially if users share sensitive or copyrighted content without understanding where it will be sent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill downloads user-supplied video content and uploads the file to a third-party transcription service without any explicit user consent, disclosure, or data minimization. This creates a privacy and data-governance risk because potentially sensitive audio/video content is transmitted off-platform, and users may reasonably expect only local processing from the skill behavior.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The external transmission to api.siliconflow.cn is intentional functionality, but in this skill it sends downloaded media content to a remote service using an API key and does so without any visible trust boundary checks or user warning. The danger is contextual: the external call itself is not inherently malicious, but in an agent skill handling arbitrary user-provided links and media, undisclosed exfiltration of content to a third party is a real security and privacy concern.

Content

Scanner excerpt · douyin_skill.py (reported line 27)May include surrounding context.

python
def transcribe_with_siliconflow(file_path, api_key):
    """调用硅基流动 SenseVoice API 进行极速识别"""
    url = "https://api.siliconflow.cn/v1/audio/transcriptions"
    headers = {"Authorization": f"Bearer {api_key}"}
    
    with open(file_path, "rb") as f: