T09 · Insecure Skill Coding Practices
- Location
download.py:280- Finding
Arbitrary File Write Through Unsanitized Download Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to download Feishu message attachments as advertised, but it needs review because unsafe filenames can write or overwrite files outside the intended folder.
Review or fix the filename handling before installing broadly: reject absolute paths and ../ components, prevent unintended overwrites, and add download timeouts and size limits. Use a narrowly scoped Feishu app secret and run the skill where downloaded files cannot damage important local data.
download.py:280Arbitrary File Write Through Unsanitized Download Filename
download.py:275Unbounded Streaming Download Can Cause Resource Exhaustion
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
---
name: feishu-message-download
description: 从飞书消息中下载文件(视频、图片、文档等)到本地
metadata: {"clawdbot":{"emoji":"📥","requires":{"bins":["python3"],"python_deps":["requests"]}}}
---
# 飞书消息文件下载
从飞书消息中下载文件(视频、图片、文档等)到本地。
## 描述
本 Skill 用于从飞书聊天消息中下载附件到本地,支持视频、图片、文件等多种类型。
下载后的文件可以用于:
- 视频编辑和处理
- 上传到抖音、小红书、B 站等平台
- 本地存档和备份
- AI 分析和处理
- 转发到其他平台
## �
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
result = response.json()
if result.get("code") != 0:
raise Exception(f"获取 access token 失败: {result.get('msg')}")
self._access_token = result["tenant_access_token"]
return self._access_token
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
result = response.json()
if result.get("code") != 0:
raise Exception(f"获取 access token 失败: {result.get('msg')}")
self._access_token = result["tenant_access_token"]
return self._access_token
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
result = response.json()
if result.get("code") != 0:
raise Exception(f"获取 access token 失败: {result.get('msg')}")
self._access_token = result["tenant_access_token"]
return self._access_token
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
result = response.json()
if result.get("code") != 0:
raise Exception(f"获取 access token 失败: {result.get('msg')}")
self._access_token = result["tenant_access_token"]
return self._access_token
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
result = response.json()
if result.get("code") != 0:
raise Exception(f"获取 access token 失败: {result.get('msg')}")
self._access_token = result["tenant_access_token"]
return self._access_token
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"name": "feishu-message-download",
"version": "1.0.0",
"description": "从飞书消息中下载文件(视频、图片、文档等)到本地",
"author": "勇哥的小飞侠 🧚🏻♀️🌸🧚🏻",
"license": "MIT",
"keywords": [
"feishu",
"lark",
"download",
"file",
"message",
"飞书",
"下载",
"文件"
],
"main": "download.py",
"scripts": {
"test": "python3 download.py --help"
},
"engines": {
"python": ">=3.8"
},
"dependencies": {
"requests": "^2.28.0"
},
"repository": {
"type": "git",
"url": "https://github.com/Cindypapa/feishu-message-download"
},
"claw
The skill documentation declares capabilities that imply access to environment secrets, local files, and outbound network requests, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this weakens least-privilege enforcement and can let the skill access credentials and write downloaded content to disk without clear policy controls.
The skill automatically reads Feishu credentials from environment variables and local OpenClaw configuration files, expanding its credential-access scope beyond explicit user input. While this is likely intended for convenience, it increases the chance of using secrets the user did not expect this tool to access, especially in shared or multi-skill environments.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
The code downloads remote content and writes it directly to a local path derived from user-controlled or server-supplied filename data without an explicit safety prompt. This can lead to unexpected file creation and, combined with unsafe filename handling, may overwrite or place files outside the intended directory.
The module description, CLI help text, errors, and status messages are all presented in Chinese, which imposes a specific language on all users. The file does not provide any option to select another language or indicate that the tool is intentionally limited to a Chinese-speaking context.
The manifest description is written only in Chinese, which can impose a language-specific experience on users without offering any alternative or opt-in. Under the policy, natural-language content that forces a specific language may be a locale/language policy violation unless choice or justification is provided.
The dependency on requests is version-ranged with a caret, which allows automatic adoption of newer releases within the allowed range. In supply-chain contexts, loose dependency pinning can introduce unexpected vulnerable or malicious package updates and reduces build reproducibility.
"python": ">=3.8"
},
"dependencies": {
"requests": "^2.28.0"
},
"repository": {
"type": "git",
The dependency is specified as requests>=2.28.0, which allows installation of any future version and does not guarantee a reproducible or reviewed package set. This increases supply-chain risk and can unexpectedly pull in vulnerable or breaking releases during deployment.
requests>=2.28.0
Because requests is not pinned, it is impossible to verify from this manifest whether the installed version includes fixes for known advisories. In a skill that downloads files from Feishu messages, network-facing HTTP behavior is directly relevant, so ambiguity around the exact requests version meaningfully increases exposure to dependency-related security flaws.