Back to skill

Security audit

Generate Mindmap

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its mind-map purpose, but it can generate HTML that executes injected script content and can automatically install a Python package.

Install only if you trust the content being converted into maps, or avoid HTML/PNG/JPG rendering for untrusted outlines until the HTML escaping issue is fixed. Use --no-auto-install in shared or sensitive Python environments and install dependencies manually in an isolated environment. When opening generated HTML, understand that choosing the HTML save button in Chrome/Edge can enable autosave back to the selected file.

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)

T09 · Insecure Skill Coding Practices

Error
Location
generate_mindmap.py:1271
Finding

Untrusted Mind-Map Content Can Inject JavaScript into Generated HTML

Content
View full analysis
__TITLE__ ``` ```html

🧠 __TITLE__

``` Untrusted title and tree data are also inserted into an executable script element: ```html
Remediation
View remediation
SAFE_JSON ``` ```javascript const RAW = JSON.parse(document.getElementById("mindmap-data").textContent); ``` 3. Even in an `application/json` element, escape characters significant to the HTML parser. At minimum, encode: - `<` as `\u003c` - `>` as `\u003e` - `&` as `\u0026` - U+2028 as `\u2028` - U+2029 as `\u2029` 4. Apply context-specific HTML escaping to title substitutions used in `` and `<h1>`, such as `html.escape(title, quote=True)`. 5. Avoid applying one placeholder replacement to both HTML and JavaScript contexts. Use separate, context-aware placeholders. 6. Add regression tests containing: - `</script>` - `<img src=x onerror=...>` - Quotes and backslashes - U+2028 and U+2029 - Nested malicious labels in both Markdown and JSON 7. Add a restrictive Content Security Policy. Refactor inline scripts and inline event handlers so that `script-src` does not require `unsafe-inline`. 8. Do not launch Chromium with `--no-sandbox` unless execution occurs inside a separately enforced operating-system sandbox or container. 9. If untrusted input must be rendered through Playwright, disable unnecessary browser capabilities and block outbound network requests during rendering. ]]>

T08 · Insecure Dependencies

Warning
Location
generate_mindmap.py:32
Finding

Runtime Installation of an Unpinned Third-Party Dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
Findings (28)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation rule says the skill must be used whenever a user mentions mind maps, visualization, structuring notes, or exporting XMind/PNG/PDF, even if they did not explicitly ask for this skill. That broad trigger can hijack many ordinary summarization or organization requests and route them into a skill with file and shell capabilities, increasing unnecessary exposure to side effects and reducing user intent fidelity.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`{baseDir}/examples/`:`ai_trends.html`、`product_launch.html`、`python_learning.html`(可直接用浏览器打开体验交互与主题切换),以及对应 `.json` 数据和 `outline_example.md` 大纲示例。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`{baseDir}/examples/`:`ai_trends.html`、`product_launch.html`、`python_learning.html`(可直接用浏览器打开体验交互与主题切换),以及对应 `.json` 数据和 `outline_example.md` 大纲示例。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`{baseDir}/examples/`:`ai_trends.html`、`product_launch.html`、`python_learning.html`(可直接用浏览器打开体验交互与主题切换),以及对应 `.json` 数据和 `outline_example.md` 大纲示例。

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · generate_mindmap.py (reported line 180)May include surrounding context.

python
�─────────────────────────────────
# CLI
# ─────────────────────────────────────────────────────────────────────────────
def parse_args():
    p = argparse.ArgumentParser(
        description="OpenClaw Mind Map Generator — cross-platform (macOS / Linux / Windows)"
    )
    p.add_argument("--title",   required=True,  help="Mind map title")
    p.add_argument("--output",  default=None,
                   help="Output file path (default: auto-detected workspace). "
                        "With multiple formats, the extension is swapped per format.")
    p.add_argument("--data",    default=None,
                   help="Inline mind-map data: JSON, or a Markdown outline "
                        "(auto-detected). Prefer --data-file for anything non-trivial.")
    p.add_a

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · generate_mindmap.py (reported line 203)May include surrounding context.

python
p.add_argument("--quality", type=int,   default=92,
                   help="JPEG quality 1-100 (default: 92)")
    p.add_argument("--no-auto-install", action="store_true",
                   help="Never pip-install Pillow automatically; print instructions instead.")
    p.add_argument("--no-lint", action="store_true",
                   help="Skip the structure quality report.")
    return p.parse_args()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises shell, file read/write, and environment-dependent behavior but does not declare any explicit tool scope or permissions boundary. This creates a least-privilege gap: an agent may invoke the skill with broader capabilities than necessary, increasing the chance of unintended file access, writes, or command execution in the host environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill uses the File System Access API to obtain a writable handle and can repeatedly overwrite the selected local HTML file with generated content. Although browser permission is required, the capability is still security-relevant because the app can persistently modify user files after initial consent, and the skill context encourages editing/export workflows where users may not expect continuous write access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

After a file is bound, edits trigger automatic write-back without a strong, persistent warning at each save event. In an editor/export tool, that can lead to silent overwriting of local files, especially if users forget that auto-save is active or misunderstand the scope of the granted permission.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML export control does more than a one-time export: on supporting browsers it initiates file binding and enables ongoing write-back to a user-selected file. That behavior materially changes the trust model from download/export to persistent modification, which can surprise users and cause unintended overwrites of local content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file contains user-facing natural-language content exclusively in Chinese, and there is no indication that the user can opt into another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example HTML uses the File System Access API to bind a local HTML file and then silently write edits back to that same file. While the browser still requires an initial user-granted file handle, subsequent edits trigger automatic persistence without a fresh confirmation, which exceeds normal expectations for a simple viewer/export example and can cause unintended modification of local files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

After a file is bound, edits are automatically written back to the local HTML file on a timer without an explicit per-save confirmation. In a skill context that encourages users to open generated HTML locally, this increases the chance of accidental overwrites, persistence of unwanted edits, or deceptive content silently being saved into trusted local documents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The page binds a File System Access handle and then silently writes updated HTML back to that file after later edits via a debounced autosave path. Although initial binding requires user consent, subsequent writes happen automatically on many actions, which can unexpectedly overwrite local files and persist unintended or attacker-influenced content without an explicit per-save confirmation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON skill content uses Chinese labels throughout, such as the central title and branch/topic names, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This skill auto-installs Pillow if it is missing, which is not necessary for safe operation of a content-generation tool and creates a supply-chain and environment-modification risk. A malicious or compromised package source, index configuration, or dependency path could cause arbitrary code execution during installation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Package installation is triggered automatically without an explicit confirmation or consent step from the user. In an agent or shared environment, that means a simple export request can unexpectedly alter the runtime and execute installer code, violating least surprise and least privilege.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The code invokes pip via subprocess to modify the current Python environment at runtime. Although it does not use shell=True and the command components are fixed, executing package installation from within a skill expands the skill's authority beyond mind-map generation and can introduce unreviewed code from package indexes into the host environment.

Content

Scanner excerpt · generate_mindmap.py (reported line 55)May include surrounding context.

python
"--quiet", "--disable-pip-version-check"] + extra
        print(f"[mindmap] Pillow not found — running: {' '.join(cmd)}", file=sys.stderr)
        try:
            subprocess.check_call(cmd, stdout=subprocess.DEVNULL,
                                  stderr=subprocess.DEVNULL)
            break
        except (subprocess.CalledProcessError, FileNotFoundError):

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 · generate_mindmap.py (reported line 100)May include surrounding context.

python
def resolve_output(raw_path: str, fmt: str) -> str:
    """Expand ~, $HOME, %USERPROFILE%, create parent dirs, fix extension.

    If the path is just a filename without directory (e.g. 'mindmap.png'),
    it is placed under ~/.openclaw/workspace/ instead of the current dir.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTML template sets lang="zh-CN", and the interface strings throughout the embedded UI are Chinese-only, which effectively forces a specific language/locale. The file does not present a language choice or document this as a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file title and all operative instructions are written exclusively in Chinese, and line L003 instructs the model to read and follow this methodology before generating any mind map. There is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific purpose, which creates a language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file declares a Chinese locale and presents the interface text entirely in Chinese, with no indication that users can choose another language. This can violate language/locale policy when a skill or interface forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The inline edit documentation states '双击节点 / 选中后按 F2 或 Enter / 右键菜单「编辑文字」进入编辑', implying Enter starts text editing on a selected node. But the actual global keydown handler uses Enter to create a sibling node or child node instead, so the comment actively misstates the implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON file contains all user-facing labels in Chinese, such as the central title and branch labels, with no indication that language selection is optional or that the file is intended only for a Chinese-speaking or region-specific context. Under the policy rule for natural-language violations, forcing a specific language without opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The root HTML element sets lang="zh-CN", and the interface text throughout the file is Chinese, which indicates a fixed language/locale experience. There is no visible opt-in, language selector, or justification that this skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.