skills/tychohq/agent-skills/diagrams/Gen Agent Trust Hub

diagrams

Warn

Audited by Gen Agent Trust Hub on Sep 16, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/render-elk.mjs uses child_process.execSync to perform PNG conversions using the macOS sips utility. The command string is constructed by concatenating filenames retrieved directly from the filesystem via readdirSync.
  • Evidence: Filenames are wrapped in double quotes in the command string: execSync(sips -s format png "${join(outDir, svgName)}" --out "${join(outDir, pngName)}" 2>/dev/null);.
  • Risk: If a file in the target directory has a name containing shell metacharacters (e.g., ";touch RCE;".json), the shell may interpret the name as separate commands, leading to arbitrary code execution.
  • [DYNAMIC_EXECUTION]: The script employs dynamic module loading to import its primary dependency.
  • Evidence: const require = createRequire(process.cwd() + '/'); const ELK = require('elkjs'); in scripts/render-elk.mjs.
  • Risk: This pattern loads the elkjs library from the user's current working directory rather than a fixed path. This allows the execution of code from the project environment, which is a standard but sensitive operation.
  • [INDIRECT_PROMPT_INJECTION]: The skill acts as a data processing pipeline that ingests external, potentially untrusted JSON data to generate visual diagrams.
  • Ingestion points: scripts/render-elk.mjs reads and parses .json files from the filesystem.
  • Boundary markers: The script does not implement specific boundary markers or instructions to ignore embedded commands within the JSON data, though it is intended for structured data.
  • Capability inventory: The script possesses file read/write capabilities (fs.readFileSync, fs.writeFileSync) and shell execution capabilities (execSync).
  • Sanitization: The script uses an escapeXml function to sanitize text labels (label, title, subtitle) before injecting them into the SVG output, which helps mitigate XML/SVG injection risks.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 16, 2026, 02:25 PM