external-diagram-mermaid-generate

Pass

Audited by Gen Agent Trust Hub on Oct 8, 2026

Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill includes Python scripts that interact with the system shell to manage a local server and query Salesforce metadata.
  • scripts/mermaid_preview.py uses subprocess.Popen to spawn a background daemon process for the preview server.
  • scripts/mermaid_preview.py uses os.kill to stop the server process based on a PID file stored in /tmp/mermaid-preview.pid.
  • scripts/query-org-metadata.py uses subprocess.run to execute Salesforce CLI (sf) commands to retrieve object counts, sharing models, and labels.
  • [EXTERNAL_DOWNLOADS]: The local preview server serves an HTML template that fetches the Mermaid.js library from an external Content Delivery Network (CDN).
  • The file scripts/mermaid_preview.py contains a reference to https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js in its HTML_TEMPLATE to render diagrams in the browser.
  • [INDIRECT_PROMPT_INJECTION]: The skill possesses an attack surface for indirect prompt injection as it processes untrusted data from a Salesforce organization's metadata and user-supplied entity names to generate diagrams.
  • Ingestion points: Metadata is ingested via scripts/query-org-metadata.py (record counts, OWD settings) and user-supplied object names in SKILL.md workflows.
  • Boundary markers: The skill uses markdown code blocks for Mermaid and ASCII outputs, but lacks specific instructions to ignore instructions embedded within the queried metadata fields (e.g., object labels).
  • Capability inventory: The skill can write to the local file system (/tmp/mermaid-preview.mmd), execute shell commands via sf CLI, and host a local HTTP server.
  • Sanitization: The query-org-metadata.py script performs basic stripping of input but passes user-provided object names into a SOQL query string for the sf command.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 8, 2026, 06:22 AM