generating-mermaid-diagrams
Pass
Audited by Gen Agent Trust Hub on Jul 29, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill includes two Python scripts that use the
subprocessmodule for legitimate functionality.query-org-metadata.pyexecutes Salesforce CLI (sf) commands to retrieve object metadata and record counts for grounding diagrams.mermaid_preview.pyusessubprocess.Popento manage its own lifecycle when running the preview server in background mode. - [EXTERNAL_DOWNLOADS]: The
mermaid_preview.pyscript serves an HTML template for local diagram rendering that fetches the Mermaid JavaScript library from the official JSDelivr CDN (cdn.jsdelivr.net). This is a well-known service used for serving open-source libraries. - [DYNAMIC_EXECUTION]: The
mermaid_preview.pyscript implements a local HTTP server that dynamically generates HTML to render diagrams. It initializes the Mermaid renderer withsecurityLevel: 'loose', which allows HTML rendering within diagram labels for visual formatting. - [INDIRECT_PROMPT_INJECTION]:
- Ingestion points: The
query-org-metadata.pyscript retrieves schema information (object names, record counts, sharing models) from the active Salesforce organization. - Boundary markers: The skill provides instructions on how to use these outputs but does not define explicit delimiters for the metadata returned to the agent.
- Capability inventory: The skill has the ability to write files to
/tmp, execute CLI tools viasubprocess, and host a local web server for previews. - Sanitization: The scripts parse structured JSON output from the Salesforce CLI and provide basic escaping for diagram code when generating the preview interface.
Audit Metadata