beautiful-mermaid
Warn
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: MEDIUMEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPROMPT_INJECTION
Full Analysis
- [EXTERNAL_DOWNLOADS] (MEDIUM): The
scripts/render.tsfile includes anensurePackagefunction that automatically triggersnpm installorbun addfor thebeautiful-mermaidlibrary if it is missing from the environment. This represents dynamic dependency fetching at runtime. - [COMMAND_EXECUTION] (MEDIUM): The script uses
node:child_process.execSyncto run shell commands for installing dependencies. While the package name is currently hardcoded, using shell execution for environment setup is a risky pattern that bypasses static dependency management. - [REMOTE_CODE_EXECUTION] (MEDIUM): The script implements a 'download and execute' pattern by installing the
beautiful-mermaidpackage and immediately loading it into the process viaawait import(). This is a potential vector for supply-chain attacks. - [PROMPT_INJECTION] (LOW): A vulnerability surface for indirect prompt injection exists in the diagram rendering pipeline.
- Ingestion points: User-controlled Mermaid syntax provided via the
--codeor--inputarguments inscripts/render.ts. - Boundary markers: No explicit delimiters or instructions are used to treat the Mermaid code as untrusted data.
- Capability inventory: The skill possesses the ability to write to the filesystem (
writeFileSync), execute shell commands (execSync), and trigger browser-based rendering through theagent-browserdependency. - Sanitization: Absent. The
scripts/create-html.tsfile interpolates the raw${svgContent}directly into an HTML template. If the Mermaid library outputs an SVG containing malicious scripts (XSS), those scripts would execute when the HTML wrapper is opened in a browser.
Audit Metadata