Back to skill

Security audit

Master Teacher

Security checks for vulnerabilities and agentic risk

Overview

This teaching skill is mostly coherent, but it reads general user memory/profile files and persists course data without clear consent or tight scoping.

Review this skill before installing if your USER.md, MEMORY.md, or workspace may contain sensitive personal, project, or company information. Use it only for courses where persistent local course files are acceptable, and prefer a dedicated course directory with no secrets in prompts or student responses.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:60
Finding

Unnecessary Access to User Profile and Long-Term Memory Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:60-63
Vulnerability Type: Excessive access to potentially sensitive user context
Risk Level: Medium

Vulnerable Code Snippet

markdown
### Phase 1: Profile the Student

Check USER.md / MEMORY.md first. Only ask what is missing:
- Learning goal (what problem to solve)
- Learning style (fragmented / continuous / daily)

Technical Analysis

The Skill instructs the agent to read the general-purpose USER.md and MEMORY.md files before asking the user for course-specific information. Such files can contain personal information, preferences, prior conversation details, confidential project context, or other data unrelated to the requested teaching task.

This violates the principle of least privilege because the legitimate task requires only a learning goal and preferred learning schedule. The instruction does not limit access to specific fields, require explicit user consent, or prohibit unrelated memory content from being incorporated into generated lessons, reports, or progress records.

No code was found that transmits this information over a network. The identified risk is unnecessary local disclosure to the active Skill context and possible propagation into locally generated course artifacts.

Attack Path

  1. A user submits a request that activates the Master Teacher Skill.
  2. During Phase 1, the Skill directs the agent to inspect USER.md and MEMORY.md.
  3. The agent reads information beyond what is necessary to establish the user's learning goal and schedule.
  4. Unrelated sensitive information enters the active model context.
  5. That information may influence responses or be reproduced in lesson content, progress state, tracking files, or lesson reports.
  6. Anyone with access to those generated artifacts may consequently gain access to information that was not intentionally provided for the course.

Impact Assessment

The Ski ...[truncated 544 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the unconditional instruction to inspect USER.md and MEMORY.md.
  2. Ask the user directly for the two required items: their learning goal and preferred learning schedule.
  3. If stored preferences are supported, require explicit consent before accessing them.
  4. Restrict access to a dedicated, structured set of course-preference fields rather than reading general-purpose memory files.
  5. Add an instruction prohibiting the use or reproduction of unrelated memory content in lessons, progress records, reports, and research notes.
  6. Apply data minimization and retention controls so that only information necessary to resume the course is stored.
  7. Clearly disclose which profile fields will be read, why they are needed, and where derived information will be saved.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The advertised behavior is a conversational teaching skill, but the instructions operationalize it as a filesystem-heavy workflow that scaffolds projects, persists state, and generates large amounts of content and media. This description-behavior gap is security-relevant because users or orchestrators may activate the skill expecting tutoring, while it actually performs tool-driven side effects and long-running autonomous content generation that were not transparently disclosed.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

Claude Code

bash
# Option 1: Clone to personal skills
git clone https://github.com/jacky-wzj/master-teacher.git ~/.claude/skills/master-teacher

# Option 2: Clone to project skills

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 26)May include surrounding context.

Option 1: Clone to personal skills

git clone https://github.com/jacky-wzj/master-teacher.git ~/.claude/skills/master-teacher

Option 2: Clone to project skills

git clone https://github.com/jacky-wzj/master-teacher.git .claude/skills/master-teacher

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
72% confidence
Finding

Direct invocation combined with the skill's persistent progress-tracking design increases the chance that users activate a stateful workflow without realizing it will retain artifacts across sessions. In this teaching-skill context, persistence is functional rather than overtly malicious, but it still creates privacy and data-retention risk if activation does not surface that behavior clearly.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

md
- "教我 X"
- "teach me about X"
- "我要系统学习 X"
- "create a course on X"

Or invoke directly: `/master-teacher`

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The statement "The skill triggers when the user asks to systematically learn a topic" is ambiguous because it does not define specific trigger phrases, scope limits, or non-trigger examples. This could cause unintended invocation for a wide range of ordinary learning-related requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README states that course materials and progress are persistently written into the workspace, but it does not clearly warn users that conversation-derived content may be stored on disk. In an agent environment, this can lead to unanticipated retention of sensitive user data, proprietary topics, or internal project information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to create course directories and repeatedly write files such as README.md, notes, lesson content, media artifacts, and progress state, yet it declares no explicit tool scope or permissions. That mismatch weakens containment: an agent/runtime may permit broader filesystem actions than users expect, increasing the chance of unintended writes, workspace pollution, or writes to attacker-influenced paths if directory names are not constrained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill mixes core instructional requirements in Chinese, including the stated lesson-depth goal and directory/content descriptions, which implies the teaching workflow is expected to be authored in Chinese. Because the file does not offer a user language choice or document a justified locale restriction, this 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
91% confidence
Finding

The delivery rules specify that the student can say Chinese phrases such as "继续", "详细讲 X", and "没听懂" to control the lesson flow. This constrains interaction to a specific language without offering alternatives or stating that language selection is user-driven.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

The rule 'too easy → skip verification, advance' authorizes the agent to make an unverified progression decision that affects persisted course state and downstream behavior. In this skill, verification gates completion and progress tracking, so bypassing it on a subjective cue can corrupt state, reduce oversight, and let the agent record mastery without evidence, which is a form of unsafe autonomous decision-making.

Content

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

md
| Situation | Action |
|-----------|--------|
| "too easy" | Skip verification, advance |
| "don't understand" | Re-explain from different angle |
| Goes off-topic | Acknowledge briefly, redirect |
| Returns after break | Run `scripts/resume.py`, follow Phase 5 |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persists last_student_response directly into course progress state, which is then used to rebuild human-readable tracking files. Student responses can contain sensitive personal data, secrets, or copyrighted material, and the code provides no consent prompt, minimization, retention control, or redaction before storage. In an educational skill that encourages iterative free-text responses across sessions, silent persistence materially increases privacy risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.