T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:89- Finding
Bearer Credential 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 mostly matches its advertised AI-HIVE ad-video workflow, but it handles paid API credentials in a way that can send them to an unvalidated custom endpoint.
Review this before installing if you will use a real AI-HIVE API key. Only use the official HTTPS AI-HIVE endpoint, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the server, and run the scripts in an isolated environment. Expect media you provide and prompts to be sent to AI-HIVE, and confirm parameters before any paid generation.
scripts/videogen.py:89Bearer Credential Disclosure Through an Unrestricted API Base URL
scripts/videogen.py:7Unpinned Runtime Dependency Installation
This mismatch is more serious because the finding indicates undeclared generic chat, image generation, account information, wallet balance, and model enumeration access. Undisclosed access to user/account metadata or paid-service surfaces can lead to privacy issues, unexpected charges, and broader-than-expected data exposure.
This mismatch is more serious because the finding indicates undeclared generic chat, image generation, account information, wallet balance, and model enumeration access. Undisclosed access to user/account metadata or paid-service surfaces can lead to privacy issues, unexpected charges, and broader-than-expected data exposure.
This mismatch is more serious because the finding indicates undeclared generic chat, image generation, account information, wallet balance, and model enumeration access. Undisclosed access to user/account metadata or paid-service surfaces can lead to privacy issues, unexpected charges, and broader-than-expected data exposure.
The skill exposes examples that rely on shell execution, filesystem access, environment variables, and network calls, but it does not declare any explicit tool scope or permission boundaries. That mismatch increases the chance of over-privileged execution, accidental secret exposure, or unintended command/network use if the runtime grants broad default capabilities.
The manifest description defines invocation using only Chinese trigger phrases such as 广告钩子、黄金3秒、开场变体 and similar terms, with no indication that other languages are supported or that Chinese is an opt-in constraint. This creates a language/locale restriction in the skill's natural-language policy surface without documented user choice or justification.
Overly broad trigger conditions can cause the skill to activate in unrelated marketing contexts, increasing the chance that sensitive user content is routed into a tool with network, file, or generation capabilities unnecessarily. This is primarily an invocation-safety issue rather than direct code execution, but it can widen exposure and create confusing or risky automation paths.
The default prompt hard-codes Chinese output and a specific production-ready workflow format without checking the user's language preference. This can override user intent, reduce transparency, and make accidental invocation more problematic because the system immediately steers output into a predetermined operational mode rather than first confirming language and task boundaries.
The skill enables implicit invocation without any trigger constraints, so the platform may auto-select it for loosely related requests. Because this skill can generate runnable AI-HIVE commands and production workflows for ad creative generation, unintended invocation could cause users to receive automated ad-generation actions or guidance they did not explicitly request, increasing the risk of misuse and scope creep.
This code hardcodes a Chinese-language skill name and description in the module docstring and argparse description, indicating a fixed locale presentation. For a code file, this is a natural-language policy concern when the skill imposes a specific language without offering user choice or documenting 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 file is presented as a narrowly scoped ad-hook/video variant skill, but the implementation is a broad AI Hive client exposing generic chat, model discovery, uploads, and arbitrary media generation. This scope mismatch weakens least-privilege expectations and enables operators or downstream agents to use the skill for capabilities not disclosed in the manifest, increasing misuse and review evasion risk.
The module docstring explicitly describes a generic AI capability tool, contradicting the specialized manifest description. This kind of misleading packaging can conceal materially broader functionality from reviewers and policy enforcement, making the skill more dangerous in context because the manifest promises a constrained advertising use case.
The file-level docstring is entirely in Chinese and presents the tool as a general-purpose skill, while later user-facing prompts and help text are also exclusively Chinese. For a general-purpose skill, this imposes a specific language/locale without opt-in or a documented region-specific justification, which matches the language-policy violation criteria.
Querying user account information and wallet balance is unrelated to generating ad-hook variants and exposes extra account metadata through the skill. While not direct code execution, it expands access to sensitive information and violates the principle of minimum necessary capability for this context.
Listing all available TEXT/IMAGE/VIDEO models allows discovery of capabilities beyond the advertised ad-hook generation workflow. In a constrained skill environment, this broadens what an invoking agent can learn and do, making it easier to pivot into unintended model usage.