T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
API bearer credential can be transmitted to an arbitrary configured server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE brand-audit and media-generation workflow, but it handles API credentials and billable generation with weak local safeguards.
Install only if you trust the AI-HIVE workflow and will keep API keys scoped and revocable. Do not use custom or prompt-supplied base URLs, check ~/.ai-hive/config.json before running, start with batch size 1, and manually confirm cost/routing before any generation command.
scripts/imagegen.py:92API bearer credential can be transmitted to an arbitrary configured server
scripts/imagegen.py:461Unbounded image batch submission can trigger unexpected billable operations
A skill advertised as returning deviation lists and repair priorities instead appears to expose a general-purpose client for account info, wallet balance, model enumeration, uploads, generation, and task downloads without implementing the promised audit controls. This is dangerous because stakeholders may trust it with sensitive brand assets under the assumption of a constrained reviewer, while the real capability set supports much broader and potentially costly operations.
A skill advertised as returning deviation lists and repair priorities instead appears to expose a general-purpose client for account info, wallet balance, model enumeration, uploads, generation, and task downloads without implementing the promised audit controls. This is dangerous because stakeholders may trust it with sensitive brand assets under the assumption of a constrained reviewer, while the real capability set supports much broader and potentially costly operations.
A skill advertised as returning deviation lists and repair priorities instead appears to expose a general-purpose client for account info, wallet balance, model enumeration, uploads, generation, and task downloads without implementing the promised audit controls. This is dangerous because stakeholders may trust it with sensitive brand assets under the assumption of a constrained reviewer, while the real capability set supports much broader and potentially costly operations.
A skill advertised as returning deviation lists and repair priorities instead appears to expose a general-purpose client for account info, wallet balance, model enumeration, uploads, generation, and task downloads without implementing the promised audit controls. This is dangerous because stakeholders may trust it with sensitive brand assets under the assumption of a constrained reviewer, while the real capability set supports much broader and potentially costly operations.
The packaged skill is advertised as a brand-visual-consistency audit tool, but the exposed implementation actually provides generic image generation, upload, and task execution flows. This mismatch can mislead operators into granting the skill broader trust and permissions than its stated purpose warrants, creating a capability-confusion risk that can be abused to generate or process arbitrary media outside the intended audit scope.
The file presents itself as a brand visual consistency audit skill, but the implementation is a generic AI-Hive media/chat client capable of text chat, image generation, video generation, upload, polling, and downloads. This scope mismatch is dangerous because users, reviewers, or policy gates may grant the skill access and trust appropriate for auditing, while it can actually generate arbitrary content and perform unrelated operations.
The branded entrypoint routes the user into video generation via skill_generate/cmd_video rather than any brand-consistency auditing function. In context, this makes the deception more dangerous because the skill is marketed for compliance-style review, yet operationally serves as a content creation wrapper that could bypass narrower approval expectations.
The skill documents runnable commands that imply access to environment variables, filesystem, shell, and networked API calls, but it declares no explicit tool scope or permissions boundary. That mismatch can cause an agent runtime to grant broader capabilities than reviewers or users expect, increasing the chance of unintended file access, command execution, secret exposure, or outbound requests.
The skill says it uses user brand guidelines as the sole standard for review, but it also invites transforming a reference case into new content with scripts, prompts, code, or task lists. That inconsistency weakens the boundary between auditing and content derivation, which can facilitate IP-sensitive imitation workflows under the cover of a benign brand-check tool.
The documentation for a supposed audit skill includes standalone image and video generation workflows, which broadens the skill from evaluation into content creation. In context, this makes accidental misuse more likely: a reviewer-oriented skill may be invoked in environments where generative actions, external uploads, or billable API calls were not expected or approved.
The natural-language instruction says to produce a "production-ready Chinese workflow," which imposes a specific language on users by default. This is a language/locale policy concern because the file does not offer an alternative language choice or explain why Chinese is required.
The natural-language description, argument parser description, skill name, and several metadata values are presented in Chinese with no indication that other languages are supported or optional. This can constitute a language policy violation because the file imposes a specific language context without user opt-in or documented justification.
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 file-level description and CLI branding present the module as a generic AI capability wrapper rather than a narrowly scoped brand-audit skill. In security-sensitive agent ecosystems, inaccurate or overly broad documentation undermines review, increases the chance of unsafe invocation, and hides the true operational surface from users and defenders.
The module docstring and subsequent user-facing prompts/help text are in Chinese, which effectively forces a specific language for users. The file does not offer an opt-in language selection or explain that the skill is intentionally region- or locale-specific.
The packaged skill exposes raw upload and generic task polling commands that are unrelated to a narrow brand-consistency audit workflow. These extra primitives enlarge the attack surface and enable the skill to act as a general-purpose media transport/execution client, which can facilitate unauthorized data movement or unintended downstream model use under the guise of an audit tool.
The module and CLI are documented as a generic AI capability tool, which directly contradicts the branded identity of a brand audit skill. This inconsistent presentation is security-relevant because it obscures true capability during review and can cause operators to misclassify a broad-content-generation tool as a narrow audit utility.
Querying user-info and wallet balance is unrelated to brand visual consistency auditing and exposes account metadata beyond the stated task. While not directly leading to code execution, it violates least privilege and broadens the skill's access to sensitive operational information that could aid reconnaissance or unintended billing visibility.
A general-purpose chat_text capability is not justified by a brand-visual-consistency audit skill and materially expands what the skill can do beyond its declared purpose. This unnecessary capability increases the risk of policy circumvention, prompt abuse, and unauthorized use as a generic model access tool under the cover of an audit-branded skill.
This code writes a JSON file to a user-specified path, potentially creating directories and overwriting existing content, but the script provides no prior warning, confirmation, or explanatory comment/docstring about this side effect. Aside from printing the resolved path after completion, there is no disclosure before the write occurs.
This code file contains natural-language descriptions entirely in Chinese, including the module docstring and later CLI help text, which effectively forces a specific language/locale on users. The policy allows fixed locale only when clearly documented and justified or when users are given a choice, neither of which is present here.