T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Unrestricted API base URL can disclose the bearer credential in imagegen.py
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE local client, but it handles API keys and media with insufficient endpoint validation that could expose credentials or selected files if configuration or API responses are malicious.
Review before installing. Use only a low-privilege AI-HIVE key, avoid custom base URLs unless you fully trust the endpoint, keep the config file private, and do not upload sensitive media until endpoint and storage URL validation is added. Prefer an isolated Python environment with pinned dependencies.
scripts/imagegen.py:91Unrestricted API base URL can disclose the bearer credential in imagegen.py
scripts/videogen.py:91Unrestricted API base URL can disclose the bearer credential in videogen.py
scripts/imagegen.py:280Unvalidated server-provided upload and download URLs in imagegen.py
scripts/videogen.py:280Unvalidated server-provided upload and download URLs in videogen.py
SKILL.md:119Unpinned third-party dependency installation
This second mismatch indicates the skill behaves like an end-user client that can collect API keys, upload local media, and download generated results, while the description frames it as a managed unified model gateway for teams. In context, that increases the risk of credential mishandling, sensitive file exposure, and operator confusion because users may believe they are using a centrally governed relay when they are actually running local actions with broader direct access to data and secrets.
This second mismatch indicates the skill behaves like an end-user client that can collect API keys, upload local media, and download generated results, while the description frames it as a managed unified model gateway for teams. In context, that increases the risk of credential mishandling, sensitive file exposure, and operator confusion because users may believe they are using a centrally governed relay when they are actually running local actions with broader direct access to data and secrets.
The skill advertises and demonstrates code execution paths using shell commands, local file access, environment variables, and networked API usage, but it does not declare any explicit tool scope or permission boundaries. This creates a trust and review gap: consumers or platforms may grant broader capabilities than expected, increasing the risk of unintended command execution, local file modification, or credential exposure during use.
The skill enables allow_implicit_invocation without any visible trigger constraints, so the agent may auto-select this skill in contexts the user did not clearly intend. Because this skill is positioned as handling API relay, routing, keys, quotas, and audit workflows, ambiguous activation increases the chance of unintended sensitive guidance, configuration changes, or overbroad handling of infrastructure-related requests.
The manifest describes a skill for unifying model APIs, managing keys, routing, quotas, auditing, async tasks, and media-model workflows. In contrast, this file only parses CLI arguments and writes a local blueprint JSON containing project/audience/goal plus storyboard-style artifacts, with no API relay, model management, routing, auditing, or task orchestration behavior.
The file-level docstring says the script 'Create[s] a deterministic production brief for AI API中转站,' which frames the functionality as content/planning artifact generation. That intent conflicts with the broader skill description centered on API aggregation, key management, routing, quotas, auditing, and async model-task handling.
This file contains user-facing descriptions, prompts, and CLI guidance in Chinese only, starting from the module docstring and continuing throughout the skill. Because the skill does not offer a language/locale choice or explain that it is intentionally region-specific, it may violate language/locale policy requirements.
The module docstring and all user-facing instructions are written only in Chinese, presenting the tool as a general-purpose skill without stating any locale restriction or giving users an opt-in language choice. Under the language/locale policy, a general-purpose skill should not implicitly force a specific language unless that constraint is documented and justified.
The example API key value includes Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. There is no indication that the skill offers language choice or that the locale constraint is intentional and documented.
This code embeds Chinese-language user-facing text in the module docstring, argparse description, and output payload, which effectively fixes the skill's locale without any opt-in or alternative. The policy calls for flagging language or locale constraints when they are forced rather than user-selectable or clearly justified.