Back to skill

Security audit

magic-mirror

Security checks for vulnerabilities and agentic risk

Overview

This self-reflection skill is coherent in purpose, but it directs agents to persist detailed personal life history without clear user consent or safeguards.

Review this skill before installing if you expect private or sensitive reflection. It may save detailed life events, names, places, emotions, and session summaries across sessions in local plaintext files, and it does not define consent, retention, deletion, encryption, or per-user isolation. Use only in an environment where those files are protected, and avoid sharing details you would not want stored or resurfaced later.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_summary.sh:18
Finding

Arbitrary File Overwrite Through Unsanitized Output Path

Content
View full analysis
[output-dir]" echo "Example: bash generate_summary.sh '2025-06-15-first-session'" exit 1 fi mkdir -p "$OUTPUT_DIR" OUTPUT_FILE="${OUTPUT_DIR}/${LABEL}.md" ``` The resulting path is later opened with truncating redirection: ```bash cat > "$OUTPUT_FILE" << EOFSYNOPSIS # 魔镜 Reflection: ${LABEL} **Date:** $(date '+%Y-%m-%d %H:%M') **Session Label:** ${LABEL} ``` ### Technical Analysis The script directly incorporates the attacker-controllable `LABEL` argument into `OUTPUT_FILE` without validating that it is a simple filename. A label can contain directory separators or traversal components such as `../`. The shell quoting prevents command injection, but it does not prevent filesystem path traversal. The `>` operator creates the selected file or truncates it if it already exists. It also follows symbolic links. Consequently, the script can overwrite any `.md` path writable by the account running it, provided the supplied traversal path resolves to that destination. The independently supplied `OUTPUT_DIR` also allows the caller to select a destination directory. Although that behavior is documented, combining it with an unrestricted label and unconditional truncation increases the risk of unintended file modification. ### Attack Path 1. An attacker gains control over, or persuades a user or automation process to use, the script's `session-label` argument. 2. The attacker supplies a traversal label, for example: ```bash bash scripts/generate_summary.sh "../../project/README" ``` 3. The script constructs a path equivalent to: ```text reflections/../../project/README.md ``` 4. `cat > "$OU ...[truncated 822 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Explicitly reject `/`, `\`, control characters, and traversal components. 3. Canonicalize the output directory and candidate parent path, then verify that the destination remains beneath the approved output directory. 4. Refuse to overwrite existing files unless the caller supplies a deliberate overwrite option: ```bash set -o noclobber : > "$OUTPUT_FILE" || { echo "Output file already exists" >&2 exit 1 } ``` 5. Check for symbolic links before writing, and use a safe file-creation mechanism that does not follow links where supported. 6. If arbitrary output directories are unnecessary, remove the second argument and use a fixed, application-controlled directory. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:73
Finding

Persistent Plaintext Storage of Sensitive Autobiographical Data Without Defined Safeguards

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (15)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description uses broad, everyday phrases like self-reflection, life decisions, and introspective conversations, which can cause the skill to activate in many normal chats. Unintended activation is risky here because the skill is designed to elicit sensitive personal disclosures and maintain session history, so accidental use can increase privacy exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Much of the operational guidance and prescribed interaction language is written as Chinese-first phrasing, including required opening lines and conversation structure, without stating that users may choose their preferred language. This can create a locale or language policy issue when the skill is used with users who have not opted into Chinese.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These instructions direct the system to retain prior disclosures and use sender ID to resume deeply personal conversations, but they do not clearly warn users that their reflections may persist across sessions. In a self-reflection skill, this creates a substantial privacy risk because users may reveal sensitive mental, relational, or biographical information without understanding it will be stored and resurfaced later.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill tells the agent to preserve detailed user disclosures and replay them in later sessions, which creates a resurfacing risk for sensitive personal information. In the context of introspective conversations, even seemingly benign recollections can expose emotional states, relationships, trauma, or identity-related details when shown again without renewed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to read and write timeline data to JSON files containing personal history, but does not require an explicit privacy warning or consent flow. Because the content being stored is intimate reflective material, file-based persistence materially increases the risk of unauthorized retention, later exposure, or unexpected reuse.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The lifecycle explicitly mandates reading, maintaining, and writing persistent timeline files that track personal history over time. This is especially dangerous in a self-reflection skill because it normalizes long-term collection of highly sensitive autobiographical data, increasing the blast radius of any unauthorized access, misrouting, or accidental resurfacing.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to automatically produce a detailed end-of-session summary of sensitive user disclosures, including relationship history, psychological patterns, and named individuals. In an introspection skill, this concentrates highly personal data into a reusable artifact, increasing the chance of unintended retention, display, forwarding, or exposure beyond the immediate conversation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

All prompts, stage instructions, and example utterances are specified in Chinese, which implies the skill will conduct interactions in a single language. The file does not state that Chinese is optional, user-selected, or required for a documented region-specific purpose, so this appears to force a locale without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file explicitly instructs the system to 'save timeline' at close and later to 'save session records + update timeline' while guiding users through intimate life history, emotional pain, relationships, fears, and identity exploration. Storing this category of sensitive mental-health-adjacent data without clear user notice, consent, retention limits, or handling rules creates a real privacy and safety risk if the data is exposed, reused unexpectedly, or retained indefinitely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These sections encourage eliciting highly sensitive disclosures about bereavement, trauma, illness, relationships, fears, shame, 'inner child,' and core identity, but provide no user-facing warning, informed-consent step, or safety boundary before doing so. In a self-reflection skill, this increases the chance users will reveal mental-health-adjacent or otherwise sensitive personal information without understanding the depth of collection or potential downstream use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown file presents all guidance and example prompts only in Chinese, with no indication that the user opted into Chinese or that the skill is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and all example prompts are written in Chinese, and the document presents the techniques as the expected conversation format without indicating that other languages are supported. This creates a natural-language locale constraint that appears mandatory rather than optional, which can violate language/locale policy when no user opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The schema metadata and instructions are written entirely in Chinese and explicitly direct the AI to preserve and record sensitive autobiographical details in that language/locale without any indication of user preference. In an introspection skill handling deeply personal memories, forcing a specific locale can cause misunderstanding, reduce informed transparency, and lead to inaccurate capture or exposure of sensitive user data in an unexpected language context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script creates a persistent markdown file for highly sensitive introspective session material, but it gives no warning about local storage, file sensitivity, or access controls. In the context of a self-reflection skill, transcripts may include mental health details, trauma, relationships, or other personal data, so silent retention increases the risk of accidental disclosure on shared systems or backups.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The script title uses Chinese-only user-facing labeling ("魔镜") while the rest of the script is otherwise in English, with no indication that language choice is configurable or intentional for a region-specific audience. This can violate language/locale policy when a skill imposes a language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.