T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:62- Finding
Unrestricted API Base URL Can Expose Credentials and Uploaded Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its AI image-generation purpose, but it needs review because it can send API keys and selected media to an unvalidated custom API endpoint.
Review this before installing if you will use real brand assets or a funded AI Hive API key. Keep the default official API URL, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, and consider pinning dependencies in a virtual environment.
scripts/imagegen.py:62Unrestricted API Base URL Can Expose Credentials and Uploaded Media
SKILL.md:80Unpinned Runtime Dependency Installation
The skill invokes shell commands, performs package installation, and uses a Python script that likely needs filesystem, environment, and network access, but it does not declare any tool scope or permission boundaries. This creates a least-privilege violation: an agent or platform may grant broader capabilities than users expect, increasing the risk of unintended command execution, data access, or outbound network use.
The manifest description and main instructions are written as directives for producing Tmall ecommerce assets in Chinese, including line L08 stating that complex Chinese will be added later, with no indication that another language can be selected. This constitutes a locale/language constraint presented as fixed behavior rather than an opt-in or clearly justified policy-bound limitation.
The file is presented as a narrowly scoped Tmall image-generation/editing skill, but it actually embeds a full general-purpose AI Hive client with broader capabilities. This scope mismatch weakens governance and review boundaries: a consumer expecting a constrained image skill may unknowingly ship a tool that can access unrelated APIs and behaviors, increasing the attack surface and enabling misuse outside the declared purpose.
The top-level documentation explicitly describes a general AI capability wrapper, contradicting the specialized Tmall image-skill identity. Misleading documentation undermines trust, makes human review less reliable, and can conceal materially broader behavior than the skill description suggests.
This code file contains natural-language descriptions and CLI prompts entirely in Chinese, starting with the module docstring and continuing throughout the interface. Because the skill does not offer a user language/locale option and is not clearly documented as a China-only or Chinese-only tool, it forces a specific language without user opt-in.
The presence of text-chat functionality is inconsistent with the advertised Tmall image-editing scope and creates hidden general-purpose model access. In environments that rely on skill metadata for policy enforcement, this can allow prompt-based data handling or unintended model interactions that were not approved for this skill.
Video-generation support exceeds the stated purpose of an image-generation/editing skill and materially expands the functionality available to users. That broader media capability increases cost, data exposure, and abuse potential, especially if platform controls or reviewers assume the skill can only process images.
This markdown file contains user-facing natural language almost entirely in Chinese, but it does not state that the skill is China-specific or offer an alternate language/locale option. Under the policy rule for language/locale constraints, forcing a single language without user opt-in can be a policy concern.
The example API key placeholder uses Chinese text ("请替换为你的APIKey"), which imposes a specific language in user-facing content. There is no indication that this skill is region-specific or that users may choose another language, so this appears to violate the language/locale policy criteria.