T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Bearer API Credential Disclosure Through an Unrestricted 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-generation helper, but it needs review because it can use a stored API key with an unvalidated custom API endpoint.
Install only if you understand the AI-HIVE API-key flow. Keep the API base URL fixed to the official AI-HIVE endpoint, do not follow prompts or examples that set --base-url or AI_HIVE_BASE_URL to another host, use a limited/rotatable API key, and confirm parameters and costs before running generation commands.
scripts/videogen.py:91Bearer API Credential Disclosure Through an Unrestricted Base URL
If the skill exposes undeclared capabilities such as generic chat, image generation, account or wallet retrieval, or model catalog access beyond its stated purpose, users and reviewers cannot accurately assess its data flows or risk surface. Hidden or undocumented capabilities are dangerous because they can process unexpected data, contact external systems, or expose account information outside the user's informed expectations.
If the skill exposes undeclared capabilities such as generic chat, image generation, account or wallet retrieval, or model catalog access beyond its stated purpose, users and reviewers cannot accurately assess its data flows or risk surface. Hidden or undocumented capabilities are dangerous because they can process unexpected data, contact external systems, or expose account information outside the user's informed expectations.
If the skill exposes undeclared capabilities such as generic chat, image generation, account or wallet retrieval, or model catalog access beyond its stated purpose, users and reviewers cannot accurately assess its data flows or risk surface. Hidden or undocumented capabilities are dangerous because they can process unexpected data, contact external systems, or expose account information outside the user's informed expectations.
The skill includes executable code paths and instructions that imply access to environment variables, local files, network requests, and shell utilities, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization and review gap: a caller or platform may permit broader capabilities than intended, increasing the risk of secret exposure, unintended file access, or outbound requests to third-party services.
For a markdown file, trigger phrases should be specific enough to avoid unintended invocation. "内容分发" is a generic content/marketing term that could match many unrelated workflows, and the file does not provide exclusion examples for this phrase.
The condition covers any user wanting to turn a reference case into original content and asking for scripts, prompts, code, or task lists. This describes a wide range of general creative assistance requests and does not clearly distinguish when this specialized multi-platform video adaptation skill should activate.
The phrase covering e-commerce, advertising, marketing, livestream commerce, recommendation content, short drama, manga drama, or social media delivery is very broad and context-based rather than trigger-specific. Without explicit constraints, it risks invoking the skill for many general marketing requests not requiring this workflow.
The default prompt hard-codes Chinese output regardless of user preference, which can cause the system to ignore user language expectations or downstream policy/context requirements. While this is not a direct code-execution issue, it can produce misleading or unusable outputs, reduce transparency for non-Chinese-speaking operators, and increase the chance that users approve actions they do not fully understand.
The skill enables implicit invocation without tightly scoped triggers, which can cause the agent to invoke this capability in situations the user did not clearly intend. Because this skill can generate production-ready workflows and runnable AI-HIVE commands for multi-platform content generation/distribution, accidental activation could lead to overbroad automation, unintended third-party API use, or content operations being initiated without sufficient user confirmation.
The manifest describes a skill that receives source video and platform/region/account inputs, then generates platform-specific adaptation outputs and interacts with AI-HIVE OpenAPI for configuration lookup, upload, routing, polling, and download. This file only parses a few CLI fields and writes a deterministic local JSON draft brief, with no video handling, no platform-specific variant generation, and no AI-HIVE API interaction.
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 specialized multi-platform video adaptation skill, but the implementation and even the top-level docstring expose a general-purpose AI client covering chat, image generation, model enumeration, uploads, and account-related operations. This capability mismatch increases attack surface and breaks least-privilege expectations, making it easier for a caller or downstream agent to use the skill for purposes outside the reviewed scope.
The module docstring explicitly describes the script as a general AI capability invocation tool, which conflicts with the declared identity of a narrowly scoped video-reversion skill. This discrepancy is dangerous because operators and reviewers may trust the manifest scope while the code actually supports much broader operations.
The file-level description and nearly all user-facing prompts are written only in Chinese, and the skill presents itself as a general-purpose tool rather than a region-specific or Chinese-only skill. Under the policy, language constraints should be opt-in or clearly justified; here no user choice or locale justification is provided.
The skill can call a user-info endpoint that may reveal account identity and wallet balance, which is unrelated to the stated task of multi-platform video reversion. In an agent setting, unnecessary access to billing/account metadata creates avoidable data exposure and can aid reconnaissance about the linked AI service account.
Generic text chat is broader than the declared function of adapting a source video into platform-specific variants. In a skill ecosystem, this enables prompt-based use of the same API key for unrelated tasks, undermining policy scoping and making review of intended behavior less reliable.
Standalone image generation is not required for the skill's stated role and broadens the set of actions that can be performed with the configured API credentials. This unnecessary capability expansion increases the chance of misuse, policy bypass, or accidental cost-incurring actions outside the approved workflow.
This Python file embeds Chinese-only natural-language identifiers in the module docstring, CLI description, and generated skill metadata. Because the file provides no user choice of language and does not document that the skill is intentionally region-specific, it can violate the policy against forcing a specific language or locale without opt-in.