Back to skill

Security audit

Meta-Cognition Coach

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent learning coach, but it saves user-entered study details to local plaintext log files without documenting that behavior up front.

Review this skill before installing if students may enter personal learning struggles, assignments, or study habits. Its coaching behavior appears aligned with its purpose, but users should know that reflect and strategy sessions are saved locally in plaintext and may accumulate until manually removed.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:76
Finding

Undisclosed Plaintext Persistence of User-Provided Learning Data

Content
View full analysis

Vulnerability Details

File Location: scripts/main.py:76-86 and scripts/main.py:118-128
Vulnerability Type: Plaintext storage of potentially sensitive user data
Risk Level: Medium

Vulnerable Code

python
# Save reflection
data = {
    "type": "reflection",
    "task": task,
    "approach": approach,
    "prompts": prompts[:4],
    "timestamp": datetime.now().isoformat()
}

with open("reflection_log.json", "a", encoding="utf-8") as f:
    f.write(json.dumps(data, ensure_ascii=False) + "\n")
python
# Save strategy
data = {
    "type": "strategy",
    "subject": subject,
    "difficulty": difficulty,
    "strategies": strategies,
    "timestamp": datetime.now().isoformat()
}

with open("strategy_log.json", "a", encoding="utf-8") as f:
    f.write(json.dumps(data, ensure_ascii=False) + "\n")

Technical Analysis

The reflect and strategy commands automatically append user-provided data to predictable files named reflection_log.json and strategy_log.json in the current working directory. The stored fields can contain personal learning tasks, approaches, subjects, and reported difficulties.

The data is retained as unencrypted JSON Lines without explicit user consent, configurable retention, an opt-out option, or application-enforced restrictive file permissions. File permissions therefore depend on the process environment and system umask. In a shared or broadly accessible working directory, another local account or process may be able to read the records.

Neither README.md nor SKILL.md documents this persistence side effect. Consequently, users may provide information under the assumption that it is used only for the current invocation.

This is not a privilege-escalation vulnerability and does not transmit data over a network. Exposure is limited to data entered into these commands and depends on local filesystem access.

Attack Path

...[truncated 1093 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable persistent logging by default and require an explicit option such as --save.
  2. Clearly disclose what data is stored, where it is stored, and how long it is retained before requesting consent.
  3. Permit users to choose the destination through an explicit path argument rather than writing to the current working directory.
  4. Create log files with owner-only permissions, such as mode 0600, using an atomic creation mechanism that prevents unsafe existing-file handling.
  5. Minimize retained data by omitting raw task, approach, subject, or difficulty text unless it is necessary.
  6. Add configurable retention and deletion controls, including a command for securely clearing saved records.
  7. Consider encrypting retained records when the application is expected to process sensitive educational information.
  8. Handle filesystem errors explicitly and notify the user whether persistence succeeded or failed.
  9. Update README.md and SKILL.md to document the persistence behavior and associated privacy implications.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README presents the skill title, description, example tasks, and command arguments partly or entirely in Chinese, with no indication that users may choose another language. This can violate language/locale policy expectations when a skill appears to require a specific language without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The usage examples specify only Chinese-language task and subject inputs (e.g. "数学作业" and "物理") with no indication that other languages are supported or that the locale is optional. This can be read as imposing a specific language/locale in the skill's documented usage, which conflicts with the policy requirement to avoid forced language constraints without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code presents nearly all user-facing prompts and guidance in Chinese, and there is no indication that users can select another language or that the skill is intentionally limited to a Chinese-speaking audience. That creates a natural-language policy issue because the skill imposes a specific locale without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill writes user-supplied reflection content to a local file without any notice, consent, retention policy, or need clearly stated in the skill description. While this is not code execution or direct exfiltration, it creates unnecessary persistence of potentially sensitive educational or personal self-assessment data, increasing privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

Strategy sessions are also appended to a local log file even though the skill appears to be an interactive coach rather than a journaling or record-keeping tool. This broadens data collection beyond user expectations and can expose learning difficulties, subjects, or personal study habits to other local users or processes.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.