T09 · Insecure Skill Coding Practices
- Location
scripts/image_create.py:530- Finding
API credentials and article content can be transmitted over plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its WeChat article image-generation purpose, but it needs review because it can send article prompts and an API key to a configurable endpoint without enforcing HTTPS.
Install only in a dedicated article workspace, use a restricted image-model API key, and configure only trusted HTTPS image endpoints. Avoid using account-wide master keys, and review any prior-draft or product-image directories the skill can read.
scripts/image_create.py:530API credentials and article content can be transmitted over plaintext HTTP
scripts/image_create.py:56Image-download SSRF filtering is bypassable through redirects or DNS rebinding
There is a clear description-behavior mismatch. The declared purpose promises AI-generated cover and illustration creation for公众号 articles, including automatic style matching and multiple design options. The supplied code only manages local filesystem content: it ensures an imgs/ directory exists, enumerates uploaded image files, selects or defaults a single cover image, and writes a markdown template for human completion. This is an image-organization/preparation helper, not an AI image synthesis or illustration generation tool. No model calls, prompt construction, image generation APIs, or article-content-based style selection appear in the code.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
if not isinstance(meta, dict):
meta = {}
prompt = parts[2].strip()
return prompt, meta
return text.strip(), {}
The skill explicitly describes capabilities to read and write repository files and send prompts plus an API key to a user-configured external endpoint, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an avoidable trust gap: an agent/runtime may permit broader filesystem or network access than users expect, increasing the chance of unintended data exposure or unsafe execution in a prompt-driven workflow.
The trigger phrases are very broad everyday terms like '封面', '配图', and '生成图片', which can cause the skill to activate in contexts where the user did not intend to invoke this specific workflow. In a skill that reads local article files, writes outputs, and sends prompt content to an external image endpoint, overbroad routing can lead to accidental data processing or external disclosure of article content.
The instruction states that any text appearing in images must be Chinese, which forces a specific language choice. The file does not indicate that the user can opt into another language or that the restriction is a documented region-specific requirement, so this is a natural-language locale policy violation.
The README presents all instructional content in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern.
The instruction "画面中不出现任何文字、字母或数字" is a natural-language constraint embedded in the file and is written in a specific language without any opt-in or explanation. Under the policy rule, forcing a language/locale-specific instruction without user choice can be a policy concern when no justification or alternative is provided.
Line L6 contains a Chinese-only instruction, which imposes a specific language/locale constraint in the skill content without any opt-in or alternative. This matches the policy category for language or locale restrictions expressed in natural language.
Line L6 contains a Chinese-only instruction about the generated image content, indicating a language/locale-specific requirement embedded in the skill text. There is no accompanying user choice or justification that this skill is intentionally region- or language-specific, so it may violate the language/locale policy.
Line L6 contains a natural-language instruction written only in Chinese, while the rest of the file is in English. This creates an implicit language constraint without offering the user a language or locale choice, which matches the policy category for forced language/locale behavior.
Line L6 contains a Chinese-only instruction requiring that no text, letters, or numbers appear in the image. This introduces a language-specific directive in the skill content without any opt-in, alternative locale, or documented justification for using Chinese.
Line L6 is written in Chinese and imposes a language-specific instruction for the generated content. Under the policy, forcing a specific language or locale without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.
Line L6 contains a Chinese-only instruction and the file provides no indication that the locale is optional, user-selected, or justified by a region-specific purpose. This creates a natural-language locale constraint without opt-in, which matches the language policy violation category.
The instructions require cover titles of 4–7 Chinese characters and provide only Chinese copy examples such as 「规矩一次填清楚」 and 「周报太淡了」. This imposes a specific language/locale on outputs without user opt-in or a stated region-specific justification, which matches the language-policy violation criterion.
The entire skill description is written in Chinese and does not mention any user opt-in, language selection, or region-specific constraint. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.
The content repeatedly specifies that the generated text must be in Chinese, including '每格两行极简中文' and layout requirements for the title text. This is a natural-language locale restriction, and the file does not indicate user opt-in or a documented region-specific reason for forcing Chinese output.
The entire skill specification is written only in Chinese and defines output conventions such as '默认不加字', with no indication that users may choose another language or locale. Under the policy, a skill that imposes a specific language without opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.
The entire skill specification is written as a Chinese-only template and includes mandatory textual requirements like '必须有' for the copy, but it does not offer any language or locale choice to the user. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.
The instruction says the annotation text 'must' be in Chinese, which imposes a fixed language requirement in natural-language content. This is a locale/language policy concern because the file does not provide any opt-in, fallback, or justification for restricting output to Chinese.
This markdown file presents all instructions in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-language audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.
The document explicitly instructs enumerating prior drafts/ directories and running a shell pipeline to read article.yaml metadata from other workspaces. Even though the goal is style consistency, this expands the skill from local image-prompt derivation into cross-directory inspection, which can expose unrelated draft content or metadata and normalizes shell-based file access beyond the minimum required scope.
Lines L005-L009 require that all text appearing in images must be Chinese, and explicitly discourage alternatives such as English. This is a natural-language locale policy constraint that forces a specific language without presenting user choice or stating a region-specific compliance reason.
Line L049 states that all image text must be in Chinese and instructs authors to write the exact Chinese wording in the prompt. This enforces a single language policy without opt-in and is not framed as a clearly justified regional constraint.
The entire skill specification is written as a prescriptive template in Chinese and does not offer any user language or locale choice. Under the stated policy, forcing a specific language or locale without opt-in is a natural-language policy concern unless the regional constraint is explicitly documented and justified, which is not present here.
Line L17 states that x-axis labels must be in Chinese, which is a natural-language locale constraint. Because the file does not provide user opt-in or explain that this template is intentionally limited to a Chinese-language context, it violates the language/locale policy criteria.