T09 · Insecure Skill Coding Practices
- Location
scripts/generate_diagram.py:31- Finding
Mermaid Diagram Content Is Disclosed to Third-Party Rendering Services
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward Mermaid diagram helper, but users should know that remote image rendering sends diagram content to Kroki URLs.
Install only if you are comfortable using Kroki/mermaid.live for rendering. Do not include confidential hostnames, internal network layouts, secrets, account IDs, or proprietary architecture details unless you accept that the diagram source may be sent to or embedded in third-party URLs. Prefer Mermaid code output or a local renderer for sensitive diagrams, and choose output paths carefully because existing files may be overwritten.
scripts/generate_diagram.py:31Mermaid Diagram Content Is Disclosed to Third-Party Rendering Services
The code generally aligns with the broad theme of Mermaid/Kroki diagram creation, and it does use the Kroki API to generate image files plus optionally save Mermaid code. However, the declared description overstates the behavior. The implementation does not generate custom system, cloud, neural, graph, flowchart, ER, network, or Docker/K8s diagrams from user prompts in a meaningful way; instead it chooses one of several fixed templates using simple keyword matching. Most notably, ER diagram support is not actually implemented, since ER-related keywords are redirected to the graph_theory template. Therefore the description is materially more capable than the supplied code, so this is a mismatch.
The README provides example phrases such as "diagram neural network" and "mermaid flowchart" as apparent activation inputs, but it does not specify whether these are the only triggers, what context they apply in, or when the skill should not activate. Because these phrases are short and generic, they could overlap with ordinary requests about diagrams rather than a clearly scoped skill invocation.
The skill includes code patterns that perform outbound network access to kroki.io and write files locally, but it declares no tool scope or permission boundaries. In agent environments, this can cause the runtime to grant or infer broader capabilities than users expect, increasing the chance of unintended data egress or file modification.
The skill instructs sending Mermaid source derived from user prompts to a third-party service, kroki.io, without a clear disclosure or consent step. If users include internal architecture details, hostnames, network layouts, or proprietary system design information, that data is transmitted externally and may be logged or retained outside the user's trust boundary.
The script sends Mermaid diagram content to the external kroki.io service without an explicit warning or consent prompt. In an agent skill context, users may include internal architecture, network topology, or system design details, so silent off-host transmission can expose sensitive operational information to a third party.
The invocation format uses a generic single-word trigger, "architecture", followed by free-form text. Without stronger scoping, exclusions, or negative examples, this may ambiguously match normal user requests discussing architecture rather than intentionally invoking the skill.
The script writes downloaded content directly to the specified output path, which could overwrite an existing file. While it prints after saving, there is no pre-write warning, confirmation, or documented notice about this behavior.
The default description value is Chinese ("通用系统架构"), and the script’s built-in templates and examples are predominantly Chinese-language. For a general-purpose skill, this effectively imposes a specific language/locale by default rather than offering a user choice or documenting a justified regional constraint.
When --code is used, the script writes Mermaid source to a user-specified file path. This is a file-creation/write operation, and the code does not provide an explicit warning or overwrite notice beyond printing after the fact.
No suspicious patterns detected.