Back to skill

Security audit

Flowchart Gen

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real flowchart generator, but it needs Review because it can automatically use stored API credentials, send prompts to configurable remote endpoints, and install unpinned global dependencies.

Install only if you are comfortable with diagram prompts being sent to DeepSeek, OpenAI, or a configured custom endpoint. Avoid passing live API keys with --api-key, prefer a narrowly scoped environment variable or protected config, do not use custom base URLs unless you fully trust them, use --no-llm or --raw for private diagrams, and avoid running the installer with sudo unless you accept the system-wide dependency risk.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T08 · Insecure Dependencies

Warning
Location
install.sh:64
Finding

Unpinned Dependencies Installed Globally or Into the Active Python Environment

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.py:83
Finding

API Credentials Can Leak Through Command-Line Arguments and Verbose Logs

Content
View full analysis
10 else '***' print(f"[INFO] {provider} API配置: 密钥={api_key_preview}, 模型={model}, 端点={base_url}") ``` ```python parser.add_argument( "--api-key", help="手动指定API密钥(优先级最高)" ) ``` The documentation recommends this invocation: ```bash python scripts/generate.py "描述" --api-key sk-xxx --api-provider deepseek ``` ### Technical Analysis Accepting a secret through `--api-key` places the complete credential in the process argument vector. Depending on the operating system and host configuration, process arguments can be exposed through process inspection tools, process accounting, monitoring agents, diagnostic reports, or `/proc`. The command is also likely to be retained in shell history. When verbose mode is enabled, the script prints the first ten characters of credentials longer than ten characters. API key prefixes may identify an account, provider, credential family, or key record and are unnecessary for troubleshooting. These values may be retained in CI logs, terminal transcripts, support bundles, or centralized logging systems. The Skill only requires access to a credential for the duration of an authorized API request. Exposing it through process metadata and logs is not required for diagram generation and violates least-disclosure principles. ### Attack Path 1. A user follows the documented example and supplies a live API key with `--api-key`. 2. The full command is stored in shell his ...[truncated 1096 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.py:87
Finding

Stored Bearer Credentials and Prompt Data Can Be Sent to an Unvalidated Custom Endpoint

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (39)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

Using shell=True for a subprocess check is unnecessary and weakens execution safety by involving the system shell. In hostile or multi-user environments, PATH hijacking or shell interpretation quirks can cause execution of an unintended binary, especially on Windows.

Content

Scanner excerpt · scripts/generate.py (reported line 182)May include surrounding context.

python
try:
            # 在Windows上使用shell=True可能更可靠
            if sys.platform == "win32":
                result = subprocess.run([cmd, "--version"], 
                                      capture_output=True, text=True, shell=True)
            else:
                result = subprocess.run([cmd, "--version"],

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This is the most security-significant issue in the file: a user-driven rendering command is executed with shell=True on Windows. Because the tool accepts user-controlled output paths and processes attacker-provided Mermaid content in an agent skill context, this expands into command-injection and tool-parameter abuse risk beyond normal desktop use.

Content

Scanner excerpt · scripts/generate.py (reported line 1374)May include surrounding context.

python
# 执行命令
                # 执行命令
        if sys.platform == "win32":
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=30, shell=True)
        else:
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file includes a natural-language statement that the skill provides Chinese-only error messages, help documentation, and user interface. Under the language/locale policy, forcing a specific language without offering user choice or documenting justified locale scope is a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all user-facing guidance in a single language, Chinese, and does not indicate that users can select another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the natural-language policy rule, forcing a specific language without opt-in is a locale-policy concern.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises capabilities to read environment variables, read local files, access the network, and invoke shell commands, but it does not declare an explicit permission/tool scope. That creates an authorization transparency gap: users and hosting platforms cannot clearly constrain or review what the skill may access, increasing the chance of over-privileged execution and unintended data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation shows passing API keys directly on the command line, which can leak secrets through shell history, process listings, terminal logs, and telemetry. Even if presented as an example, users commonly copy-paste such commands, making accidental credential disclosure likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The TODO explicitly describes automatic reading of DeepSeek API configuration from ~/.openclaw/openclaw.json and use of a remote LLM API, but does not mention user consent, disclosure of external data transmission, or safeguards around credential handling. In a skill that converts user natural-language prompts into diagrams, this creates a real privacy and secret-handling risk because user input may be sent to a third party and local credentials may be consumed implicitly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Nearly all user-facing strings and comments in the script are in Chinese, with no option to select another language and no documented reason for a Chinese-only locale. This can violate a language/locale policy when a skill unconditionally forces one language for all users.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 29)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 31)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 78)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 98)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 100)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 114)May include surrounding context.

sh
echo "   ❌ Node.js 或 npm 未安装"
    echo "   请先安装 Node.js: https://nodejs.org/"
    echo "   或使用包管理器:"
    echo "   - Ubuntu/Debian: sudo apt install nodejs npm"
    echo "   - macOS: brew install node"
    echo "   - Arch: sudo pacman -S nodejs npm"
    exit 1

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script downloads packages from npm and PyPI-compatible sources without an explicit warning that external network access will occur. This is risky because dependency downloads expand the trust boundary to third-party registries and mirrors, which matters for a skill intended to be run by end users or automation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 319)May include surrounding context.

md
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 50)May include surrounding context.

python
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 77)May include surrounding context.

python
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 97)May include surrounding context.

python
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 109)May include surrounding context.

python
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 139)May include surrounding context.

python
LLM_CONFIG = {
    "provider": "deepseek",  # deepseek 或 openai
    "api_key": None,
    "base_url": "https://api.deepseek.com/v1",  # DeepSeek默认,OpenAI会自动覆盖
    "model": "deepseek-chat",  # deepseek-chat 或 gpt-4o
    "timeout": 30
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 93)May include surrounding context.

python
# 根据provider设置默认值
        if LLM_CONFIG["provider"] == "openai":
            if not args.api_base_url:
                LLM_CONFIG["base_url"] = "https://api.openai.com/v1"
            LLM_CONFIG["model"] = "gpt-4o"
        else:  # deepseek
            if not args.api_base_url:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate.py (reported line 116)May include surrounding context.

python
# 根据provider设置默认值
        if LLM_CONFIG["provider"] == "openai":
            if not args.api_base_url:
                LLM_CONFIG["base_url"] = "https://api.openai.com/v1"
            LLM_CONFIG["model"] = "gpt-4o"
        else:  # deepseek
            if not args.api_base_url:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill reads API credentials from ~/.openclaw/openclaw.json, which is unrelated to the stated purpose of flowchart generation and may pull secrets from another tool's trust boundary without explicit user consent. This broadens secret access and can surprise users who did not intend this script to inspect unrelated local configuration.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
92% confidence
Finding

The Windows dependency check uses subprocess.run([cmd, "--version"], shell=True), which is unnecessary and unsafe. Even though the command names are hardcoded, shell invocation expands the attack surface through PATH/cmd.exe resolution behavior and can execute unintended programs in a compromised environment.

Content

Scanner excerpt · scripts/generate.py (reported line 182)May include surrounding context.

python
try:
            # 在Windows上使用shell=True可能更可靠
            if sys.platform == "win32":
                result = subprocess.run([cmd, "--version"], 
                                      capture_output=True, text=True, shell=True)
            else:
                result = subprocess.run([cmd, "--version"],