beautiful-mermaid

Pass

Audited by Gen Agent Trust Hub on Oct 16, 2026

Risk Level: SAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [EXTERNAL_DOWNLOADS]: The scripts/render.ts script dynamically installs the beautiful-mermaid package from the NPM registry during execution if it is not already available in the environment.
  • [COMMAND_EXECUTION]: The skill uses child_process.execSync within scripts/render.ts to run system commands (npm install or bun add) for installing dependencies at runtime.
  • [DYNAMIC_EXECUTION]: The scripts/render.ts script performs runtime package installation followed by a dynamic import() call to load the beautiful-mermaid library, which is a form of dynamic code loading.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes user-supplied Mermaid syntax and renders it to SVG format. The scripts/create-html.ts script takes this SVG and interpolates it directly into an HTML wrapper without any sanitization or escaping. This HTML file is then opened locally by the agent-browser tool. A malicious user or an attacker-controlled data source could provide Mermaid code that results in an SVG containing script elements or event handlers, which would execute in the context of the agent's browser when the file is opened.
  • Ingestion points: User-provided Mermaid code or description processed by scripts/render.ts and scripts/create-html.ts.
  • Boundary markers: None identified; user input is treated as raw Mermaid syntax.
  • Capability inventory: File writing (writeFileSync), system command execution (execSync), and browser interaction (agent-browser).
  • Sanitization: Absent; scripts/create-html.ts performs raw string interpolation of the SVG content into the HTML template.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 16, 2026, 06:56 PM