Back to skill

Security audit

幼儿园英语课程体系

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but its generated HTML can include unescaped child-name input despite claiming HTML escaping, so users should review it before installing.

Install only if you trust local worksheet generation and avoid putting untrusted or markup-like text into the child-name field until the publisher fixes HTML escaping. The skill does not appear to upload data or install dependencies, but generated HTML should be treated like any local file that can execute browser script if crafted input is embedded.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_worksheet.py:64
Finding

Unescaped User Input Allows HTML and JavaScript Injection in Generated Worksheets

Content
View full analysis
{a["id"]}. {a["title"]}
' f'
{a["instruction"]}
{a["html"]}' ) body = f'
{cards}
' ans_block = "" if with_answers: li = "".join(f"
  • {a['id']}. {a['title']}:{a['answer']}
  • " for a in activities) ans_block = f'

    {T["answer_title"]}

      {li}
    ' n = len(activities) name_html = f'{name}' if name else '        ' ``` The untrusted command-line value reaches this function without sanitization: ```python html = render_html(args.name, level, activities, args.columns, not args.no_answers, lang, args.score) ``` ### Technical Analysis The `--name` command-line argument is user-controlled. Its value is passed as `args.name` to `render_html()` and interpolated directly into an HTML element without contextual output encoding. Because characters such as `<`, `>`, `"`, `'`, and `&` are not escaped, the name can terminate the intended text context and introduce arbitrary HTML elements or event-handler attributes. For example, a supplied value such as: ```html ``` would be written as active markup into the generated worksheet rather than displayed as literal text. The payload executes when the generated HTM ...[truncated 1378 chars]
    Remediation
    View remediation
    {safe_name}' if safe_name else '        ' ) ``` Additional hardening measures: 1. Treat every future user-controlled field as untrusted and encode it according to its output context. 2. Avoid inserting user input into script, style, attribute, or URL contexts. 3. Add regression tests covering `<`, `>`, `&`, single quotes, double quotes, closing tags, and event-handler payloads. 4. Verify that a value such as `` appears as visible text and does not create an HTML element. 5. Consider adding a restrictive Content Security Policy to generated HTML as defense in depth, while retaining proper output encoding as the primary fix. 6. Update `SKILL.md` only after the implementation actually enforces the documented HTML-escaping guarantee. ]]>
    Vulnerability Patterns
    • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
    • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
    • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
    • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    Findings (22)

    Undeclared Tool Scope

    Medium
    Category
    MCP Least Privilege
    Confidence
    93% confidence
    Finding

    The skill instructs the agent to read and write local files and execute a worksheet-generation script, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an authorization gap where a hosting agent may grant broader filesystem capabilities than users expect, increasing the risk of unintended local file access or file creation if the skill is triggered or modified.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The natural-language policy requires flagging language or locale constraints that force a specific language without user opt-in. Line L202 states the interface and instructions are fully in Chinese, and this is presented as a fixed behavior rather than an optional or region-specific mode.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    The entire skill content is written in Chinese and provides parent guidance scripts only in that language, with no indication that users can choose another language or that the skill is intentionally limited to Chinese-speaking users. This can violate language/locale policy when a skill imposes a specific language without user opt-in.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The module docstring is written in Chinese and the skill title later is hard-coded as Chinese, indicating a fixed-language user experience. The file does not document that this is a region-specific skill or offer user choice of locale, which matches the policy concern for forced language without opt-in.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    91% confidence
    Finding

    The returned title is always set to "补全单词" regardless of the lang parameter. Because the function otherwise accepts a language argument, this hard-coded string suggests the skill does not fully honor locale choice and may force Chinese output.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    91% confidence
    Finding

    This code embeds Chinese natural-language strings for the title and module description, and it indexes localized instructions by lang without any visible indication that users can choose or opt into the locale. Under the policy, forcing a specific language without user choice or a documented region-specific justification is a natural-language policy violation.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The module docstring presents the skill description only in Chinese, which can impose a language-specific experience without any visible user opt-in. Under the policy rule for language/locale constraints, this is a natural-language policy concern unless the restriction is explicitly justified or optional.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    97% confidence
    Finding

    The generated prompt shown to users is fixed in Chinese: it instructs the user to identify pictures by initial sound, but does not indicate that Chinese is an optional or context-specific language. This can violate language/locale policy when the skill otherwise accepts a language parameter and does not clearly constrain usage to Chinese-speaking users.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    98% confidence
    Finding

    The answer string returned to users is always in Chinese, even though the generator receives a lang argument, indicating an expectation of localization support. Forcing Chinese output without user choice or documented justification is a language-policy issue.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    94% confidence
    Finding

    Although the generator accepts a lang parameter and localizes instructions via C.INSTR, the title is hard-coded as "自然拼读 CVC". This creates an inconsistent locale experience and can violate language-choice policy by forcing Chinese output without opt-in.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    90% confidence
    Finding

    The module docstring and title are hard-coded in Chinese ("简单句型"), and the generated content structure appears tailored to Chinese-language exercise text. This suggests a fixed language/locale experience without any visible opt-in or justification in this file, which can violate language-choice policy for general-purpose skills.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    The module docstring is written entirely in Chinese and the generated title and answer strings are also hardcoded in Chinese, indicating a fixed language/locale behavior. There is no visible user choice or justification that this skill is intentionally region-specific, which can violate language/locale policy requirements.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The strings assigned to title and answer are hardcoded in Chinese, while only instr is selected via a language parameter. This mixed localization approach still forces Chinese output for key user-facing content and does not provide an opt-in or documented locale restriction.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    89% confidence
    Finding

    The module docstring is written entirely in Chinese and the generated title at L21 includes fixed Chinese text, indicating a language-specific user experience. The file does not show any explicit user opt-in or language-choice mechanism for these user-facing strings, which may violate a language/locale policy if the skill is expected to be locale-flexible.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The module docstring and title use Chinese text directly, which indicates the skill may force a specific language presentation. The file does not provide any user-facing opt-in or justification for this locale restriction, which matches the language/locale policy violation criteria.

    Content

    No source excerpt is available for this finding.

    Intent-Code Divergence

    Low
    Category
    Not specified by scanner
    Confidence
    97% confidence
    Finding

    L058 says users can simply ask for an English phonics worksheet or '生成一份数学诊断卷' ('generate a math diagnostic paper'). This directly conflicts with the manifest and the rest of the document, which define the skill as a kindergarten English course limited to alphabet, phonics, vocabulary, sentences, and dialogue.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    This markdown file contains user-facing instructions and fields only in Chinese, which can amount to a language policy violation when no user choice or opt-in is provided. The file does not indicate that the language is optional, selectable, or justified by a documented locale-specific purpose.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The specification states --lang defaults to zh, making Chinese the default instruction language. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless clearly justified as region-specific; no such justification appears here.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The file defines UI and instruction text only for "zh" and "en", and the module-level description is written in Chinese, indicating a fixed language policy built into the skill. There is no visible natural-language indication that users can choose other locales or opt into this restriction, which can violate language/locale policy requirements.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The natural-language description states Chinese is the default and suitable for Chinese families, and the CLI restricts language choices to only 'zh' or 'en'. This imposes a language/locale constraint rather than offering broader locale choice or documenting a policy justification beyond a narrow audience assumption.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    89% confidence
    Finding

    This code file contains user-facing natural-language content entirely in Chinese in the module docstring, and the runtime warning string is also fixed to Chinese. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    84% confidence
    Finding

    The module docstring is written only in Chinese, which indicates a fixed language presentation. The file also sets a Chinese title later, suggesting the skill may force a specific language rather than offering a user-selectable locale.

    Content

    No source excerpt is available for this finding.