code-to-chart
Pass
Audited by Gen Agent Trust Hub on Nov 3, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/analyze_codebase.pyexecutes themmdc(Mermaid CLI) tool to render diagrams as SVG files. This is implemented safely using a list of arguments passed tosubprocess.runwithout invoking a shell. The executable path is located usingshutil.which, ensuring only binaries in the system path are executed.\n- [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted codebase files to extract architecture and dependency information, which is then presented to the agent. This creates a surface for indirect prompt injection.\n - Ingestion points: The
scan_codebasefunction inscripts/analyze_codebase.pyrecursively reads file names and file contents to identify import relationships.\n - Boundary markers: The generated Mermaid output does not include explicit boundary markers or warnings to the agent to ignore instructions embedded in the code analysis.\n
- Capability inventory: The skill has capabilities to read files from the filesystem, write generated diagrams to the local directory, and execute the
mmdcutility viasubprocess.run.\n - Sanitization: The skill sanitizes Mermaid node IDs using a regular expression that limits characters to alphanumeric and underscores. However, file names and import paths are used as node labels with minimal escaping, which could cause Mermaid syntax errors but does not lead to direct execution vulnerabilities.
Audit Metadata