Back to skill

Security audit

幼教百宝箱-AI幼师全流程助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent preschool document generator, but it handles child-related content with under-scoped external API and HTML/file-output behavior that users should review carefully.

Install only if you are comfortable reviewing how it is invoked. Prefer the offline template mode for real student or family information, remove names and identifying details before using LLM mode, use only trusted provider endpoints with provider-specific keys, and write reports to a dedicated output folder. Treat generated HTML as untrusted if any input came from users or an external model.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/preschool_teacher.py:667
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis

{result}

' if isinstance(result, list): items = "\n".join([f"
  • {_fmt_val(item)}
  • " for item in result]) return f'
      {items}
    ' if isinstance(result, dict): if "llm_generated" in result: return f'
    text
    {result["llm_generated"]}
    ' if "error" in result: return f'

    ❌ {result["error"]}

    ' html = "" for key, val in result.items(): if isinstance(val, dict): html += f'

    📌 {key}

    ' for sub_key, sub_val in val.items(): html += f'

    {sub_key}

    ' html += _build_content_html(sub_val) html += '
    ' elif isinstance(val, list): html += f'

    📌 {key}

    ' html += _build_content_html(val) html += '
    ' else: html += f'

    📌 {key}

    {_fmt_val(val)}

    ' return html return f'

    {str(result)}

    ' def _fmt_val(val): """格式化值""" if isinstance(val, list): return "
    ".join([f"• {v}" for v in val]) return str(val).replace("\n", "
    ") ``` ### Technical Analysis The report renderer inserts dynamic values directly into HTML without contextual output encoding or sanitization. These values can originat ...[truncated 1944 chars]
    Remediation
    View remediation

    T09 · Insecure Skill Coding Practices

    Error
    Location
    scripts/preschool_teacher.py:483
    Finding

    API Credentials Can Be Forwarded to an Arbitrary Endpoint

    Content
    View full analysis
    Remediation
    View remediation

    T09 · Insecure Skill Coding Practices

    Warning
    Location
    scripts/preschool_teacher.py:816
    Finding

    Arbitrary File Overwrite Through the Output Path

    Content
    View full analysis
    Remediation
    View remediation
    Vulnerability Patterns
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
    • 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
    Findings (16)

    Missing User Warnings

    High
    Category
    Not specified by scanner
    Confidence
    97% confidence
    Finding

    The skill supports sending prompts to external LLM APIs for content generation, but the documentation does not warn that users may input sensitive child-related information such as names, behavioral observations, evaluations, or family communications. In an education context, this can expose minors' personal or developmental data to third-party providers without informed consent or minimization.

    Content

    No source excerpt is available for this finding.

    External Model or Provider Selection

    High
    Category
    Excessive Agency
    Confidence
    95% confidence
    Finding

    The skill not only mentions external transmission but actively instructs users how to select an external provider and model for generation. In this context, provider selection is security-relevant because it operationalizes sending potentially sensitive children's data to third parties without any accompanying data-handling guardrails, retention notice, or suitability constraints.

    Content

    Scanner excerpt · SKILL.md (reported line 244)May include surrounding context.

    DeepSeek(国内推荐,性价比高)

    text
    --api-key sk-xxx --api-base https://api.deepseek.com/v1 --model deepseek-chat
    

    阿里云 DashScope

    External Model or Provider Selection

    High
    Category
    Excessive Agency
    Confidence
    95% confidence
    Finding

    The OpenAI model-selection instructions make remote processing easy for users handling preschool lesson notes, child observations, and family communications. Because those workflows can contain regulated or highly sensitive minor data, the absence of safeguards around provider choice materially increases privacy and compliance risk.

    Content

    Scanner excerpt · SKILL.md (reported line 254)May include surrounding context.

    OpenAI

    text
    --api-key sk-xxx --api-base https://api.openai.com/v1 --model gpt-4o-mini
    

    不提供 --api-key 时,默认使用内置模板引擎,质量同样专业可用。

    Undeclared Tool Scope

    Medium
    Category
    MCP Least Privilege
    Confidence
    82% confidence
    Finding

    The skill advertises or implies file-writing capability via an output path and HTML report generation, but it does not declare any explicit tool scope such as permissions or allowed-tools. Missing scope boundaries can let an agent invoke the skill with broader filesystem access than users expect, increasing the risk of unintended file creation or overwrite.

    Content

    No source excerpt is available for this finding.

    Vague Triggers

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The trigger list contains many broad, common educational and parenting terms, making accidental invocation likely during unrelated conversations. Unintended activation matters more here because the skill can generate files and optionally send child-related text to external model providers.

    Content

    No source excerpt is available for this finding.

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    93% confidence
    Finding

    This example explicitly routes user content to an external provider endpoint. In this skill's context, prompts may contain sensitive data about children, parents, and classroom observations, so external transmission creates confidentiality and compliance risk even if the feature is intentional.

    Content

    Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

    md
    python ~/.workbuddy/skills/preschool-teacher-assistant/scripts/preschool_teacher.py \
      --mode lesson_plan --domain 语言 --age 中班 --query "春天的色彩" \
      --api-key YOUR_DEEPSEEK_KEY \
      --api-base https://api.deepseek.com/v1 \
      --model deepseek-chat
    
    # 使用 DashScope(阿里云)
    

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    88% confidence
    Finding

    The documented default API base points to an external provider, which normalizes remote transmission as a standard configuration option. Because the skill processes child education records and family communications, this default can lead users to share sensitive content externally without appreciating the privacy implications.

    Content

    Scanner excerpt · SKILL.md (reported line 161)May include surrounding context.

    md
    | `--sub` | ❌ | 通知 | 沟通子类型:通知/评语/发言稿(仅communication) |
    | `--plan_type` / `-p` | ❌ | 周计划 | 计划类型:学期计划/月计划/周计划/日计划(仅plan) |
    | `--api-key` | ❌ | - | LLM API Key(不提供则使用内置模板) |
    | `--api-base` | ❌ | https://api.openai.com/v1 | API Base URL |
    | `--model` | ❌ | gpt-4o-mini | 模型名称 |
    | `--output` / `-o` | ❌ | 自动生成 | 输出文件路径 |
    | `--json` | ❌ | False | 输出JSON格式到stdout |
    

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    92% confidence
    Finding

    The skill provides a concrete external endpoint and configuration for DeepSeek, which facilitates sending potentially sensitive classroom or child data off-platform. The danger is elevated by the domain: preschool observations, evaluations, and parent communications often contain personal information about minors.

    Content

    Scanner excerpt · SKILL.md (reported line 244)May include surrounding context.

    DeepSeek(国内推荐,性价比高)

    text
    --api-key sk-xxx --api-base https://api.deepseek.com/v1 --model deepseek-chat
    

    阿里云 DashScope

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    92% confidence
    Finding

    The OpenAI endpoint example similarly enables third-party transmission of content that may include minors' personal or behavioral data. The feature is not malicious, but without clear safeguards it can cause unintended disclosure and regulatory issues in school or childcare settings.

    Content

    Scanner excerpt · SKILL.md (reported line 254)May include surrounding context.

    OpenAI

    text
    --api-key sk-xxx --api-base https://api.openai.com/v1 --model gpt-4o-mini
    

    不提供 --api-key 时,默认使用内置模板引擎,质量同样专业可用。

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    90% confidence
    Finding

    The natural-language instructions, examples, prompts, and generated content are consistently written for Chinese output and usage, with no option for user language selection or opt-in. Under the policy, forcing a specific language/locale without offering a choice is a reportable natural-language policy violation.

    Content

    No source excerpt is available for this finding.

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    60% confidence
    Finding

    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

    Content

    Scanner excerpt · scripts/preschool_teacher.py (reported line 39)May include surrounding context.

    python
    python preschool_teacher.py --mode report --query "春天主题:我需要教案+观察记录+家长通知+环创方案"
    
      # LLM增强模式
      python preschool_teacher.py --mode lesson_plan --query "数学:认识数字1-5" --api-key sk-xxx --api-base https://api.deepseek.com/v1
    """
    
    import argparse
    

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    95% confidence
    Finding

    This function performs actual outbound transmission of user content to a configurable external LLM endpoint. In the preschool-teacher context, generated prompts can include sensitive information about children, families, and classroom observations, so external transmission materially increases privacy and data-governance risk.

    Content

    Scanner excerpt · scripts/preschool_teacher.py (reported line 484)May include surrounding context.

    python
    def _llm_generate(template_type, **kwargs):
        """使用 LLM API 增强内容生成"""
        api_key = kwargs.pop("api_key")
        api_base = kwargs.pop("api_base", "https://api.openai.com/v1")
        model = kwargs.pop("model", "gpt-4o-mini")
    
        try:
    

    Missing User Warnings

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    When LLM mode is enabled, user-supplied query content and contextual data are sent to a third-party API without any explicit runtime notice, consent flow, or redaction. In this skill’s context, prompts may contain children’s names, observations, parent communications, or other sensitive educational data, creating a real privacy and compliance risk.

    Content

    No source excerpt is available for this finding.

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    60% confidence
    Finding

    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

    Content

    Scanner excerpt · scripts/preschool_teacher.py (reported line 759)May include surrounding context.

    python
    parser.add_argument("--plan_type", "-p", choices=["学期计划", "月计划", "周计划", "日计划"], default="周计划",
                            help="计划类型(仅 plan 模式)")
        parser.add_argument("--api-key", help="LLM API Key(可选,用于LLM增强生成)")
        parser.add_argument("--api-base", default="https://api.openai.com/v1", help="LLM API Base URL")
        parser.add_argument("--model", default="gpt-4o-mini", help="LLM 模型名称")
        parser.add_argument("--output", "-o", help="输出HTML文件路径(默认自动生成)")
        parser.add_argument("--json", action="store_true", help="输出JSON格式到stdout")
    

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The document declares lang="zh-CN", and all visible UI text is presented only in Chinese. This creates a language/locale constraint with no opt-in, fallback, or explanation that the skill is intentionally region-specific, which matches the policy-violation category for language restrictions.

    Content

    No source excerpt is available for this finding.

    Description-Behavior Mismatch

    Low
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The manifest description says a single input can automatically generate lesson plans, observation records, parent communication, activity design, teaching plans, environment design, reflections, and stories, implying substantive document generation. In code, generate_report only emits a lightweight metadata-style wrapper listing included modules and advising the user to run other modes separately, so the advertised one-stop generation behavior is not actually implemented.

    Content

    No source excerpt is available for this finding.