code-to-diagram

Pass

Audited by Gen Agent Trust Hub on Nov 22, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/analyze_codebase.py executes the external command mmdc (Mermaid CLI) using subprocess.run to render diagrams. While the command is constructed using a list of arguments minimizing shell injection risks, it relies on an external binary being present on the system path.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted source code files to extract dependency information and generate diagrams. 1. Ingestion points: The script reads file contents in scripts/analyze_codebase.py from any directory provided by the user. 2. Boundary markers: The generated Mermaid output and JSON results do not include explicit security boundary markers or instructions for the agent to ignore embedded content. 3. Capability inventory: The script has file read access to the target codebase and file write access for outputting diagrams, along with the ability to execute the mmdc command. 4. Sanitization: While Mermaid identifiers are sanitized using alphanumeric filtering, file names and directory structures are included as labels in the output without specific escaping for potential prompt injection patterns.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 22, 2026, 01:11 AM