beautiful-mermaid

Warn

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The script scripts/render.ts contains an ensurePackage function that uses child_process.execSync to dynamically install the beautiful-mermaid package from public registries (NPM or Bun) at runtime if it is not already present in the environment.
  • [DYNAMIC_EXECUTION]: The skill uses dynamic import() in scripts/render.ts to load the beautiful-mermaid library after it has been installed via shell commands at runtime.
  • [COMMAND_EXECUTION]: The workflow in SKILL.md instructs the agent to execute shell commands (e.g., bun run scripts/render.ts --code "...") where user-supplied Mermaid code is passed directly as a command-line argument. This creates a surface for command injection if the agent does not properly escape the user input when constructing the shell command.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted user input in the form of Mermaid diagram code, which is rendered into an SVG, wrapped in HTML, and then opened in a browser context using the agent-browser skill. A lack of sanitization could allow malicious diagram code to influence the browser session.
  • Ingestion points: User-provided diagram code or descriptions processed in SKILL.md and passed to scripts/render.ts.
  • Boundary markers: Absent; the instructions do not specify delimiters or warnings to ignore embedded instructions in the Mermaid code.
  • Capability inventory: The skill uses shell execution (bun, npx, deno, rm), file system access (node:fs), and browser automation (agent-browser).
  • Sanitization: Absent; the diagram code is interpolated into shell commands in SKILL.md and the resulting SVG is embedded directly into an HTML template in scripts/create-html.ts without validation or escaping.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 15, 2026, 06:05 PM
Security Audit — agent-trust-hub — beautiful-mermaid