Back to skill

Security audit

Model Config Check

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate model-testing purpose, but it can automatically store API keys and send them to configured endpoints without enough user control or endpoint safeguards.

Review this skill carefully before installing. It is not clearly malicious, but it can persist API keys in OpenClaw model configuration and automatically make real network requests using those keys. Only use it with trusted provider URLs, prefer HTTPS-only endpoints, avoid custom relays unless you trust them, and rotate any key that may have been tested against an untrusted baseUrl.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check_models.sh:37
Finding

API Credentials Can Be Transmitted to Arbitrary or Unencrypted Provider Endpoints

Content
View full analysis
/dev/null) ``` For Anthropic-compatible providers, the API key is sent to the configured endpoint: ```bash if [[ "$API_TYPE" == *"anthropic"* ]]; then # Build URL: append /v1/messages if not already in the path if [[ "$BASEURL" == *"/v1/messages"* ]]; then FULL_URL="$BASEURL" else FULL_URL="${BASEURL%/}/v1/messages" fi curl -s -X POST "$FULL_URL" \ -H "Content-Type: application/json" \ -H "x-api-key: ${APIKEY}" \ -H "anthropic-version: 2023-06-01" \ -d "{\"model\":\"${MODEL_ID}\",\"max_tokens\":512,\"messages\":[{\"role\":\"user\",\"content\":\"reply ok\"}]}" \ --connect-timeout 10 --max-time 60 \ -o "$TMPRESP" 2>/dev/null ``` For OpenAI-c ...[truncated 4701 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码的核心确实是在做模型配置与连通性校验,这与声明的主要用途大体一致。但声明中还包含几个重要能力:1)在 config.patch/config.apply 涉及 models.providers 后必须自动执行;2)当用户只提供模型名和 API key 时,自动识别 provider、查找配置、写入并校验。提供的代码块只是一个手动执行的 shell 脚本,接收配置文件路径,读取 JSON 配置后检查 provider 和模型连通性,并不会监听或挂钩配置修改事件,也不会根据模型名/API key 推断 provider、更新配置文件或写入任何内容。因此描述包含了该代码并未实现的关键行为,属于描述与实际行为不完全一致的情况。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs automatic configuration writes using a user-supplied API key with no explicit warning or confirmation step. This can cause sensitive credentials to be persisted locally, possibly in plaintext configuration, and may commit the agent to modifying system state based on minimal user input.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The validation flow sends authenticated requests containing the user's API key and prompt content to external provider APIs, but the skill does not clearly warn the user beforehand. Because the skill is designed to auto-run after config changes, this omission can result in silent external transmission of secrets and metadata without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill explicitly instructs use of shell/exec and curl against external endpoints, but declares no tool scope or allowed-tools restrictions. That increases the blast radius because an agent may run network-capable shell commands without any explicit least-privilege boundary or review signal.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are broad enough to match ordinary discussion about models, making unintended activation more likely. In this skill, unintended activation is more dangerous because activation can lead to reading local config, sending network probes, and issuing authenticated test requests to external providers.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 39)May include surrounding context.

md
| `deepseek-*` | DeepSeek | `https://api.deepseek.com` | `openai-completions` → `/v1/chat/completions` |
| `glm-*`, `chatglm-*` | 智谱 (Zhipu) | `https://open.bigmodel.cn/api/paas/v4` | `openai-completions` → `/v1/chat/completions` |
| `qwen-*`, `qwq-*`, `qvq-*` | 阿里通义 (DashScope) | `https://dashscope.aliyuncs.com/compatible-mode/v1` | `openai-completions` → `/v1/chat/completions` |
| `moonshot-*`, `kimi-*` | 月之暗面 (Moonshot) | `https://api.moonshot.cn/v1` | `openai-completions` → `/v1/chat/completions` |
| `doubao-*`, `ep-*` | 火山引擎 (豆包) | `https://ark.cn-beijing.volces.com/api/v3` | `openai-completions` → `/v1/chat/completions` |
| `minimax-*`, `abab-*` | MiniMax | `https://api.minimax.chat/v1` | `openai-completions` → `/v1/chat/completions` |
| `yi-*` | 零一万物 (01.AI) | `https://api.lingyiwanwu.com/v1` | `openai-completions` → `/v1/chat/completions` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 41)May include surrounding context.

md
| `qwen-*`, `qwq-*`, `qvq-*` | 阿里通义 (DashScope) | `https://dashscope.aliyuncs.com/compatible-mode/v1` | `openai-completions` → `/v1/chat/completions` |
| `moonshot-*`, `kimi-*` | 月之暗面 (Moonshot) | `https://api.moonshot.cn/v1` | `openai-completions` → `/v1/chat/completions` |
| `doubao-*`, `ep-*` | 火山引擎 (豆包) | `https://ark.cn-beijing.volces.com/api/v3` | `openai-completions` → `/v1/chat/completions` |
| `minimax-*`, `abab-*` | MiniMax | `https://api.minimax.chat/v1` | `openai-completions` → `/v1/chat/completions` |
| `yi-*` | 零一万物 (01.AI) | `https://api.lingyiwanwu.com/v1` | `openai-completions` → `/v1/chat/completions` |
| `ernie-*`, `baidu-*` | 百度文心 | `https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop` | `openai-completions` |
| `grok-*` | xAI (Grok) | `https://api.x.ai/v1` | `openai-completions` → `/v1/chat/completions` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 42)May include surrounding context.

