Back to skill

Security audit

Magic Docs

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but its default automatic scanning and document-writing behavior can persist sensitive workspace and operational details without enough user control.

Review this skill before installing. Use it only in workspaces where automatic Markdown edits are acceptable, and prefer marking specific non-sensitive docs with manual or daily updates. Avoid using it for passwords, credentials, internal network inventories, device access details, MEMORY.md, TOOLS.md, or other private state unless you are comfortable with those facts being copied into persistent project documentation.

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

other

Warning
Location
SKILL.md:25
Finding

Overbroad Autonomous Workspace Scanning and Sensitive State Access

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:25-28, SKILL.md:48-50, and SKILL.md:133-137
Vulnerability Type: Overbroad workspace and sensitive information access
Risk Level: Medium

Vulnerable Instructions

The following is an English rendering of the relevant source instructions:

markdown
### Automatic trigger (at the end of every conversation)
- Scan the workspace for Magic Doc files
- Determine whether the current conversation contains new information relevant to each document
- If so, update it automatically
bash
# Scan the workspace for Magic Doc files
grep -rl "<!-- MAGIC DOC" . --include="*.md" | head -20
markdown
User: Create a live document recording the network configuration of all devices
Agent:
1. Create devices-network.md
2. Add <!-- MAGIC DOC scope="IP,SSH,network,devices" -->
3. Extract existing device information from MEMORY.md and TOOLS.md
4. Automatically update it whenever future conversations involve device changes

Technical Analysis

The skill instructs the agent to recursively scan Markdown files across the current workspace after every conversation and automatically modify matching documents. The scan begins at . and does not define an allowlist, an approved directory boundary, or exclusions for sensitive and unrelated project locations.

The initialization example further directs the agent to extract information from MEMORY.md and TOOLS.md. Such files can contain persistent agent state, infrastructure details, local tool configuration, operational notes, or credentials. Although the skill separately states that passwords and keys must not be written into the generated document, that safeguard does not prevent the agent from reading sensitive files or exposing their contents to the model context. It also does not reliably prevent indirect disclosure of sensitive operational metadata, such as internal addresses, device i ...[truncated 2350 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit user authorization before the initial workspace scan and before every automatic document modification.
  2. Replace recursive scanning from . with an allowlist of user-approved files or a dedicated documentation directory.
  3. Do not read MEMORY.md, TOOLS.md, configuration files, or other persistent state sources by default.
  4. Require users to explicitly select every source file from which information may be extracted.
  5. Add denylist protections for files likely to contain secrets or private state, including memory files, tool configuration, environment files, credential stores, and private keys.
  6. Generate a proposed diff and request confirmation before writing changes, especially when information originates outside the target document.
  7. Apply structured secret and sensitive-data detection before information is placed in model context or written to another file.
  8. Restrict updates to the approved scope and reject document markers found outside authorized paths.
  9. Record which source file and conversation fact justified each update so users can review provenance.
  10. Provide a disabled-by-default automatic-update mode, with manual updates as the secure default.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (7)

Tp1

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

HTML comments in tool metadata are invisible to users but may be processed by AI agents, enabling hidden instruction injection.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises automatic document updates after each conversation without a prominent warning that it may autonomously modify workspace files. Silent persistence is dangerous because users may disclose operational details during normal dialogue without realizing those details can be written into long-lived documents.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are broad enough to match ordinary documentation-related requests, which can cause the skill to activate when the user did not intend autonomous live-document behavior. In an agent setting, ambiguous activation increases the risk of surprise file reads/writes and unintended persistence of conversation-derived information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatically scanning the workspace and deciding at the end of every conversation whether to update files is an underspecified autonomous action with broad scope. This can lead to unintended modification of user documents, persistence of sensitive or incorrect facts, and behavior the user may not notice until after state has changed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow describes workspace scanning and automatic file updates without clear privacy and integrity safeguards, creating a risk of overcollection and accidental corruption of documentation. Even if the intent is productivity, autonomous scanning and persistence of conversation-derived data expands the attack surface and can violate user expectations.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill is designed to persist operational details learned in conversation into documentation, and the examples include network, device, and password-adjacent data. Even though the rules say not to write secrets directly, this still encourages long-term storage of sensitive infrastructure metadata, which can materially aid an attacker if exposed.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This example explicitly instructs the agent to extract existing device information from memory/tooling files and copy it into a live document, which increases concentration and exposure of sensitive operational data. Aggregating such data into an automatically maintained file can turn scattered internal context into a high-value target and may violate least-privilege expectations.

Content

No source excerpt is available for this finding.