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.py executes the mmdc (Mermaid CLI) tool to render diagrams as SVG files. This is implemented safely using a list of arguments passed to subprocess.run without invoking a shell. The executable path is located using shutil.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_codebase function in scripts/analyze_codebase.py recursively 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 mmdc utility via subprocess.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
Risk Level
SAFE
Analyzed
Nov 3, 2026, 08:59 AM