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.pyusessubprocess.Popento spawn a background daemon process for the preview server.scripts/mermaid_preview.pyusesos.killto stop the server process based on a PID file stored in/tmp/mermaid-preview.pid.scripts/query-org-metadata.pyusessubprocess.runto 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.pycontains a reference tohttps://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.jsin itsHTML_TEMPLATEto 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 inSKILL.mdworkflows. - 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 viasfCLI, and host a local HTTP server. - Sanitization: The
query-org-metadata.pyscript performs basic stripping of input but passes user-provided object names into a SOQL query string for thesfcommand.
Audit Metadata