Back to skill

Security audit

Edu Private Operations

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Chinese-language education marketing and operations assistant with disclosed, purpose-aligned behavior and no evidence of hidden access, persistence, or data exfiltration.

Installers should expect Chinese-language outputs and should consider removing or pinning the declared dependencies before deployment. Do not provide real parent or student sensitive data unless the hosting environment has appropriate privacy controls, even though this skill itself does not store or transmit it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/edu_tool.py:842
Finding

Unvalidated Zero Denominators Can Crash Data Analysis

Content
View full analysis

Vulnerability Details

File Location: scripts/edu_tool.py, lines 842-860
Vulnerability Type: Improper input validation resulting in division by zero
Risk Level: Low

Vulnerable Code:

python
# 转化建议
trials = data.get("trials", 0)
leads = data.get("leads", 1)
if trials / leads < 0.3:
    recommendations.append("📱 来访-体验转化率低,建议:1)优化首电话术 2)增加体验课频次 3)提供更多诱饵(测评报告等)")

# 社群建议
active = data.get("active", 0)
total = data.get("total", 1)
if active / total < 0.1:
    recommendations.append("💬 社群活跃度低,建议:1)固定每日内容时间 2)增加互动活动 3)培养核心KOL家长")

# 续费建议
renewals = data.get("renewals", 0)
students = data.get("total_students", 1)
if renewals / students < 0.8:
    recommendations.append("📈 续费率有提升空间,建议:1)提前1个月启动续费 2)增加增值服务 3)完善学情反馈")

Technical Analysis

_generate_recommendations() performs three divisions using values obtained directly from the caller-provided data dictionary. The default value of 1 only applies when a key is absent; it does not protect the operation when a caller explicitly supplies zero.

Consequently, any of the following values can trigger a ZeroDivisionError:

  • leads: 0
  • total: 0
  • total_students: 0

Other analysis methods in the same class guard some divisions with conditions such as if leads > 0, but this method applies no equivalent validation. Because analyze_data() invokes _generate_recommendations() as part of normal report generation, one invalid denominator aborts the entire operation.

Attack Path

  1. An attacker or ordinary user submits an analysis dataset containing a zero denominator, such as:
    json
    {
      "leads": 0,
      "trials": 0,
      "active": 0,
      "total": 0,
      "renewals": 0,
      "total_students": 0
    }
    
  2. The application passes the dataset to EduPrivateOperations.analyze_data().
  3. analyze_data() invokes _generate_recommendations(data).
  4. The expression `t ...[truncated 634 chars]
Remediation
View remediation

Remediation Suggestions

  1. Validate all numeric fields before analysis:
    • Require finite numeric values.
    • Reject negative counts and costs.
    • Define explicit behavior for empty datasets.
  2. Guard every denominator consistently:
    python
    trial_rate = trials / leads if leads > 0 else 0
    activity_rate = active / total if total > 0 else 0
    renewal_rate = renewals / students if students > 0 else 0
    
    if trial_rate < 0.3:
        ...
    if activity_rate < 0.1:
        ...
    if renewal_rate < 0.8:
        ...
    
  3. Prefer centralized validation at the beginning of analyze_data() so all downstream methods receive normalized values.
  4. Return a structured validation error when a denominator is invalid rather than allowing a runtime exception to propagate.
  5. Add unit tests covering absent, zero, negative, nonnumeric, and extremely large input values.

T08 · Insecure Dependencies

Note
Location
metadata.yaml:79
Finding

Unpinned and Unnecessary Third-Party Dependencies Increase Supply-Chain Exposure

Content
View full analysis

Vulnerability Details

File Location: metadata.yaml, lines 79-83
Vulnerability Type: Unconstrained and unused third-party dependencies
Risk Level: Low

Vulnerable Configuration:

yaml
requirements:
  python: ">=3.8"
  dependencies:
    - "pyyaml"
    - "pandas"

Technical Analysis

The metadata declares pyyaml and pandas without version constraints, integrity hashes, or a lock file. The audited implementation in scripts/edu_tool.py imports only Python standard-library modules and does not import either declared package.

A package installer that processes this metadata may therefore download mutable latest versions of third-party packages that are unnecessary for the Skill's current functionality. Unconstrained resolution makes installations non-reproducible and increases exposure to compromised releases, malicious transitive dependencies, or future incompatible versions.

No evidence was found that the declared package names are typosquatted or currently malicious. The risk arises from avoidable and uncontrolled supply-chain exposure rather than from a confirmed malicious dependency.

Attack Path

  1. A user or platform installs the Skill and processes metadata.yaml.
  2. The installer resolves pyyaml and pandas from its configured package index without fixed versions or hashes.
  3. The installer retrieves whichever releases and transitive dependencies are current at installation time.
  4. If a resolved distribution or dependency has been compromised, its installation or later import behavior may execute attacker-controlled code within the installer's or application's privilege context.
  5. This exposure occurs even though the current Skill implementation does not require these packages.

Impact Assessment

The configuration alone does not directly grant privileges or execute a malicious payload. In a compromised-package scenario, impact would depend on the account per ...[truncated 290 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove pyyaml and pandas from metadata.yaml because the audited implementation does not use them:
    yaml
    requirements:
      python: ">=3.8"
      dependencies: []
    
  2. If future functionality genuinely requires third-party packages:
    • Pin exact reviewed versions.
    • Record cryptographic hashes.
    • Use a lock file generated from a trusted package index.
    • Review transitive dependencies and package provenance.
    • Apply automated vulnerability scanning during release builds.
  3. Run installation and build steps with least privilege in an isolated environment.
  4. Keep declared dependencies synchronized with actual imports to prevent unnecessary packages from entering production environments.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill specification, inputs, and outputs are written only in Chinese, which effectively constrains the interaction language to Chinese. The file does not state that language choice is optional or user-selected, nor does it justify a Chinese-only scope as a region-specific compliance requirement.

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 title, docstrings, and user-facing text are entirely in Chinese, indicating the skill is designed to operate in a single language without offering any language or locale choice. The policy explicitly flags language or locale constraints when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This README presents all user-facing instructions and examples exclusively in Chinese, which can constitute a language/locale policy issue when no opt-in or alternative language is offered. The file does not explain that the skill is restricted to a Chinese-speaking or region-specific audience, so the language constraint appears implicit rather than explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This YAML file contains natural-language labels, templates, and comments exclusively in Chinese, including user-facing script templates. Under the policy rule, forcing a specific language without user opt-in can be a locale/language policy concern when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This manifest presents the skill title and descriptive metadata entirely in Chinese, and the comments indicate it is intended for a specific platform listing. Under the policy rule, a locale or language constraint should be explicitly documented and justified or offered as an opt-in; here no such choice or justification is stated in the file.

Content

No source excerpt is available for this finding.