mermaid
Warn
Audited by Gen Agent Trust Hub on Aug 28, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: The file
scripts/render.tsincludes anensureDependencyfunction that executesnpm install beautiful-mermaidif the package is not found. This behavior downloads and installs code from a public registry at runtime without any version pinning or integrity checks. - [COMMAND_EXECUTION]: The skill utilizes
child_process.execSyncto run shell commands for dependency management, which could be exploited if the environment or package names were manipulated. - [EXTERNAL_DOWNLOADS]: The skill relies on
npxandnpmto fetch external code (tsxandbeautiful-mermaid) from remote servers during execution. - [DYNAMIC_EXECUTION]: The rendering script employs dynamic ESM imports (
import()) to load thebeautiful-mermaidlibrary after it has been potentially installed or updated at runtime. - [INDIRECT_PROMPT_INJECTION]: The skill exposes a surface for indirect prompt injection by processing external data and possessing file system capabilities.
- Ingestion points: Diagram source code is read from files or standard input in
scripts/render.ts. - Boundary markers: There are no protective delimiters or instructions to prevent the agent from interpreting instructions that might be embedded within a processed Mermaid diagram.
- Capability inventory: The skill can execute shell commands (
execSync), read any file the user has access to (readFileSync), and write to arbitrary paths (writeFileSync) via the--outputargument. - Sanitization: Input Mermaid code is passed to the rendering library without any filtering or sanitization steps.
Audit Metadata