T09 · Insecure Skill Coding Practices
- Location
scripts/minimax_image.py:93- Finding
Unvalidated Download of API-Supplied URLs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does generate images through MiniMax as described, but it needs review because it automatically trusts remote-returned image URLs and downloads them without validation.
Review before installing in sensitive environments. Use only prompts you are comfortable sending to MiniMax, protect the MINIMAX_API_KEY, run the skill with limited filesystem and network access, and consider adding URL allowlisting, response size/type checks, and pinned dependencies before routine use.
scripts/minimax_image.py:93Unvalidated Download of API-Supplied URLs
SKILL.md:52Unpinned Third-Party Dependency Installation
The skill documentation describes capabilities that require environment access for API keys and outbound network access to a third-party image generation service, but it does not declare any explicit tool scope or permissions. This creates a least-privilege and review gap: an agent may be granted broader access than necessary or users may not understand that secrets and external transmission are involved.
The skill sends user-supplied prompts to an external third-party API, which is a real data egress path. In this context, external transmission is expected for an image-generation skill, but it is still security-relevant because sensitive or proprietary prompt content and associated metadata could leave the local environment without prominent disclosure or restriction.
## API 信息
- **接口地址**: https://api.minimaxi.com/v1/image_generation
- **模型**: image-01
- **比例**: 支持 16:9, 1:1, 9:16 等
This code file contains natural-language strings that force a specific language/locale for all users, including the module description and runtime messages. Under the policy, a fixed language is a violation unless the skill offers opt-in choice or clearly documents that it is intentionally region-specific.
The hard-coded external API endpoint establishes that this skill is designed to transmit data off-host to a third-party service. In this image-generation skill, that is expected functionality, but it still creates a real data-exposure boundary because any prompt content and authentication token are used in communication with an external provider.
from pathlib import Path
# API配置
API_URL = "https://api.minimaxi.com/v1/image_generation"
MODEL = "image-01"
The script sends the user-supplied prompt to a third-party MiniMax API, which is an external data transmission. In an agent-skill context, prompts may contain sensitive business, personal, or proprietary data, and this code performs no consent check, redaction, classification, or warning before exfiltrating that data to an external service.
print(f"🎨 生成图片: {prompt[:50]}...")
try:
response = requests.post(
API_URL,
json=payload,
headers=self.headers,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""测试API连接"""
import requests
url = "https://api.minimaxi.com/v1/image_generation"
payload = {
"model": "image-01",
"prompt": "简单蓝色背景,科技风格,PPT用图",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
try:
print("🔍 测试连接 MiniMax API...")
response = requests.post(url, json=payload, headers=headers, timeout=60)
if response.status_code == 200:
result = response.json()
The manifest description and body text present the skill in Chinese only, which can amount to a language/locale constraint without giving users a choice. The policy requires flagging cases where a skill forces a specific language without user opt-in unless the constraint is clearly documented and justified.
This code file contains natural-language descriptions and console messages entirely in Chinese, and there is no indication that the skill is intended only for Chinese-speaking users or that another language option is available. The policy requires avoiding forced language or locale constraints unless the constraint is documented and justified or the user can opt in.