Back to skill

Security audit

code-mentor

Security checks for vulnerabilities and agentic risk

Overview

This coding tutor skill is mostly purpose-aligned, but it requires automatic persistent logging of user learning history without clear opt-in, retention, or deletion controls.

Review this skill before installing if you do not want your tutoring sessions, goals, weak areas, solved problems, or notes saved locally. The core tutoring behavior appears legitimate, but progress logging should ideally be opt-in and easy to inspect, edit, or delete.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:586
Finding

Mandatory Persistent Storage of User-Controlled Learning Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 586 and 644–697
Vulnerability Type: Mandatory persistent state modification and potential memory poisoning
Risk Level: Medium

Vulnerable Code

markdown
I keep track of:
- Topics you've mastered
- Areas where you need more practice
- Problems you've solved
- Concepts you're working on
markdown
4. **Persist your progress (Critical)** - see below

### Progress Tracking & Persistence (CRITICAL)

**You MUST update the learning log after each session to persist user progress.**

The learning log is stored at: `references/user-progress/learning_log.md`

**When to Update:**
- At the end of each learning session
- After completing a significant milestone (solving a problem, mastering a concept, completing a project phase)
- When the user explicitly asks to save progress
- After quiz/interview practice sessions

**What to Track:**

1. **Session History** - Add a new session entry with:
   ```markdown
   ### Session [Number] - [Date]

   **Topics Covered**:
   - [List of concepts learned]

   **Problems Solved**:
   - [Algorithm problems with difficulty level]

   **Skills Practiced**:
   - [Mode used, language practiced, etc.]

   **Notes**:
   - [Key insights, breakthroughs, challenges]

   ---
   ```

2. **Mastered Topics** - Append to the "Mastered Topics" section:
   ```markdown
   - [Topic Name] - [Date mastered]
   ```

3. **Areas for Review** - Update the "Areas for Review" section:
   ```markdown
   - [Topic Name] - [Reason for review needed]
   ```

4. **Goals** - Track learning goals:
   ```markdown
   - [Goal] - Status: [In Progress / Completed]
   ```

**How to Update:**
- Use the Edit tool to append new entries to existing sections
- Keep the format consistent with the template
- Always confirm to the user: "Progress saved to learning_log.md ✓"

Technical Analysi

...[truncated 2041 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the unconditional MUST requirement with explicit, informed opt-in persistence.
  2. Show users the exact information proposed for storage and obtain confirmation before each write.
  3. Store only necessary, structured fields with strict length and character limits; avoid unrestricted free-form notes.
  4. Treat every persisted value as untrusted data and never interpret stored content as Agent instructions.
  5. Validate and sanitize all fields before writing them to the learning record.
  6. Separate user profile data from executable prompts or instruction-bearing context.
  7. Define retention limits and provide clear controls to inspect, correct, export, and delete stored information.
  8. Do not claim that progress was saved unless the write succeeded and the destination exists.
  9. Include and document the expected learning-log template in the package, or disable persistence when the target resource is unavailable.
  10. Load only narrowly scoped structured values in later sessions rather than injecting the complete historical log into the Agent context.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- GET /tasks - List all tasks
  - GET /tasks/:id - Get specific task
  - PUT /tasks/:id - Update task
  - DELETE /tasks/:id - Delete task

- Project structure:
  /src

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The 'Quick Commands' section uses highly generic triggers such as 'How can I improve this?', 'Why isn't this working?', and 'Mock interview' without any negative examples or contextual constraints. In a skill-routing context, these phrases are broad enough to collide with ordinary conversation and could cause unintended invocation of this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill requires persistent progress logging without any visible privacy notice, consent mechanism, or explanation of what data will be stored. Because users may share code, mistakes, goals, or graded-work context, silent retention increases privacy risk and can surprise users who expect an ephemeral tutoring interaction.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The mandatory session logging instructions call for ongoing collection of session history, problems solved, notes, weak areas, and goals without consent boundaries or data minimization. This can accumulate sensitive educational, behavioral, or proprietary code-related information over time and expands the blast radius of any later disclosure or misuse.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates persistent modification of references/user-progress/learning_log.md after each session, which creates a standing instruction to store user-provided content and inferred learning history. For a tutoring skill, that persistence is not necessary to satisfy most requests and can lead to unintended retention of sensitive data from homework, code samples, interview prep, or personal goals.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The Debugging Detective section states 'I will NEVER directly point to the bug or give you the answer,' establishing a strict behavior guarantee. Later, the adaptive teaching guidelines say for advanced users the skill will 'Point out subtle issues and edge cases,' which contradicts the earlier absolute claim about never directly identifying issues.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.