mermaid-architecture
Pass
Audited by Gen Agent Trust Hub on Sep 13, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill executes external processes via
subprocess.runwithinscripts/extract_mermaid.py,scripts/mermaid_to_image.py, andscripts/resilient_diagram.pyto invoke the Mermaid CLI (mmdc). - These operations are used exclusively for validating and rendering diagram files.
- The implementation is secure as it avoids
shell=Trueand sanitizes input parameters, such as filenames, to prevent injection attacks. - [EXTERNAL_DOWNLOADS]: The skill automatically downloads and executes the Mermaid CLI if it is not already installed in the environment.
- The
_get_mmdc_cmdfunction in the provided scripts utilizesnpx -y @mermaid-js/mermaid-clias a fallback. - This downloads the official package from the NPM registry, which is an established well-known service.
- [INDIRECT_PROMPT_INJECTION]: The skill architecture includes a surface for indirect prompt injection since it processes Mermaid diagram code provided in user-accessible markdown files or standard input.
- Ingestion points: Mermaid code blocks are extracted from markdown files or accepted as command-line arguments in
scripts/resilient_diagram.py. - Boundary markers: The skill utilizes markdown code fences and directory-based scoping (
docs/architecture/) to isolate diagram data. - Capability inventory: The skill is capable of writing source and image files to the filesystem and executing the diagram renderer.
- Sanitization: Filenames are sanitized using regex (
[^a-zA-Z0-9_-]) to prevent path traversal or command injection, and diagram code is processed by the official Mermaid parser.
Audit Metadata