Back to skill

Security audit

jingbo

Security checks for vulnerabilities and agentic risk

Overview

This Rain Classroom skill is mostly purpose-aligned, but its setup flow handles secrets, changes MCP configuration, and includes hidden authenticated install reporting plus an unsafe shell command path.

Review before installing. Do not paste your Rain Classroom secret into chat or logs, avoid running the setup scripts with elevated privileges, and prefer manual MCP configuration if possible. The hidden install report and setup.js command-injection issue should be fixed before broad deployment.

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

T09 · Insecure Skill Coding Practices

Error
Location
setup.js:31
Finding

Shell Command Injection Through YUKETANG_SECRET

Content
View full analysis
Remediation
View remediation

other

Note
Location
setup.sh:100
Finding

Undisclosed Authenticated Installation Telemetry

Content
View full analysis
/dev/null 2>&1; then npx mcporter@0.8.1 call yuketang-mcp claw_report \ --args "{\"payload\":{\"durationMs\":${DURATION}},\"action\":\"install\"}" \ >/dev/null 2>&1 || true fi ``` ### Technical Analysis After setup, the shell installer invokes the remote `claw_report` MCP tool and submits an `install` action together with the installation duration. The request is made through the authenticated MCP configuration, so the event may be associated with the account represented by `YUKETANG_SECRET`. The user-facing installation documentation describes registration and verification but does not disclose this additional telemetry call. Both standard output and standard error are redirected to `/dev/null`, and failures are ignored with `|| true`, making the transmission invisible during normal installation. Although the transmitted payload shown in the reviewed code is limited to the action and duration, sending authenticated telemetry without disclosure or consent creates an unexpected privacy and transparency risk. ### Attack Path 1. The user sets `YUKETANG_SECRET` and runs: ```bash bash setup.sh ``` 2. The script registers the authenticated MCP service. 3. The script calculates the installation duration. 4. It invokes the remote `claw_report` tool with the `install` action and duration. 5. Output and errors are suppressed, so the user receives no indication that telemetry was attempted or transmitted. ### Impact Assessment The remote service receives an installation event and timing metadata through an authenticated connection. This can allow the service operator to associate Skill installation activity with a specific account or credential context. The revi ...[truncated 302 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
setup.js:34
Finding

Registry-Delivered Package Executed During Setup Without Integrity Verification

Content
View full analysis
/dev/null 2>&1; then echo "🧪 验证配置..." if npx mcporter@0.8.1 list 2>&1 | grep -q "yuketang-mcp"; then echo "✅ 验证通过" npx mcporter@0.8.1 list | grep -A 1 "yuketang-mcp" || true else echo "⚠️ 验证未通过,但配置可能已写入" echo " 你可以直接尝试使用,如果失败请检查 Secret 是否正确" fi fi # ── 4. 上报(静默) ── END=$(now_ms) DURATION=$((END - START)) if command -v npx >/dev/null 2>&1; then npx mcporter@0.8.1 call yuketang-mcp claw_report \ ``` Documented invocation in `SKILL.md`, lines 315–319: ```bash # Mac 或 Linux 示例:查看班级的作业发布情况 npx mcporter@0.8.1 call yuketang-mcp ykt_classroom_statistics --args '{"classroomName": "xxx"}' ``` ### Technical Analysis The installation scripts and operating instructions use `npx` to obtain and execute `mcporter@0.8.1`. Pinning an exact version limits ordinary version drift, but the project does not include a lockfile, vendored artifact, cryptographic checksum, signature verification, or other mechanism that establishes the integrity of the code retrieved from the package registry. The package executes in the user's local security context. During registration, it receives the authorization header containing `YUKETANG_SECRE ...[truncated 1726 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description frames the skill as a classroom-query assistant, but the content also instructs installation, environment-variable handling, MCP registration, and local configuration changes. This mismatch is dangerous because users may consent to a low-risk data-query skill while the agent performs higher-risk credential and system-configuration actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill uses sensitive capabilities centered on environment-variable secrets, but it does not declare an explicit tool scope such as permissions or allowed-tools. That makes the operational boundary unclear and increases the chance an agent will access or manipulate local credentials more broadly than users expect during installation or troubleshooting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs users to place a personal secret into an environment variable and normalizes direct credential handling, but it does not provide a clear warning about secret sensitivity, storage risks, or safe handling practices. This raises the likelihood of accidental exposure through shell history, logs, screenshots, or over-privileged agent access.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction that the agent should directly update a user-provided secret in environment variables on the user's behalf encourages the agent to handle and persist credentials locally. This is risky because it expands the agent's role from guidance to credential manipulation, increasing the chance of secret leakage, unintended persistence, or modification of the wrong execution environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
78% confidence
Finding

The skill references 'npx mcporter' without a pinned version at one location, which can cause execution of a newer or compromised package than intended. In a setup flow that handles secrets and MCP configuration, unpinned package resolution creates a supply-chain risk path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This reference file presents all user-facing guidance, prompts, and examples exclusively in Chinese. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a service for querying Rain Classroom account and class data. This setup script invokes npx mcporter through execSync, which runs external code/commands on the user's machine; that capability is not part of the described query functionality itself and is broader than a simple account/class query service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup script modifies local MCP configuration by running mcporter config add ... --scope project without an explicit up-front warning that it will write configuration and add an authenticated remote server. Even though this is likely intended setup behavior, silently changing client config can surprise users and create trust or persistence issues, especially because it also stores an Authorization header for a remote endpoint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The setup script invokes npx mcporter@0.8.1, which downloads and executes external npm package code during installation. That creates a supply-chain and arbitrary-code-execution risk outside the skill's stated classroom-query purpose, especially because the package is run multiple times and with access to the user's environment including the bearer token.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sends install telemetry to the remote MCP service silently via npx mcporter@0.8.1 call yuketang-mcp claw_report --args ..., without explicit consent. In this context, the danger is amplified because the report is sent through an authenticated MCP connection using the user's bearer token, establishing a pattern of undisclosed data transmission from a setup script.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Comments and console output throughout the script are written only in Chinese, including setup guidance and the suggested invocation phrase. This imposes a language choice on users without opt-in or justification, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest only describes account/class query features and does not mention credential bootstrap or local secret handling. Reading YUKETANG_SECRET may be operationally useful for setup, but it is a distinct capability outside the skill's stated end-user purpose.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script explicitly labels the section as silent reporting and performs a remote claw_report call without any user-facing prompt or meaningful disclosure. Even though the transmitted payload is limited to install timing and action metadata, undisclosed telemetry is still a trust and privacy issue, and the 'silent' comment makes the behavior more suspicious rather than less.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The final instruction tells the user to speak to the AI using a Chinese phrase, and the script consistently presents user-facing text only in Chinese. There is no indication that language choice is optional or that the skill is region-specific, which can conflict with language/locale policy expectations.

Content

No source excerpt is available for this finding.