T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:57- Finding
Configurable API Origin Can Expose Credentials and Product Media to an Untrusted Server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly does the advertised image-generation work, but it can send API credentials and uploaded product media to any configured API origin without validation or clear warning.
Review before installing. Use only a trusted AI Hive endpoint, avoid setting --base-url or AI_HIVE_BASE_URL unless you control and trust the destination, and do not upload proprietary or pre-release product assets without approval. Consider using a throwaway or scoped API key and a virtual environment with pinned dependencies.
scripts/imagegen.py:57Configurable API Origin Can Expose Credentials and Product Media to an Untrusted Server
SKILL.md:67Unpinned Third-Party Dependency Installation
The file implements generic text-chat and video-generation features even though the advertised skill is Walmart image generation/editing. In an agent setting, hidden or unnecessary capabilities are dangerous because they broaden what the skill can do with the configured API key, potentially enabling unreviewed model access, unexpected data transmission, and policy bypass through functionality outside the declared use case.
The file uses Chinese for all substantive changelog entries, which can constitute a language-policy issue when a skill forces a specific language without user opt-in. There is no indication that this skill is region-specific or that users can choose an alternate language.
The skill invokes Python scripts, installs dependencies, and references capabilities that imply shell, filesystem, environment, and network access, but it does not declare any tool-scope restrictions in the manifest. This creates an avoidable trust gap: an agent or reviewer cannot tell from the manifest what capabilities are intended, increasing the chance of overprivileged execution or unsafe reuse in broader contexts.
The description is very broad and encourages use across many Walmart and omnichannel image-generation scenarios without clear trigger conditions or boundaries. Broad invocation wording can cause accidental activation on loosely related tasks, leading to unintended execution of a skill that performs networked image processing on product assets.
The run instructions direct the user to initialize and execute an image-generation workflow against a fixed external endpoint, but they do not warn that supplied product reference images may be transmitted off-system. This can expose proprietary product imagery, packaging, labels, or pre-release retail assets to a third-party service without informed user consent or data-handling review.
The module docstring and subsequent user-facing guidance are written entirely in Chinese, and the CLI prompts/messages throughout the file assume Chinese-language operation. For a general-purpose skill, this imposes a specific language/locale on users without offering a choice or documenting a justified region-specific constraint.
The skill is presented as a narrowly scoped Walmart image-generation tool, but it also exposes additional operational capabilities such as task inspection and direct media upload. This scope mismatch can cause users or orchestrators to grant trust, permissions, or API access under a narrower assumption than the code actually warrants, increasing the attack surface and enabling unintended data access or service use.
The sample API key value contains Chinese-only instructional text ("请替换为你的APIKey"), which imposes a specific language in a user-facing configuration example. The file does not offer a language choice or explain a region-specific requirement, so this is a natural-language locale policy issue.