beautiful-mermaid

Warn

Audited by Gen Agent Trust Hub on Mar 13, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The scripts/render.ts file uses child_process.execSync to execute shell commands for package management. It dynamically calls bun add or npm install based on the detected runtime environment to ensure the beautiful-mermaid package is available.
  • [EXTERNAL_DOWNLOADS]: The ensurePackage function in scripts/render.ts downloads the beautiful-mermaid package from the public NPM registry at runtime. The package is not version-locked, and its integrity is not verified before installation, which could lead to the execution of untrusted code if the registry or package is compromised.
  • [PROMPT_INJECTION]: The skill exhibits an indirect prompt injection surface in scripts/create-html.ts, where raw SVG content—potentially derived from user-supplied Mermaid code—is interpolated directly into an HTML wrapper without sanitization. This could allow an attacker to embed malicious <script> tags in the diagram code that execute when the agent views the resulting HTML file.
  • Ingestion points: The Mermaid syntax provided via the --code or --input arguments in render.ts (as seen in SKILL.md workflow).
  • Boundary markers: None. The content is directly placed inside a div tag in the HTML template.
  • Capability inventory: The skill uses child_process.execSync for shell execution and the agent-browser skill for rendering and screenshots.
  • Sanitization: No escaping or validation is performed on the svgContent variable before it is written to the output file.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Mar 13, 2026, 07:10 PM