generate-diagrams

Pass

Audited by Gen Agent Trust Hub on Oct 7, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill processes user-provided D2 source code from DIAGRAM_SPEC.md, which is an untrusted ingestion point. It mitigates injection risks by parsing source code only from delimited markdown code blocks and performing static analysis to block unauthorized D2 features such as color literals or custom classes. It also runs d2 validate to verify the source before rendering.
  • [EXTERNAL_DOWNLOADS]: The skill facilitates the installation of the D2 CLI tool if it is missing, directing the agent to use official sources like d2lang.com or trusted package managers. The process is gated by a mandatory requirement for explicit user confirmation of the identified installation method.
  • [COMMAND_EXECUTION]: The skill invokes the d2 binary and node to perform diagram rendering. It uses child_process.spawn to avoid shell-based injection vulnerabilities and includes path validation logic to ensure that all file writes are restricted to the authorized project directory.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 7, 2026, 01:32 PM