Back to skill

Security audit

Mindflow

Security checks for vulnerabilities and agentic risk

Overview

This mind-map skill is not obviously malicious, but it uses an under-disclosed browser rendering step that can execute active HTML with weakened browser isolation.

Install only if you are comfortable running it in an isolated workspace or container with minimal filesystem access and preferably no network access. Avoid feeding it untrusted Markdown or HTML, review generated intermediate HTML before rendering, and pin dependencies 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/html-to-image.js:311
Finding
Untrusted HTML Executes in Chromium with Browser Sandboxing Disabled<![CDATA[ ## Vulnerability Details **File Location**: `scripts/html-to-image.js`, lines 311-314; execution sinks at lines 332-334 and 384-385 **Vulnerability Type**: Unsafe active-content rendering with disabled browser isolation **Risk Level**: High ### Vulnerable Code ```javascript const browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] }); ``` The caller-controlled HTML is rendered during both measurement and final image generation: ```javascript await page.setContent(measurementHtml, { waitUntil: 'domcontentloaded', timeout: options.timeout }); ``` ```javascript await page.setContent(htmlContent, { waitUntil: 'domcontentloaded', timeout: options.timeout }); ``` ### Technical Analysis The script reads an HTML file selected by the caller and loads it into a real Chromium page using `page.setContent()`. This operation permits active HTML content, including inline JavaScript, event handlers, frames, and network-capable elements, to execute. The browser is launched with both `--no-sandbox` and `--disable-setuid-sandbox`. These flags disable Chromium's primary process-isolation boundary. The implementation also does not: - Sanitize the supplied HTML. - Disable JavaScript. - Apply a restrictive Content Security Policy. - Intercept and restrict outbound browser requests. - Restrict access to private or loopback network destinations. - Place the renderer in a dedicated operating-system sandbox or container. Consequently, malicious HTML can perform browser-originated network requests during conversion. It may probe services reachable from the host, transmit information embedded in the document, or interact with inadequately protected internal HTTP services. If an attacker can additionally exploit a vulnerability in the installed Chromium version, disabling the browser sandbox significantly increases the potential host impact. ### Attack Path 1. An attacker supplies malicious text or Markdown ...[truncated 1621 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `--no-sandbox` and `--disable-setuid-sandbox`, and run Chromium as a non-root user in an environment that supports its normal sandbox. 2. Treat every input HTML document as untrusted. Sanitize it with an allowlist-based HTML sanitizer before rendering. 3. Disable JavaScript with `page.setJavaScriptEnabled(false)` if Markmap output can be rendered without runtime scripts. If JavaScript is required, generate the SVG in a trusted stage and render only inert output. 4. Use Puppeteer request interception to block all external requests by default. Allow only explicitly required local resources and reject loopback, link-local, private-network, and non-HTTP destinations. 5. Apply a restrictive Content Security Policy that blocks frames, plugins, form submissions, arbitrary connections, and unapproved scripts. 6. Run the renderer inside a disposable container or equivalent operating-system sandbox with: - No host filesystem mounts beyond required input and output files. - No network access unless strictly necessary. - A read-only root filesystem. - Dropped Linux capabilities. - CPU, memory, process, and execution-time limits. 7. Keep Puppeteer and its Chromium binary patched, and validate input and output paths before use. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding
Runtime Dependencies Are Installed Without Version or Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 14-21 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash # Using npm npm install markmap-cli markmap-lib markmap-render puppeteer # Using bun bun install markmap-cli markmap-lib markmap-render puppeteer ``` ### Technical Analysis The installation instructions request package names without exact versions. The audited project contains no package manifest or lockfile that records reviewed versions and integrity hashes. Each installation can therefore resolve a different current release and a different transitive dependency graph. Package installation may execute package lifecycle scripts, and the installed modules subsequently execute with the privileges of the user invoking the Skill. Puppeteer installation can also involve acquisition of a browser binary through its dependency installation process. This is a supply-chain weakness rather than evidence that any named package is currently malicious. Its security significance is that the effective code installed and executed is mutable after the Skill has been reviewed. ### Attack Path 1. A user follows the dependency installation commands in `SKILL.md`. 2. npm or Bun contacts its configured package registry and resolves the latest package versions permitted at installation time. 3. The registry supplies packages and transitive dependencies that were not fixed or integrity-verified by this project. 4. A compromised maintainer account, malicious package release, registry compromise, or unexpectedly vulnerable release introduces unsafe code. 5. Installation lifecycle code or imported runtime code executes under the privileges of the user running the installation or Skill. 6. The compromised dependency can access resources available to that user, including project files, environment variables, network services, and writable filesystem locations. ### Impact Assessment A ...[truncated 579 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add a reviewed `package.json` that pins every direct dependency to an exact version rather than a range. 2. Commit the package-manager lockfile so that transitive versions and integrity metadata are reproducible. 3. Replace ad hoc installation with `npm ci` or Bun's frozen-lockfile equivalent, and fail installation if the lockfile would change. 4. Review dependency provenance, maintainers, lifecycle scripts, known vulnerabilities, and the browser binary source before approving updates. 5. Use automated dependency scanning and update dependencies through reviewed pull requests. 6. Where operationally possible, disable package lifecycle scripts during installation and explicitly perform only the trusted setup steps that are required. 7. Install and run dependencies as an unprivileged user in an isolated environment with minimal filesystem and network access. ]]>
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description says the skill turns text/Markdown/TXT into mind map images. The supplied code does not parse text, Markdown, or TXT, and it does not generate a mind map structure from source text. Instead, it reads an HTML file from disk, loads it in Puppeteer, optionally measures a rendered #mindmap SVG, and screenshots the page to PNG/JPEG. While the implementation is compatible with pre-rendered markmap-style mind map HTML, its actual primary function is HTML-to-image conversion, not text-to-mind-map generation. That is a material description/behavior mismatch.

Ae1

High
Category
analysis-evasion
Content
node (or bun) scripts/html-to-image.js --auto-fit <input-html> <output-image>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node (or bun) scripts/html-to-image.js --auto-fit <input-html> <output-image>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger language is very broad ('whenever text needs to be converted') and could cause the skill to activate on unrelated content. Because the skill reads files, invokes an LLM, and writes outputs, accidental invocation can lead to unintended local file access, processing of sensitive content, or unnecessary execution of external tooling.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The implementation accepts and renders arbitrary HTML files, while the skill description says it converts text, Markdown, or TXT into mind-map images. This mismatch expands the attack surface from passive text processing to active browser rendering of untrusted markup, potentially enabling script execution, external fetches, and browser-based abuse that users and orchestrators would not expect from the declared capability.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The script renders attacker-controlled HTML with Puppeteer via page.setContent, which allows the document to fetch external resources such as images, stylesheets, fonts, or scripts referenced in the HTML. In a skill advertised as converting local text content to a mind-map image, this creates unintended network egress, enabling SSRF-like access from the execution environment, metadata probing, tracking, or leakage through outbound requests.

Missing User Warnings

Low
Confidence
90% confidence
Finding
The skill accepts user-supplied file paths and writes output files, but it does not warn users that local files will be read and new files created. This can surprise users into exposing sensitive local content or leaving generated artifacts in unintended locations, especially in agentic environments with filesystem access.

Missing User Warnings

Low
Confidence
87% confidence
Finding
This code reads arbitrary HTML, loads it into Puppeteer via page.setContent, and writes a screenshot to the filesystem. While the file header describes the converter's purpose, there is no explicit runtime warning or comment disclosing that rendering untrusted HTML may execute page resources in a browser context and that the tool will create or overwrite an output image file.

Static analysis

No suspicious patterns detected.