Back to skill

Security audit

Mind Map

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local Markdown-to-mind-map renderer, with disclosed local file output and font caching behaviors that users should understand before use.

Install only if you are comfortable with generated PNGs and copied input Markdown being written under mind_map_output, and with a first-run attempt to download and cache a CJK font from GitHub. For privacy-sensitive or offline environments, preinstall a suitable local font or remove/disable the download path before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
scripts/mind_map_generator.py:151
Finding

Unverified Mutable Remote Font Dependency

Content
View full analysis
Path: cache_dir = Path.home() / ".cache" / "mind-map-skill" cache_dir.mkdir(parents=True, exist_ok=True) return cache_dir / "chinese_font.ttc" def _ensure_cached_font() -> Optional[str]: cached = _get_cached_font_path() if cached.exists() and cached.stat().st_size > 1024: return str(cached) try: with urllib.request.urlopen(FONT_DOWNLOAD_URL, timeout=8) as resp: data = resp.read() if len(data) > 1024: cached.write_bytes(data) return str(cached) except Exception: return None return None ``` The dependency specification is also not version-locked: ```text pillow>=10.0.0 ``` ### Technical Analysis On first use, the application downloads a binary TrueType Collection font from the `main` branch of a personal GitHub repository. The `main` branch is mutable, so the downloaded content can change after the Skill has been reviewed. The implementation only verifies that the response contains more than 1,024 bytes. It does not verify: - A cryptographic digest or digital signature - An immutable source revision - The response content type - The expected font format or headers - A maximum permitted response size - The identity or integrity of a previously cached file The downloaded binary is subsequently passed to `ImageFont.truetype()`, which causes Pillow and its underlying font-processing stack to parse attacker-influenced data. Malformed fonts have historically represented a native parser attack surface. The broad `p ...[truncated 1834 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/mind_map_generator.py:405
Finding

Unbounded Markdown Processing and Image Allocation

Content
View full analysis
Node: markdown_text = markdown_text.replace("\\n", "\n") lines = markdown_text.strip().split("\n") roots: list[Node] = [] stack: list[Node] = [] ``` Tree traversal is recursive and has no depth limit: ```python def all_nodes(node: Node) -> list[Node]: out = [node] for child in node.children: out.extend(all_nodes(child)) return out ``` The final image dimensions are derived from input-controlled content and layout results without an upper bound: ```python min_x = min(n.x - n.w / 2 for n in all_nodes(root)) max_x = max(n.x + n.w / 2 for n in all_nodes(root)) min_y = min(n.y - n.h / 2 for n in all_nodes(root)) max_y = max(n.y + n.h / 2 for n in all_nodes(root)) margin = 120 width = int(max_x - min_x + 2 * margin) height = int(max_y - min_y + 2 * margin) width = max(width, 900) height = max(height, 700) shift_x = margin - min_x shift_y = margin - min_y image = Image.new("RGB", (width, height), "white") draw = ImageDraw.Draw(image) ``` ### Technical Analysis The generator accepts arbitrary Markdown without enforcing maximum input bytes, number of lines, node count, hierarchy depth, text length, or final canvas dimensions. Several tree operations—including `all_nodes()`, `tree_depth()`, `_assign_weight()`, and `_measure_tree()`—use recursion. A sufficiently deep hierarchy can exceed Python's recursion limit and terminate generation with an exception. A sufficiently large or wide tree can also produce extreme layout coordinates. These coordinates are converted di ...[truncated 1693 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The script imports urllib.request and uses it to fetch a remote font at runtime, which is an undeclared network capability relative to the skill’s stated purpose of local Markdown-to-PNG generation. Even though the URL is hardcoded to a GitHub-hosted font and not directly user-controlled, this creates unexpected outbound traffic, privacy leakage, and a supply-chain risk if the remote content changes or is intercepted.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
description: Generate a PNG mind map from Markdown using free (auto), center, or horizontal layout. Use when user asks to produce a brain map/思维导图 from notes.
argument-hint: "[free|center|horizontal] [markdown_file_or_inline_markdown]"
disable-model-invocation: true
allowed-tools: Bash(python mind_map/scripts/run_mind_map.py *), Read, Write
---

# Mind Map Skill

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill reports that the input markdown is saved into the output folder, meaning provided content is persisted to disk beyond the immediate rendering operation. Without a prominent warning, users may unknowingly store sensitive notes or proprietary content in a dated output directory.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is presented as generating mind maps locally, but the documentation discloses a first-run font download into the user's home cache. That introduces undeclared external dependency and network-like behavior, which expands the trust boundary and can surprise users in restricted or privacy-sensitive environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The hardcoded FONT_DOWNLOAD_URL establishes a built-in dependency on remote content that is not essential to the core task. Any remote dependency broadens the attack surface by introducing supply-chain compromise risk and by allowing a simple rendering tool to exfiltrate metadata such as IP address and execution timing to a third party.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The function _ensure_cached_font() performs outbound network access to download a font although the skill description only says it generates a PNG mind map from Markdown. This mismatch is dangerous because users and hosts may execute the skill assuming purely local processing, while it silently contacts an external service and consumes untrusted remote data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code downloads the font automatically with no user-facing warning, consent, or disclosure, so users cannot make an informed decision about external communication. In this skill context, that is more suspicious because the advertised functionality is offline document rendering, making silent outbound requests unexpected and unnecessary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill accepts either inline markdown or a file path and explicitly reads local files when a path is provided, but the description does not clearly warn users about that behavior. This can lead to accidental exposure of sensitive local content if users pass paths without understanding the read semantics.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

A mind-map rendering skill does not obviously require runtime fetching of assets, so describing automatic font acquisition creates unnecessary network-like capability relative to the stated purpose. While not inherently malicious, it increases attack surface and may violate user expectations about a local-only tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The docs mention possible font download and cache write on first run, but this side effect is not surfaced as a clear user warning in the main skill description. Hidden writes to the home directory can be problematic in managed, sandboxed, or privacy-sensitive environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The example invocations and sample input content are presented in Chinese, while the surrounding documentation is in English, with no indication that this is optional or merely illustrative. This can be interpreted as a language/locale policy issue because the skill examples implicitly prescribe a specific language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file documents that the skill creates output files under mind_map_output/..., but it does not include any caution or user-facing warning about modifying the local filesystem. For markdown files, SQP-2 applies when behavior affecting user data or system state is described without warning, and these examples explicitly describe file creation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file presents all user-facing content in Chinese, and there is no indication that the language choice is optional or tied to a documented region-specific purpose. Under the policy rule for language or locale constraints, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The reference explicitly documents that the skill performs a first-run network fetch from GitHub and writes the downloaded font into a local cache directory, but it does not clearly warn the user at execution time that network access and filesystem modification will occur. This is a real security-relevant transparency issue because unexpected outbound requests and local writes can violate user expectations, break least-privilege assumptions, and create supply-chain exposure if the remote asset is changed or intercepted.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified as pillow>=10.0.0, which permits any newer version to be installed, making builds non-reproducible and weakening assurance that a reviewed, known-safe release is actually used. In a skill that processes user-supplied Markdown into PNGs, Pillow is part of the image-processing path, so unexpected dependency drift could expose the skill to newly introduced bugs or unresolved vulnerable releases.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
pillow>=10.0.0

Unverifiable Dependency: pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

Pillow has a history of security advisories, including issues such as resource-consumption and code-execution flaws, and this manifest does not pin a version that can be verified as patched. Because this skill generates PNG output from user-controlled content, the image library is directly relevant to runtime behavior, so an unpinned and unverifiable Pillow version increases the chance of deploying an affected release.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.