T09 · Insecure Skill Coding Practices
- Location
scripts/douyin_video_downloader.py:437- Finding
Server-Side Request Forgery Through Unvalidated Media Download URLs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Douyin downloader is mostly coherent, but it needs review because it sends account and work links to a third-party API and downloads API-supplied URLs without enough safety limits.
Review before installing. Use this only for content you are allowed to download, understand that Douyin IDs and work URLs are sent to redfox.hk, run it in a constrained environment if downloading, choose a bounded output directory, and monitor disk usage. Prefer a virtual environment with pinned dependencies and avoid using high-privilege API keys or running the downloader with elevated system permissions.
scripts/douyin_video_downloader.py:437Server-Side Request Forgery Through Unvalidated Media Download URLs
scripts/douyin_video_downloader.py:477Unbounded Streaming Downloads Can Exhaust Local Storage
SKILL.md:109Unpinned Runtime Dependency Installation
The description emphasizes automatic batch downloading to the local device but does not warn users that the skill can create or overwrite files, consume substantial disk space, or download large volumes of external media. Because this tool is explicitly designed for bulk local writes, the missing warning materially increases the chance of unexpected disk impact or unsafe use.
The README tells users they can 'just describe what you need in natural language' and includes very generic example phrases, which can cause the skill to activate on broad, everyday requests without clear user acknowledgment of side effects. In this skill, activation can lead to fetching external content and initiating local batch downloads, so overbroad invocation guidance increases the risk of unintended actions.
The README explicitly promotes parsing watermark-free direct links and bulk-downloading Douyin content to local storage, but it provides no warning about authorization, copyright, terms-of-service restrictions, or the risks of writing large batches of files locally. In context, this increases the likelihood of misuse for unauthorized copying or archival of third-party content, even if the document does not itself contain executable malicious logic.
The skill documentation describes sending Douyin account IDs and work links to redfox.hk APIs but does not clearly warn users that these identifiers and links are transmitted to a third-party service. This lack of transparency undermines informed consent and can expose user-supplied targets, lookup activity, and derived content URLs to an external operator without the user realizing it.
The trigger phrases are broad enough to match ordinary user requests such as asking to download or fetch Douyin videos, which increases the chance the skill will activate when the user did not intend to use this specific third-party downloader. Because the skill sends account identifiers and content links to an external API and can perform local downloads, unintended invocation can cause unanticipated data disclosure and actions on the user's system.
This code transmits account identifiers and related request metadata to an external API endpoint controlled outside the local environment. In an agent skill, external exfiltration is security-relevant because user inputs may be sensitive, and the skill offers no minimization, consent gate, trust validation, or alternative local processing path.
}
try:
resp = requests.post(url, json=payload, headers=headers, timeout=30)
result = resp.json()
except requests.exceptions.Timeout:
_record_failure(account_id)
The script sends user-supplied account identifiers to a third-party service and later sends work URLs for parsing, but it does not provide a clear privacy disclosure or consent prompt at the point of transmission. In a skill context, this can expose user interests, monitored accounts, or investigative targets to an external operator without sufficiently explicit notice.
This second outbound request sends work URLs to an external parsing API, potentially disclosing the specific content being investigated or downloaded. In security-sensitive or investigative workflows, that metadata can reveal targets, interests, or monitoring activity to the third-party API provider.
}
try:
resp = requests.post(url, json=payload, headers=headers, timeout=30)
data = resp.json()
except requests.exceptions.Timeout:
return {"success": False, "download_url": None, "title": None, "cover": None,
The comment block says callers must display '完整资源下载链接' and '逐行展示所有作品信息(含完整资源下载链接)'. However, the table-building code only keeps one link per resource type using seen_types, so additional video/image/audio links in the same work are not shown.
The inline comment describes '合并展示视频/封面/音频所有可点击下载链接', implying all links are included. The loop immediately gates additions on rtype not in seen_types, which contradicts that claim by dropping subsequent links of the same type.
When --download is provided, the script immediately creates the output directory and later saves media files locally, but there is no confirmation prompt before performing the write operation. Although the script logs progress, it does not disclose this side effect at the moment of execution beyond the flag name itself.
A language policy issue applies across all file types when a skill forces a specific language without user opt-in. This README presents all operational guidance in Chinese only, with no indication that users may select another language or that the locale restriction is intentional and justified.