T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Bearer API Key Can Be Transmitted to an Arbitrary Server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real AI-HIVE video-ad helper, but it gives agents enough authority to upload media, spend credits, and expose API keys without strong built-in safeguards.
Install only if you trust the publisher and will review commands before running them. Do not use a custom base URL unless you fully control it, rotate any key used with an untrusted endpoint, and treat generate/upload commands as potentially billable and privacy-sensitive because selected local media can be uploaded immediately.
scripts/videogen.py:91Bearer API Key Can Be Transmitted to an Arbitrary Server
scripts/videogen.py:514Potentially Billable Generation and Media Uploads Lack an Enforced Confirmation Gate
A second description-behavior mismatch reiterates that the skill claims structured app-promo orchestration and AI-HIVE operations while only evidencing basic local video manipulation/JSON generation. Such overstated capability can cause an orchestrating agent to pass sensitive media or trust the skill for compliance-sensitive creative workflows it cannot actually perform safely.
A second description-behavior mismatch reiterates that the skill claims structured app-promo orchestration and AI-HIVE operations while only evidencing basic local video manipulation/JSON generation. Such overstated capability can cause an orchestrating agent to pass sensitive media or trust the skill for compliance-sensitive creative workflows it cannot actually perform safely.
The skill advertises runnable code that uses environment variables, filesystem access, network calls, and shell-based tooling, but it does not declare any tool scope or permission boundaries. In agent environments, this can lead to overbroad tool access, making accidental secret exposure, arbitrary file access, or unintended external requests more likely if the skill is invoked.
The skill content, invocation guidance, and output requirements are entirely presented in Chinese, and no user language preference or opt-in is offered. Under the stated policy, a skill should not impose a specific language unless it explicitly provides a choice or clearly documents a justified regional constraint.
The invocation phrases are broad marketing terms that overlap with normal conversation, increasing the chance the skill is auto-invoked in contexts where the user did not intend to run ad-production logic. Unintended invocation matters here because the skill includes code-oriented and potentially billable/network-capable workflow guidance, which can expand attack surface or trigger unwanted actions.
The default prompt explicitly instructs the assistant to produce a 'production-ready Chinese workflow,' which constrains output language without checking the user's preference. This can override or conflict with user intent, reduce usability for non-Chinese-speaking users, and create prompt-level behavior that is broader than necessary for the task.
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 is marketed as a narrowly scoped App UI demo ad skill, but the implementation includes broad-purpose AI-Hive client functionality such as chat, model enumeration, account queries, and arbitrary media upload. This creates a scope mismatch that can mislead operators and downstream systems into granting or invoking capabilities beyond the declared purpose, increasing the chance of unauthorized data access or misuse.
The module docstring and all user-facing instructions are written exclusively in Chinese, presenting the skill as a general-purpose tool rather than a region-specific or Chinese-only skill. Under the stated policy, forcing a specific language/locale without user opt-in is a natural-language policy violation.
The skill can retrieve user/account information and wallet balance even though that capability is not needed to generate App UI demo ads. In a skill ecosystem, unnecessary sensitive capability expansion violates least privilege and may expose account metadata or financial information to prompts, logs, or unauthorized users.
The free-form text chat feature is unrelated to the declared purpose and allows arbitrary interaction with backend models through the same API key and client. That broadens the attack surface, enables unintended data processing, and can be abused to bypass product-level constraints expected for a purpose-limited ad-generation skill.
The parser and help text expose generic model browsing and image/video tooling, reinforcing that the artifact behaves like a general AI utility rather than a constrained App UI ad skill. In context, this makes accidental or intentional misuse more likely because users can discover and invoke broader functions not implied by the skill metadata.
The file hard-codes Chinese-language title/branding in the module docstring and argparse description (App界面演示广告|AI-HIVE) with no indication that users can choose another language or locale. This can violate language/locale policy when a skill imposes a specific language experience without explicit opt-in or justification.