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.ts script contains a function named ensurePackage that dynamically installs the beautiful-mermaid package using npm install or bun add via child_process.execSync if 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.execSync within scripts/render.ts to 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() (or npm: imports in Deno) to load the beautiful-mermaid library after dynamically installing it, representing a runtime code loading pattern.
  • [INDIRECT_PROMPT_INJECTION]: The skill takes user-provided Mermaid code (via the --code or --input flags in render.ts) and processes it to generate an SVG, which is then opened in a browser via the agent-browser tool. 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.ts and SKILL.md workflows.
  • 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
Risk Level
MEDIUM
Analyzed
Sep 12, 2026, 01:56 AM