mermaid
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: HIGHEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONCOMMAND_EXECUTION
Full Analysis
- [EXTERNAL_DOWNLOADS] (HIGH): The script
tools/validate.shusesnpx -yto fetch and execute@mermaid-js/mermaid-cliandbeautiful-mermaidfrom the npm registry at runtime. - Evidence:
npx -y @mermaid-js/mermaid-cliandnpx -y --package beautiful-mermaidintools/validate.sh. - Risk: By not pinning specific versions or using a lockfile, the skill is vulnerable to supply chain attacks where a compromised package update could execute malicious code on the host system.
- [REMOTE_CODE_EXECUTION] (HIGH): The use of
npxto run unverified remote packages constitutes a remote code execution vector. - [DYNAMIC_EXECUTION] (MEDIUM): The script executes a Node.js one-liner that performs a dynamic
require()based on a path derived from thePATHenvironment variable. - Evidence:
require(path.join(moduleRoot, "beautiful-mermaid"))wheremoduleRootis derived fromprocess.env.PATH.split(":")[0]. - Risk: This is a non-standard loading mechanism. If an attacker can influence the
PATHvariable, they may be able to redirect therequirecall to load a malicious local module. - [INDIRECT_PROMPT_INJECTION] (HIGH): The skill processes untrusted input files (
diagram.mmd) using the Mermaid CLI, which utilizes a headless browser (Puppeteer). - Ingestion Point:
INPUTvariable intools/validate.sh(readingdiagram.mmd). - Boundary Markers: None. The script directly passes the file content to the CLI.
- Capability Inventory: Command execution (
npx), file system writes (mktemp,-o "$OUTPUT"). - Sanitization: None. The content of the
.mmdfile is parsed as-is. - Risk: Malicious Mermaid diagrams can sometimes exploit the underlying browser rendering engine or the CLI parser to perform unauthorized actions or read local files within the browser context.
Recommendations
- AI detected serious security threats
Audit Metadata