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 runsd2 validateto 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.comor 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
d2binary andnodeto perform diagram rendering. It useschild_process.spawnto 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