Back to skill

Security audit

baidu-search-CLI

Security checks for vulnerabilities and agentic risk

Overview

This is a small Baidu web-search CLI skill that sends an explicit search JSON request to Baidu using a user-provided API key, with no hidden install scripts or persistence.

Install only if you intend to use Baidu's AI search API and are comfortable sending your search terms, filters, and API authorization to Baidu. Edit search_request.json for your own query and avoid including confidential, regulated, or internal-only information in search requests.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly instructs sending user-supplied search content and related parameters to Baidu's remote API using curl, but it does not warn users that their queries leave the local system or may be processed by a third party. This creates a real privacy and data-handling risk, especially if users search sensitive internal, personal, or regulated information.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The curl command performs direct external transmission of request data to a third-party Baidu endpoint, including user query content and authentication context. In the skill context, this is expected functionality for web search, but it is still security-relevant because sensitive data could be exfiltrated off-system if users or upstream agents place confidential content into search_request.json.

Content

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

4.如果环境变量BAIDU_API_KEY存在但curl返回身份验证错误,返回信息:APIKEY验证失败,请检查你的环境APIKEY是否设置正确

bash

curl -X POST -H "Authorization: Bearer apikey" -H "X-Appbuilder-From: openclaw" -H "Content-Type: application/json" -d "@search_request.json" "https://qianfan.baidubce.com/v2/ai_search/web_search"

Request Param

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The JSON payload fixes the user message content to "中国新闻", which imposes a specific language/locale in a natural-language field. Per the policy, language constraints should not be forced unless the skill offers user choice or clearly documents a justified locale-specific scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The instructions and prescribed returned messages are all in Chinese, which can impose a specific language on users without opt-in. Under the natural-language policy rule, forcing a language or locale without user choice is a policy concern unless the skill clearly documents a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.