Back to skill

Security audit

openclaw-fallback-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a cloud-model fallback helper, but it appears to send conversations to the configured API far more often than disclosed and includes a secret-shaped API key in its package.

Review this carefully before installing. Use only a trusted endpoint, rotate or remove the packaged API-key-shaped value, and do not enable the skill for sensitive conversations unless the fallback bug is fixed, metadata forwarding is removed or minimized, and remote transfers are clearly logged or gated by user/admin consent.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:65
Finding

Unconditional Transmission of User Messages, Conversation History, and Metadata

Content
View full analysis
lowerResponse.includes(keyword))) { return true; } // Scenario 4: response is overly generic const genericPatterns = [ /^这是一个好问题/, /^that's a good question/, /^i understand/ ]; if (genericPatterns.some(pattern => pattern.test(response))) { return true; } return true; } ``` The data sent after the unconditional fallback decision includes the current message and recent conversation history: ```js async getCloudResponse(userMessage, context) { const sessionId = context.sessionId || 'default'; // Retrieve conversation history let history = this.conversationHistory.get(sessionId) || []; // Build the remote model message list const messages = [ { role: 'system', content: this.buildSystemPrompt(context) }, ...history.slice(-10), { role: 'user', content: userMessage } ]; ``` Optional user metadata is also incorporated into the remote system prompt: ```js buildSystemPrompt(context) { const basePrompt = `你是一个智能助手,正在帮助用户解决问题。 请提供准确、详细、有帮助的回答。 如果问题涉及实时信息或你不确定的内容,请诚实说明。`; if (context.metadata && context.metadata.userInfo) { return `${basePrompt}\n\n用户信息: ${JSON.stringify(co ...[truncated 2324 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
config.json:3
Finding

Hard-Coded API Credential in Distributed Configuration

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states it will automatically call a configured cloud LLM API when the local model cannot answer, and it requests both network and configuration permissions including an API key. That means user prompts or contextual data may leave the local environment without any user-facing notice, consent flow, data minimization, or disclosure of what is transmitted, which creates a real privacy and data-governance risk.

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 · config.example.json (reported line 2)May include surrounding context.

json
{
  "apiUrl": "https://api.openai.com/v1/chat/completions",
  "apiKey": "sk-your-api-key-here",
  "modelName": "gpt-4",
  "fallbackThreshold": 0.6,

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The comment and docstring indicate this function determines whether fallback is needed based on several conditions, implying it may return either true or false. However, after checking the listed scenarios, the function unconditionally returns true at L098, so fallback is always triggered regardless of response quality or confidence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill forwards user messages, recent conversation history, and a system prompt containing optional user metadata to an external cloud API without any explicit consent, notice, redaction, or policy gating. In this skill's context, the risk is amplified because the buggy fallback logic causes cloud transmission effectively all the time, turning a fallback path into continuous third-party data exfiltration.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The system prompt injects context.metadata.userInfo directly into model context as plain text, which can expose sensitive user attributes to the external model and increase the chance that private details are echoed back in responses, logs, or provider-side retention. In this skill, that danger is higher because the metadata is sent alongside user content to a third-party API and fallback is effectively always triggered.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · readme.md (reported line 4)May include surrounding context.

md
安装步骤:
创建技能目录
Copy
mkdir -p ~/.openclaw/skills/openclaw-fallback-skill
cd ~/.openclaw/skills/openclaw-fallback-skill
创建配置文件
Copy

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The documentation explicitly configures an external API endpoint for cloud inference, which creates a real external transmission path for user inputs and possibly contextual data. In this skill's context, that transmission is core functionality, but it is still security-relevant because it can expose sensitive information to third parties if not clearly disclosed and controlled.

Content

Scanner excerpt · readme.md (reported line 19)May include surrounding context.

md
# 或直接重启你的 OpenClaw 进程
配置说明:
配置项	说明	示例
apiUrl	云端模型 API 地址	https://api.openai.com/v1/chat/completions
apiKey	API 密钥	sk-xxx
modelName	模型名称	gpt-4, claude-3-opus-20240229
fallbackThreshold	触发阈值(0-1)	0.6

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to configure a cloud model API endpoint and API key, which implies user prompts and model interactions may be transmitted to a third-party service. It does not warn about privacy, data handling, retention, or compliance implications, so users may unknowingly send sensitive local data off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented automatic fallback behavior is designed to switch to a cloud model transparently when the local model performs poorly. Without a clear warning and consent mechanism, this can cause sensitive prompts or system context to be sent externally without the user's awareness, increasing privacy and operational risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The advanced example shows another third-party API endpoint, reinforcing that the skill supports sending content to external services. This is not inherently malicious, but in the absence of strong warnings and controls it can lead to unintentional disclosure of sensitive prompts, credentials, or local context.

Content

Scanner excerpt · readme.md (reported line 37)May include surrounding context.

md
高级配置示例:
Copy
{
  "apiUrl": "https://api.deepseek.com/v1/chat/completions",
  "apiKey": "sk-deepseek-xxx",
  "modelName": "deepseek-chat",
  "fallbackThreshold": 0.5,

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is designed to automatically send requests to a configured cloud LLM whenever the local model fails or confidence drops below a threshold, but the manifest does not document any constraints on what data may be forwarded, when fallback is allowed, or whether user consent/sanitization is required. In a beforeResponse/modelFailure context, this can cause unintended transmission of sensitive prompts, conversation history, or internal context to an external endpoint, making data exfiltration through normal operation more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description is presented only in Chinese and does not indicate any user-selectable language or region-specific justification. Under the language/locale policy, this can be a violation when a skill imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language system prompt is written entirely in Chinese and instructs the assistant behavior in that locale, with no indication that users may choose another language. This can violate language/locale policy when a skill forces a specific language without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

All instructional text in the file is presented in Chinese, with no alternative language or note that the skill is intended for a Chinese-speaking audience. This can be a natural-language policy concern when a skill effectively forces a locale without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language description and configuration field descriptions are written only in Chinese, which can impose a language expectation without offering user choice or documenting a justified locale restriction. Under the stated policy, language constraints should be optional or clearly justified.

Content

No source excerpt is available for this finding.