skills/mizchi/explainer/d2-diagram/Gen Agent Trust Hub

d2-diagram

Fail

Audited by Gen Agent Trust Hub on Oct 6, 2026

Risk Level: HIGHREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The skill instructions in SKILL.md suggest installing the D2 diagramming tool using the command curl -fsSL https://d2lang.com/install.sh | sh. Piping a remote script directly into a shell is a high-risk execution pattern, even when targeting an official domain.
  • [COMMAND_EXECUTION]: The included utility assets/d2-facts.mjs invokes the d2 binary via execFileSync to perform diagram rendering, layout checking, and fact extraction.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted diagram data from .d2 files and their subsequent SVG/TXT renders. While this introduces an attack surface for indirect prompt injection (e.g., phantom boxes or misleading labels), the skill provides a robust mitigation strategy through the d2-facts.mjs utility, which explicitly checks for duplicates, truncated renders, and unauthorized edges to ensure the agent is not misled by silent rendering failures.
Recommendations
  • HIGH: Downloads and executes remote code from: https://d2lang.com/install.sh - DO NOT USE without thorough review
Audit Metadata
Risk Level
HIGH
Analyzed
Oct 6, 2026, 09:18 AM