T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:92- Finding
API Key Disclosure Through an Unrestricted API Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE video workflow helper, but its API-key handling can send credentials to an arbitrary configured server, which warrants Review before installation.
Install only if you are comfortable giving this skill an AI-HIVE API key and uploading selected media to AI-HIVE. Use the default AI-HIVE endpoint only, avoid custom --base-url or AI_HIVE_BASE_URL values, consider a restricted or disposable API key, confirm all billable generation parameters before running, and install dependencies in a virtual environment.
scripts/videogen.py:92API Key Disclosure Through an Unrestricted API Base URL
scripts/videogen.py:1Unpinned Third-Party Dependency Installation Guidance
If the skill exposes generic chat, image generation, account-information retrieval, model listing, pricing access, or interactive API-key setup beyond its declared niche purpose, that expands the attack surface significantly. Undeclared access to account metadata or credential-setup flows can enable unintended data exposure, overbilling, or abuse because users may invoke the skill under the assumption it is narrowly scoped to Xiaohongshu decomposition tasks.
If the skill exposes generic chat, image generation, account-information retrieval, model listing, pricing access, or interactive API-key setup beyond its declared niche purpose, that expands the attack surface significantly. Undeclared access to account metadata or credential-setup flows can enable unintended data exposure, overbilling, or abuse because users may invoke the skill under the assumption it is narrowly scoped to Xiaohongshu decomposition tasks.
If the skill exposes generic chat, image generation, account-information retrieval, model listing, pricing access, or interactive API-key setup beyond its declared niche purpose, that expands the attack surface significantly. Undeclared access to account metadata or credential-setup flows can enable unintended data exposure, overbilling, or abuse because users may invoke the skill under the assumption it is narrowly scoped to Xiaohongshu decomposition tasks.
Referenced artifact was not completely inspected
python3 scripts/videogen.py init --skill-name xiaohongshu-viral-video-decomposer-ai-hive
Referenced artifact was not completely inspected
python3 scripts/videogen.py init --skill-name xiaohongshu-viral-video-decomposer-ai-hive
The file presents itself as a Xiaohongshu viral-video decomposition skill, but the implementation is a broadly capable AI Hive client that can upload arbitrary media and invoke generic text/image/video generation. This mismatch increases the attack surface and can mislead users or orchestrators into granting broader capabilities than the declared purpose requires, enabling unauthorized or policy-violating content generation under a narrower-looking skill label.
The skill advertises executable workflows that rely on environment variables, file access, network access, and shell-driven local processing, but it does not declare any explicit tool scope or permission boundaries. That makes the operational capability opaque to the host and reviewers, increasing the chance of overbroad execution, secret exposure, or unsafe file/network actions if the skill is enabled.
The trigger conditions are broad enough to match many generic business-content requests, which can cause this skill to activate outside its intended scope. Over-broad routing is dangerous because it may steer unrelated user tasks into a skill with network, file, shell, or media-processing capabilities, increasing the chance of unnecessary data handling, unintended external API use, or billable actions.
The default prompt explicitly instructs the skill to produce a "production-ready Chinese workflow," which imposes a specific language on users. This is a natural-language policy concern because the file does not indicate that Chinese is optional, user-selected, or justified as a region-specific requirement.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(args: list[str]) -> None:
print(" ".join(args))
subprocess.run(args, check=True)
def main() -> None:
The module docstring explicitly describes a generic AI capability tool, contradicting the advertised identity of a specialized Xiaohongshu decomposition skill. This kind of identity inconsistency is dangerous because security reviewers, agents, or users may trust the package based on its narrow branding while the code actually enables broader operations.
This Python file includes its primary docstring, CLI descriptions, prompts, and status messages in Chinese, making the skill effectively Chinese-only by default. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.
Exposing unrelated functions such as model enumeration, wallet/user-info lookup, text chat, and image generation violates least privilege for a decomposition-focused skill. If an agent can invoke these extra commands, the skill can be used as a general-purpose API proxy, broadening misuse opportunities and potentially exposing account metadata or incurring unexpected costs.
The file embeds a Chinese-only skill name and description in the module docstring and argparse description, with no indication that users may select another language or locale. This can violate a language/locale policy when a skill implicitly forces one language without opt-in.