T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:64- Finding
Bearer API Credential Can Be Transmitted to an Arbitrary Configurable Server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a plausible AI-HIVE video-generation helper, but it needs review because it handles API keys and network media transfers with weak destination controls.
Install only if you trust the publisher and AI-HIVE workflow, use a limited API key, avoid custom base URLs unless you control the endpoint, and review every generated command before running it. Keep uploads limited to media you are allowed to share, and monitor the configured ~/.ai-hive/config.json value because it controls where future authenticated requests go.
scripts/videogen.py:64Bearer API Credential Can Be Transmitted to an Arbitrary Configurable Server
scripts/videogen.py:238Server-Supplied Upload and Download URLs Are Used Without Destination Validation
SKILL.md:86Third-Party Python Dependency Is Installed Without Version or Integrity Pinning
The declared description presents a much broader production skill centered on creating digital-human mobile showcase videos and, when needed, orchestrating AI-HIVE OpenAPI operations to generate materials and deliver outputs. The supplied code does not perform those actions. It only parses command-line arguments and writes a local JSON file with preset fields. While the blueprint concept is loosely related to pre-production planning, the actual behavior is far narrower than the declared purpose and omits the core advertised capabilities. Therefore this is a material description-behavior mismatch.
This is a strong mismatch. The declared description describes an end-to-end specialized content-production skill for digital-human phone demo ads, with domain-specific inputs, outputs, and remote API orchestration. The supplied code does none of that. It is a narrowly scoped, auditable CLI wrapper around ffmpeg/ffprobe for deterministic editing operations on existing videos. While generic video editing could be a supporting implementation detail within a larger media pipeline, this code chunk alone lacks the core advertised behavior and instead has a materially different primary purpose.
The skill includes executable examples and references to capabilities such as environment variables, file access, shell commands, ffmpeg, and network/API usage, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this creates an over-privileged or ambiguously privileged skill surface where the runtime may allow sensitive operations without clear review, increasing the risk of secret exposure, arbitrary file modification, or unintended external requests.
The trigger phrases include broad terms like app advertising, product showcase, and phone screen video, which can cause the skill to activate for many generic marketing requests beyond its intended niche. Overbroad invocation expands the attack surface by increasing the chances that the agent routes unrelated user tasks into a skill that can suggest networked, file, or shell-based workflows, potentially leading to confused-deputy behavior or unnecessary exposure of sensitive inputs.
The invocation text is broad enough that the skill may be selected for generic requests about turning a request into a workflow, even when the user did not ask for avatar-phone showcase content. In this skill, over-invocation matters because it can steer users into a specialized marketing/video pipeline, potentially causing inappropriate tool use, unintended API actions, or irrelevant outputs.
The default prompt explicitly forces Chinese output regardless of the user's language preference. This can degrade user comprehension, conceal important safety or consent details from non-Chinese-speaking users, and increase the chance of mistaken approval of generated workflows or API actions.
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 presents itself as a phone-showcase video skill, but the implementation and docstring expose a broad, reusable AI utility for chat, image, video, model enumeration, upload, and task polling. In an agent-skill setting, this capability mismatch expands the reachable attack surface and may let callers invoke functions outside the reviewed business scope, undermining least privilege and policy controls.
The top-level documentation describes a generic AI invocation tool, while later code frames the file as a specialized avatar phone showcase skill. This inconsistency is dangerous in security review and deployment because operators may grant trust and permissions based on the narrow skill identity while the file actually contains a much broader toolset.
This code file contains user-facing natural-language descriptions entirely in Chinese, including the module docstring and CLI help text, without offering a language choice. Under the policy rule, forcing a specific language or locale without explicit user opt-in is a natural-language policy violation unless the constraint is clearly justified, which is not documented here.
The chat endpoint gives the skill a generic text-generation capability unrelated to avatar phone showcase video creation. In an agent environment, this can be repurposed for arbitrary prompt execution, policy bypass attempts, or unreviewed content generation beyond the intended workflow, making the skill materially more dangerous than advertised.
Standalone image generation is outside the stated video-focused purpose and enables broader synthetic-content creation than users or reviewers would expect from this skill. That mismatch weakens trust boundaries and could be abused to generate unrelated assets or deceptive materials under the cover of a specialized marketing-video tool.
The script hard-codes Chinese-language natural-language identifiers and descriptions such as the module docstring and argparse description. This imposes a specific language/locale on users without offering opt-in or documenting that the skill is intentionally region-specific, which matches the locale policy violation criteria.
The user-info command exposes account metadata and wallet/balance information that is unrelated to generating showcase videos. While not code execution, it creates unnecessary access to sensitive account details and increases the chance of data exposure or misuse through an otherwise specialized skill.