Back to skill

Security audit

drawio-AI-maker

Security checks for vulnerabilities and agentic risk

Overview

This is a local draw.io diagram generator with some functional and dependency caveats, but no evidence of hidden exfiltration, persistence, or destructive behavior.

Install only if you are comfortable with a Chinese-language local diagram generator that writes .drawio files to a chosen output directory. Use a dedicated output folder, avoid running pip installs with elevated privileges, and expect docx/pdf parsing to need repair before relying on it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:85
Finding

Unpinned Third-Party Dependency Installation Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:85-87
Vulnerability Type: Supply-chain exposure through unpinned dependencies
Risk Level: Medium

markdown
**Dependency notes**:
- Parsing .docx requires: `pip install python-docx`
- Parsing .pdf requires: `pip install pdfplumber`

Technical Analysis

The Skill instructs users to install python-docx and pdfplumber without specifying reviewed versions, cryptographic hashes, a lockfile, or an explicitly trusted package index. These commands therefore resolve whichever releases the configured Python package index currently considers appropriate.

The effective dependency code can change after this Skill has been reviewed. A compromised upstream account, package-index compromise, malicious dependency release, or unexpected future release could consequently introduce code that was never audited with the Skill. Installation from a source distribution may execute build-related code, while subsequent imports and use of either package execute installed package code.

This is classified as T08: Insecure Dependencies because the risk enters through mutable third-party supply-chain components rather than malicious code embedded directly in the repository.

Attack Path

  1. A user requests DOCX or PDF parsing.
  2. The required package is unavailable in the local environment.
  3. The user follows the documented pip install python-docx or pip install pdfplumber instruction.
  4. pip resolves an unpinned package release and its transitive dependencies from the configured package index.
  5. If an upstream release, transitive dependency, package account, or index has been compromised, attacker-controlled code is installed.
  6. Malicious build logic may run during installation, or malicious runtime logic may run when the parser imports and uses the installed package.

Exploitation depends on compromise or malicious modification of the relevant dependency suppl ...[truncated 791 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace ad hoc installation commands with a committed dependency manifest containing reviewed, exact versions.
  2. Generate and verify cryptographic hashes for every direct and transitive dependency, then install with a command such as:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Use a lockfile generated through a reproducible dependency-management process and review changes whenever dependencies are upgraded.
  4. Explicitly document the trusted package index and disable unintended fallback indexes where practical to reduce dependency-confusion exposure.
  5. Install dependencies inside an isolated virtual environment under a non-privileged account.
  6. Scan pinned direct and transitive dependencies for known vulnerabilities and provenance concerns before release.
  7. Update the documentation to reference the secured manifest rather than instructing users to install mutable latest releases directly.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (18)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to read user-supplied files, access environment-controlled output paths, and write generated .drawio files, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization ambiguity where the agent may use broader file/env capabilities than intended, increasing the risk of unintended file access or writes if the skill is auto-invoked or given adversarial input.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match common requests like '生成图表' or '画个流程图', which can cause the skill to activate in contexts the user did not intend. Because the skill then processes uploaded documents and produces files, unintended activation could expose document contents to the skill pipeline or trigger unwanted file operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and usage instructions are written entirely in Chinese, and later user-facing prompts also assume Chinese interaction. There is no indication that the skill offers a language choice or that the Chinese-only behavior is a justified region-specific requirement, which matches the language/locale policy violation criterion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest explicitly advertises document conversion from docx/pdf/txt, which implies file ingestion/parsing capability. In this file, the CLI only accepts --input text, --from-llm JSON, or stdin, and there is no code to open, inspect, or extract content from document files, so the implemented behavior is narrower than the declared description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented workflow says '生成JSON→用户确认→调用gen.py生成.drawio', indicating an explicit approval step before file generation. Here, when --from-llm is provided, the program directly validates, generates, and writes the diagram file, and even in analysis mode it auto-generates for some inputs without an intervening confirmation step.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

All user-facing status messages, retry guidance, and instructions to the main agent are emitted in Chinese only. Because the file provides no alternative language path or opt-in mechanism, it enforces a specific language/locale in natural-language outputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains natural-language instructions and labels entirely in Chinese, and the generated LLM prompt explicitly instructs output using Chinese field examples and branch labels such as “是/否”. There is no indication that the skill is region-specific or that users can opt into another language, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstring states that the core design is for the LLM to describe only node content and relationships, with coordinates computed by a local layout engine. However, the rule-based fallback generators later return node objects containing x, y, width, and height fields directly, which conflicts with that documented behavior and architectural intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The prompt requires decision edges labeled with Chinese examples like “是/否” and requests output using Chinese-oriented instructions, which constrains the interaction to a specific locale. Because no alternative language path or opt-in is provided, this is a natural-language policy concern rather than a functional bug.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The inline prompt instruction explicitly says x, y, width, and height should not be written because the local engine will calculate layout automatically. Yet the fallback generation functions populate these fields throughout their outputs, creating a direct contradiction between the documented contract and actual generated data shape.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and usage instructions are entirely in Chinese and present the script as the required entrypoint without any indication that other languages are supported. Per the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Tainted flow: 'out_path' from os.environ.get (line 50, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
89% confidence
Finding

The script writes output to a directory taken directly from the DRAWIO_OUTPUT_DIR environment variable without validating or constraining it to a trusted base path. If an attacker can influence the environment in which this skill runs, they can redirect file creation to unintended locations, causing arbitrary file write within the permissions of the process and potentially overwriting sensitive files.

Content

Scanner excerpt · scripts/gen.py (reported line 51)May include surrounding context.

python
# 输出文件
    safe_title = title.replace("/", "_").replace("\\", "_")
    out_path = OUTPUT_DIR / f"{safe_title}.drawio"
    with open(out_path, "w", encoding="utf-8") as f:
        f.write(xml)

    print(f"✅ 生成成功: {out_path}")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring states the generator as a 'draw.io XML 生成器' and all embedded natural-language documentation is written only in Chinese, indicating a fixed language/locale assumption. Under the policy, forcing a specific language without user opt-in or documented regional justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language documentation and runtime messages exclusively in Chinese, including the module header and later exception strings. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file title and all instructional content are written exclusively in Chinese, with no indication that users may choose another language or that the locale restriction is required for a region-specific purpose. Under the policy, a fixed language without opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language documentation in the module header is presented only in Chinese, which can impose a specific language/locale on users or maintainers without any opt-in or alternative. Under the policy, language constraints should either offer user choice or be clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code file contains natural-language documentation that assumes a specific language locale (Chinese) for readers and maintainers. Under the policy, forcing a specific language without user choice or justification is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring is written entirely in Chinese and describes core behavior only in that language. This imposes a language choice in natural-language-facing documentation without any opt-in or alternative locale, which matches the policy concern for forced language/locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.