T09 · Insecure Skill Coding Practices
- Location
scripts/generate.py:205- Finding
Unrestricted and Unbounded Download from an API-Controlled URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does generate images as advertised, but it automatically searches local TOOLS.md files for an API key and downloads API-provided URLs without enough validation or limits.
Review before installing. Prefer providing DASHSCOPE_API_KEY through a controlled environment variable, avoid storing it in shared TOOLS.md files, and do not use sensitive prompts unless sending them to Alibaba Cloud is acceptable. The image download code should ideally validate allowed hosts, response type/status, and maximum size before saving files.
scripts/generate.py:205Unrestricted and Unbounded Download from an API-Controlled URL
The documented purpose is image generation, but the skill also indicates it may read TOOLS.md to obtain API credentials and write files locally, which expands its effective privilege beyond what the description suggests. Hidden or under-documented credential harvesting from local files is especially risky because users may not realize the skill inspects local configuration material rather than only using explicit inputs.
The skill advertises network, environment-variable, and file-reading behavior but does not declare any tool scope such as permissions or allowed-tools. That omission weakens user visibility and policy enforcement, making it easier for the skill to access credentials and local files without clear consent boundaries.
The skill description does not clearly tell users that prompts and possibly sensitive creative content are transmitted to a third-party cloud service for processing. Without that disclosure, users may unknowingly send confidential, personal, or regulated information off-host.
The setup instructions tell users to store an API key in environment variables or TOOLS.md without warning about the security implications of plaintext credential storage and accidental disclosure. This can lead to credential leakage through source control, shared configs, logs, or broader local file access by other tools.
The script retrieves DASHSCOPE_API_KEY not only from the environment but also by scanning several local TOOLS.md paths, including a fixed absolute path. That behavior exceeds the stated purpose of image generation and creates an unexpected local secret-reading capability that can silently consume credentials from the host environment without explicit user consent.
The code reads credentials from local TOOLS.md files automatically and gives no user-facing warning that it is accessing local secret material. In an agent-skill context, hidden credential discovery is risky because users may run the skill expecting only network access for image generation, not filesystem inspection for reusable secrets.
The feature list specifically emphasizes Chinese text rendering, and the document is entirely written in Chinese, but it does not explicitly offer users a language choice or explain that the skill is intentionally limited to a Chinese-language context. This can be interpreted as a locale-specific preference without clear opt-in or justification.
No suspicious patterns detected.