T09 · Insecure Skill Coding Practices
- Location
assets/config.json:3- Finding
Hardcoded API Credential Committed in Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This EPUB translator is purpose-aligned, but it includes a bundled API key and can send book contents to a remote service and delete user-selected work directories without strong safeguards.
Review before installing. Do not use the bundled API key; rotate it if you own it and replace it with your own environment-provided credential. Only run this on documents you are willing to send to the configured provider, verify the base_url, avoid shared work directories, and do not pass valuable existing folders to --work-dir.
assets/config.json:3Hardcoded API Credential Committed in Configuration
assets/translate_epub.py:190EPUB Contents Are Transmitted Without an Enforced Consent Gate
assets/translate_epub.py:690Arbitrary Recursive Deletion Through the Work Directory Argument
assets/translate_epub.py:229Source Document Contents Persist in a Plaintext Cache
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill is designed to send EPUB text to a remote OpenAI-compatible API for translation, which is an external data transmission risk because book contents may include sensitive or copyrighted material. Although the skill explicitly says network access is off by default and requires user approval, once approved it can transmit substantial document content to third-party services, so the finding is contextually real but partially mitigated.
- `base_url`:服务根地址(**不含 `/chat/completions`**)。脚本会自动剥掉末尾的 `/chat/completions` 与多余斜杠。例:
- DeepSeek 官方:`https://api.deepseek.com`
- OpenCode 网关:`https://opencode.ai/zen/go/v1`
- OpenAI 官方:`https://api.openai.com/v1`
- 通义千问兼容模式:`https://dashscope.aliyuncs.com/compatible-mode/v1`
- 智谱:`https://open.bigmodel.cn/api/paas/v4`
- `extra_body`:附加请求体。DeepSeek 关闭推理:`{"thinking": {"type": "disabled"}}`,其它模型一般留空 `{}`。
The system prompt explicitly requires translating content into Simplified Chinese and only outputting that language, without offering the user any locale or language choice. This is a natural-language policy issue because the skill enforces a specific language behavior globally rather than making it optional or context-dependent.
The manifest presents the skill as operating on a user-provided EPUB file, but the safety section explicitly discusses optional network access and the input section allows remote URL/repository fetching. While model API access for translation is expected, fetching arbitrary remote resources is an additional behavior not conveyed in the manifest description.
The manifest describes a skill for translating English EPUB files, but the documentation says it also accepts Markdown/TXT, JSON-structured data, direct chat context, and URLs/repository addresses. That expands the skill from an EPUB translator into a more general content-ingestion and remote-fetch translation tool, which does not match the stated manifest scope.
The skill is designed to send book content to third-party OpenAI-compatible endpoints for translation, which is an external transmission of potentially sensitive user-supplied material. Even though the document says network access requires explicit user consent, the core workflow still involves bulk content exfiltration to external services once enabled, creating confidentiality and data-handling risk.
- `base_url`:服务根地址(**不含 `/chat/completions`**)。脚本会自动剥掉末尾的 `/chat/completions` 与多余斜杠。例:
- DeepSeek 官方:`https://api.deepseek.com`
- OpenCode 网关:`https://opencode.ai/zen/go/v1`
- OpenAI 官方:`https://api.openai.com/v1`
- 通义千问兼容模式:`https://dashscope.aliyuncs.com/compatible-mode/v1`
- 智谱:`https://open.bigmodel.cn/api/paas/v4`
- `extra_body`:附加请求体。DeepSeek 关闭推理:`{"thinking": {"type": "disabled"}}`,其它模型一般留空 `{}`。
The system prompt explicitly requires translating content into Simplified Chinese and outputting only that form, with no opt-in or alternative locale choice. This is a natural-language locale policy constraint that applies broadly across the skill rather than being presented as a user-selectable preference.
The system prompt explicitly instructs the skill to translate into Simplified Chinese and to output only that translation. This imposes a fixed language/locale behavior without offering the user a choice or documenting an opt-in, which matches the policy-violation category for language constraints.
The file description and default system prompt hard-code an English-to-Chinese translation workflow, and the prompt instructs the model to output only Chinese. This is a natural-language locale constraint without any user opt-in or explanation that the skill is intentionally region- or language-specific.
The script extracts text from user-provided EPUB files and sends that content to a remote LLM API via chat.completions.create, but it does not provide any explicit user-facing warning, consent gate, or data-handling notice in the CLI flow. EPUBs can contain proprietary, personal, or otherwise sensitive material, so silent transmission to a third-party service creates a real confidentiality and compliance risk.
The default prompt explicitly defines the assistant as an English-to-Chinese translator and instructs it to output only the translation. This enforces a specific language policy in natural language rather than offering the user a choice.
The safety declaration states the skill will not auto-install dependencies and should stop when dependencies are missing. Elsewhere, the workflow says EPUB extraction may use 'unzip / Python zipfile', implying reliance on external tools, but does not reconcile whether invoking such host tools is allowed under the stated failure-only posture.
The file is dedicated to translated-zh styling and includes Chinese-language comments and Chinese-specific font choices, which suggests the skill may enforce a Chinese locale or translation variant. Under the policy rule, locale-specific behavior should either offer user choice or be clearly documented as justified; this file alone provides no such indication.
No suspicious patterns detected.