beautiful-mermaid
Warn
Audited by Gen Agent Trust Hub on Sep 12, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: The
scripts/render.tsscript contains a function namedensurePackagethat dynamically installs thebeautiful-mermaidpackage usingnpm installorbun addviachild_process.execSyncif it is not already present. This pattern bypasses static dependency management and allows for the execution of unverified external code during the skill's operation. - [COMMAND_EXECUTION]: The skill uses
child_process.execSyncwithinscripts/render.tsto execute shell commands for package installation at runtime. The specific commands depend on the detected runtime (Bun or Node.js). - [DYNAMIC_EXECUTION]: The skill uses
import()(ornpm:imports in Deno) to load thebeautiful-mermaidlibrary after dynamically installing it, representing a runtime code loading pattern. - [INDIRECT_PROMPT_INJECTION]: The skill takes user-provided Mermaid code (via the
--codeor--inputflags inrender.ts) and processes it to generate an SVG, which is then opened in a browser via theagent-browsertool. Maliciously crafted Mermaid syntax could potentially exploit vulnerabilities in the rendering library or lead to XSS when the resulting file is opened in the browser. - Ingestion points: User-supplied Mermaid syntax is accepted as input in
scripts/render.tsandSKILL.mdworkflows. - Boundary markers: None. The skill assumes the provided Mermaid code is safe for rendering.
- Capability inventory: The skill can execute shell commands, write to the filesystem, and interact with a browser via external tool calls.
- Sanitization: No validation or sanitization of the Mermaid code is performed before it is passed to the rendering engine or the browser.
Audit Metadata