Back to skill

Security audit

Baidu Search 1.1.3

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Baidu web search skill, with normal cautions around storing an API key and sending searches to Baidu.

Before installing, treat BAIDU_API_KEY as a secret: do not commit or share your OpenClaw config, restrict access to it, and rotate the key if exposed. Use this skill only for queries you are comfortable sending to Baidu's external service.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requires environment access for BAIDU_API_KEY and performs network operations, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can let the skill execute with broader capabilities than reviewers or runners can easily validate, increasing the risk of secret exposure or unintended outbound access.

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 · references/apikey-fetch.md (reported line 11)May include surrounding context.

md
Visit: **https://console.bce.baidu.com/ai-search/qianfan/ais/console/apiKey**

- Log in to your Baidu Cloud account
- Create an application or view existing API keys
- Copy your **API Key** (only API Key is needed)

### 2. Configure OpenClaw

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide instructs users to place a live API key in a plaintext local configuration file but does not mention that the key is a sensitive secret, should be protected with restrictive file permissions, and must not be committed, shared, or logged. This can lead to accidental disclosure through backups, screenshots, shell history, support bundles, or source control, enabling unauthorized use of the Baidu service under the user's account.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/search.py (reported line 19)May include surrounding context.

python
}

    # 使用POST方法发送JSON数据
    response = requests.post(url, json=requestBody, headers=headers)
    response.raise_for_status()
    results = response.json()
    if "code" in results:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code sends the request body, including the user-provided query, to an external HTTP endpoint. Although the script prints parse/debug output and errors, it does not clearly disclose to the user that their query content will be transmitted to Baidu, and no inline comment/docstring warns about that privacy-relevant behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.