md
| `moonshot-*`, `kimi-*` | 月之暗面 (Moonshot) | `https://api.moonshot.cn/v1` | `openai-completions` → `/v1/chat/completions` |
| `doubao-*`, `ep-*` | 火山引擎 (豆包) | `https://ark.cn-beijing.volces.com/api/v3` | `openai-completions` → `/v1/chat/completions` |
| `minimax-*`, `abab-*` | MiniMax | `https://api.minimax.chat/v1` | `openai-completions` → `/v1/chat/completions` |
| `yi-*` | 零一万物 (01.AI) | `https://api.lingyiwanwu.com/v1` | `openai-completions` → `/v1/chat/completions` |
| `ernie-*`, `baidu-*` | 百度文心 | `https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop` | `openai-completions` |
| `grok-*` | xAI (Grok) | `https://api.x.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `gemini-*` | Google Gemini | `https://generativelanguage.googleapis.com/v1beta` | 特殊接口,需单独处理 |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 44)May include surrounding context.

md
| `minimax-*`, `abab-*` | MiniMax | `https://api.minimax.chat/v1` | `openai-completions` → `/v1/chat/completions` |
| `yi-*` | 零一万物 (01.AI) | `https://api.lingyiwanwu.com/v1` | `openai-completions` → `/v1/chat/completions` |
| `ernie-*`, `baidu-*` | 百度文心 | `https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop` | `openai-completions` |
| `grok-*` | xAI (Grok) | `https://api.x.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `gemini-*` | Google Gemini | `https://generativelanguage.googleapis.com/v1beta` | 特殊接口,需单独处理 |
| `mistral-*`, `codestral-*` | Mistral | `https://api.mistral.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `mimo-*` | 小米 (MiMo) | `https://api.xiaomimimo.com/anthropic` | `anthropic-messages` → `/v1/messages` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 46)May include surrounding context.

md
| `ernie-*`, `baidu-*` | 百度文心 | `https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop` | `openai-completions` |
| `grok-*` | xAI (Grok) | `https://api.x.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `gemini-*` | Google Gemini | `https://generativelanguage.googleapis.com/v1beta` | 特殊接口,需单独处理 |
| `mistral-*`, `codestral-*` | Mistral | `https://api.mistral.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `mimo-*` | 小米 (MiMo) | `https://api.xiaomimimo.com/anthropic` | `anthropic-messages` → `/v1/messages` |

**未匹配时:** 自动搜索 "[model_name] API documentation base_url" 确认配置。

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 47)May include surrounding context.

md
| `grok-*` | xAI (Grok) | `https://api.x.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `gemini-*` | Google Gemini | `https://generativelanguage.googleapis.com/v1beta` | 特殊接口,需单独处理 |
| `mistral-*`, `codestral-*` | Mistral | `https://api.mistral.ai/v1` | `openai-completions` → `/v1/chat/completions` |
| `mimo-*` | 小米 (MiMo) | `https://api.xiaomimimo.com/anthropic` | `anthropic-messages` → `/v1/messages` |

**未匹配时:** 自动搜索 "[model_name] API documentation base_url" 确认配置。

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Instructing the agent to automatically search the web for unknown models expands the skill beyond validation into unbounded external data retrieval. That can leak user intent or model names to third parties and introduces prompt-injection or misinformation risk from untrusted search results into a workflow that may subsequently write configuration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This section instructs network connectivity tests and real API calls to external endpoints using bearer or API-key authentication. While functional for validation, it creates deliberate external transmission of credentials and request data; in this skill's context the danger is elevated because execution may be automatic after config changes rather than explicitly user-initiated each time.

Content

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

3. 网络连通性检查

使用 exec 执行 curl 测试每个 provider 的 baseUrl 是否可达:

bash
curl -s -o /dev/null -w "%{http_code}" --connect-timeout 5 "<baseUrl>"

External Transmission

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

The network reachability check makes an outbound request to whatever baseUrl is present in configuration, which leaks network metadata and may contact attacker-controlled endpoints if configuration is malicious or tampered with. In this skill, automatic execution after model configuration changes increases the risk of SSRF-like behavior against arbitrary URLs, including internal services, because there is no allowlist or URL validation.

Content

Scanner excerpt · scripts/check_models.sh (reported line 131)May include surrounding context.

sh
echo -e "   ${GREEN}✅ 配置完整${NC}"

    # Network check
    HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 5 "$BASEURL" 2>/dev/null)
    if [ "$HTTP_CODE" = "000" ]; then
        echo -e "   ${RED}❌ 网络不可达${NC}"
        ISSUES+=("${NAME}: 网络不可达")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script performs live POST requests to configured model endpoints using the stored API key and sends a test prompt without any confirmation, dry-run mode, or clear disclosure that secrets and data will be transmitted off-host. In a diagnostic skill this behavior is expected functionally, but it still creates a real security/privacy risk because running the check automatically after config changes can trigger unintended external calls to attacker-controlled or misconfigured base URLs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This POST request sends the configured API key in an Authorization header and transmits a prompt to the configured endpoint, which is a direct external secret/data transmission. If baseUrl points to an untrusted, compromised, or internal relay endpoint, the key can be exposed and reused, and the skill context makes this more dangerous because it is designed to auto-run after configuration updates.

Content

Scanner excerpt · scripts/check_models.sh (reported line 173)May include surrounding context.

sh
OAI_URL="${BASEURL%/}/chat/completions"
            fi

            curl -s -X POST "$OAI_URL" \
                -H "Content-Type: application/json" \
                -H "Authorization: Bearer ${APIKEY}" \
                -d "{\"model\":\"${MODEL_ID}\",\"messages\":[{\"role\":\"user\",\"content\":\"reply ok\"}],\"max_tokens\":512}" \

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comments and runtime output strings are written in Chinese throughout the script, which imposes a specific language on users without offering an opt-in or documenting a locale-specific requirement. This is a natural-language policy issue because the file does not indicate that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.