T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
API Credential Disclosure Through an Unrestricted Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches an AI image-generation workflow, but it sends credentials to a configurable API endpoint and can upload arbitrary local files without enough safeguards.
Review before installing. Only use this skill with trusted prompts and explicit image paths, avoid the standalone upload command for anything except intended product media, do not set a custom AI_HIVE_BASE_URL unless you fully trust that endpoint, and treat ~/.ai-hive/config.json as a stored API credential.
scripts/imagegen.py:91API Credential Disclosure Through an Unrestricted Base URL
scripts/imagegen.py:259Arbitrary Local File Upload Through Insufficient Media Validation
SKILL.md:78Unpinned Third-Party Dependency Installation
The skill invokes shell commands, installs packages, accesses local files, and can make networked API calls through imagegen.py, but it does not declare any permissions or allowed-tools constraints. This creates an authorization gap where an agent may grant broader capabilities than necessary, increasing the risk of unintended command execution, filesystem access, or data exfiltration if the skill or its inputs are abused.
The description contains broad activation phrases covering many ecommerce-image scenarios without clear boundaries, which can cause an agent to invoke this skill in loosely related contexts. Because the skill executes code and performs network/file operations, overbroad triggering raises the chance of unnecessary privileged execution and misuse on unintended user requests.
The file is presented as a Pinduoduo ecommerce image-generation/editing skill, but it actually exposes a much broader general-purpose AI client with chat, video, model listing, account inspection, and media-upload features. This scope mismatch is dangerous because users, reviewers, or orchestration layers may grant trust or permissions based on the narrow stated purpose while the code can perform materially different actions.
This code file contains natural-language descriptions and CLI prompts entirely in Chinese, such as the module docstring and later user-facing help/output text. Because the skill does not offer users a language/locale option and does not justify a China-specific locale restriction, it violates the language/locale policy criteria.
The skill includes a user-info endpoint that can retrieve user account and wallet/balance information, which is unrelated to ecommerce image generation. In a skill ecosystem, unnecessary access to account metadata increases privacy exposure and expands the blast radius if the skill is invoked by an untrusted workflow or socially engineered user.
The general text chat function is outside the declared scope of an ecommerce image-editing skill and turns the file into a broader AI interaction client. That hidden capability can be abused for prompt exfiltration, policy bypass attempts, or unintended data transfer to external models under the guise of a narrow image tool.
Video generation materially exceeds the declared purpose of generating/editing Pinduoduo product images and broadens the external API actions the skill can perform. This increases misuse potential, cost exposure, and review evasion because a seemingly image-only skill can submit richer media-generation jobs than users expect.
This markdown file contains user-facing natural language almost exclusively in Chinese, including the substantive changelog entries. Under the policy rule for language/locale, forcing a specific language without user opt-in or justification is a violation.
The manifest description combines Chinese and English in a way that implies a fixed bilingual presentation, but it does not state that users can choose their preferred language. This can violate language/locale policy expectations when a skill imposes a presentation language without opt-in.
The top-level documentation explicitly describes the file as a general AI capability tool, conflicting with the manifested identity of a Pinduoduo-specific image skill. Documentation inconsistency is dangerous because it obscures true capabilities during review and can cause operators to misclassify the trust level and permissions appropriate for the tool.