T09 · Insecure Skill Coding Practices
- Location
examples/basic_usage.py:127- Finding
API key material is disclosed through example console output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent MDClaw API client, but users should be careful because prompts, URLs, uploaded images, and account data are sent to an external service.
Install only if you are comfortable sending your prompts, webpage URLs, selected image files, registration details, and API-authenticated requests to the documented MDClaw gateway. Avoid submitting sensitive files or private URLs unless approved, do not share logs from the example scripts because they may include API-key prefixes, and choose output paths carefully when using the download helpers.
examples/basic_usage.py:127API key material is disclosed through example console output
mdclaw_client.py:381Remote media URLs are downloaded without destination or resource validation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Thumbs.db
# Environment variables
.env
.env.local
# Test outputs
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Environment variables
.env
.env.local
# Test outputs
test_output/
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.
从该代码片段看,核心行为是一个 examples/test_connection.py 测试脚本,用于验证客户端连接和若干 API 调用是否正常。这与声明中描述的“提供多模态 AI 能力并支持账号注册、图片上传、任务轮询等完整功能”的产品级能力存在明显偏差:一方面,代码展示了未声明的 AI 搜索能力;另一方面,这个片段并未实现或展示声明中的多个关键能力,而只是对部分接口进行测试。虽然测试脚本可能属于同一项目的一部分,但就该片段本身而言,其主要目的与声明的技能用途不一致,因此应判定为描述与代码行为不匹配。
The skill documents use of environment variables and outbound network access to a third-party API gateway, but it does not declare any tool scope or permissions boundaries. This can mislead reviewers and users about what capabilities the skill requires, reducing transparency and making unintended secret access or network exfiltration easier in agent environments.
The skill sends prompts, images, URLs, and likely other user-provided data to an external backend, but the documentation does not clearly warn users about this data transfer. In multimodal workflows this can expose sensitive text, personal images, or proprietary URLs to third-party processing without informed consent.
The example encourages uploading a local file to a remote service without any privacy or data-handling warning. In a skill context, users may treat examples as safe defaults and unintentionally transmit sensitive local content, especially if they replace the sample file with personal images.
技能清单描述强调的是 TTS、文生图、文生视频、图生视频,以及通过网关进行图片上传和任务轮询等多模态能力。该示例还调用了 agent_register 注册新账号,这属于账户生命周期管理能力,并未在所列“等”后的直接上下文中得到明确体现,和主要宣称的多模态生成能力存在范围不一致。
The example uses hardcoded credentials and submits them to a remote registration endpoint without warning. This normalizes unsafe credential practices, risks accidental reuse of weak/static credentials, and obscures that account data is being transmitted off-host to an external service.
This Python file presents its description and runtime messages entirely in Chinese, including the module docstring and all user-facing output. Under the stated policy, forcing a specific language without user opt-in or documented justification is a natural-language policy violation.
The manifest describes this skill as supporting TTS, text-to-image, text-to-video, image-to-video, account registration, image upload, and task polling. This test file invokes client.ai_search(...), which is a distinct capability not disclosed in that description, indicating the implemented/validated behavior exceeds the stated multimodal generation scope.
技能清单描述聚焦于 TTS、文生图、文生视频、图生视频、注册、上传和任务轮询等多模态能力,但该文件文档和实现额外包含 ai_search、weather_query、web_summary。此类信息检索/网页分析能力并非清单中已声明的明显实现细节,而是额外功能扩展。
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"parameters": parameters
}
response = requests.post(self.GATEWAY_URL, json=payload, headers=headers)
return response.json()
# ========== 账号管理 ==========
The upload_image method reads a local file and transmits it to a remote service without any explicit warning, consent step, or strong validation at the operation site. In an agent setting, local file exfiltration to third-party infrastructure is sensitive because users may not realize that selecting a local path causes the file contents to leave the host.
The client includes convenience methods that download remote content and write it to local paths, but this capability is not clearly declared in the described skill scope. Undisclosed filesystem writes are risky in agent contexts because they can persist untrusted remote data locally and surprise users or higher-level orchestrators that did not grant file-write intent.
The markdown includes examples that upload a local image (photo.jpg) and save generated media to local paths (output.jpg, output.mp4). While these actions are part of the client’s functionality, the README does not explicitly warn that local files may be uploaded to a remote service and that output files will be written to disk, which is relevant to user data and system integrity.
The statement '视频/图片生成建议使用英文 prompt,效果更好' nudges users toward a specific language choice. Because the policy disallows forcing or unduly constraining language/locale without opt-in, this should be framed more clearly as an optional quality tip rather than a language expectation.
The skill name, description, headings, examples, and parameter usage guidance are entirely presented in Chinese, with no indication that users may choose another language or that the skill is intended only for a Chinese-language audience. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy concern unless the locale limitation is explicit and justified.
The manifest’s natural-language fields are written entirely in Chinese, but there is no indication that the skill is region-specific or that users may choose another language. Under the policy rule for language/locale, this can be a violation when a specific language is imposed without opt-in or justification.
The dependency specification uses a lower-bound only constraint (requests>=2.31.0) instead of pinning to an exact version or tightly bounded range. This makes builds non-reproducible and can unintentionally pull in newly released or vulnerable versions, increasing supply-chain and stability risk over time.
# MDClaw OpenClaw 技能依赖
requests>=2.31.0
Because requests is not pinned, it is impossible to verify from this manifest whether the installed version includes fixes for known advisories affecting some releases. While the file does not prove a vulnerable version is installed, the lack of pinning creates uncertainty and may allow deployment with an affected release.