Back to skill

Security audit

baidu-search

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Baidu Qianfan search helper that sends user searches to Baidu using a user-supplied API key, with no evidence of hidden persistence, exfiltration, or destructive behavior.

Install only if you intend to use Baidu Qianfan's external search service. Treat search queries as data sent to Baidu, avoid putting secrets or regulated personal data in queries, prefer an environment variable over a persistent .env file for the API key, and consider pinning dependencies with a lockfile before production use.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Ae1

High
Category
analysis-evasion
Content
- `scripts/search.mjs` - 主搜索脚本,处理所有参数和API调用
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
const __dirname = path.dirname(__filename);

// Load environment variables
dotenv.config({ path: path.join(__dirname, '..', '.env') });

const API_ENDPOINT = 'https://qianfan.baidubce.com/v2/ai_search/web_search';
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The natural-language instructions from L010 onward require Chinese proficiency and do not provide an opt-in, alternative language, or justification that the skill is intended only for Chinese-speaking users. This creates a language/locale policy concern because the skill effectively forces a specific language without user choice.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation describes the external Baidu Qianfan endpoint and authentication details but does not clearly warn users that their search queries will be transmitted to a third-party cloud service. In a search skill, queries may contain sensitive user data, so lack of explicit disclosure can lead to unintentional privacy exposure and policy noncompliance.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The script sends the user's search query and optional filtering parameters to Baidu Qianfan's remote API, but it does not provide any explicit notice at execution time that user-supplied content is being transmitted off-device. In a search integration skill, this is expected behavior, but it still creates a privacy risk because users may enter sensitive queries without realizing they are being sent to a third-party service.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The manifest description is written only in Chinese ("百度千帆搜索API调用技能"), which can impose a specific language on users without any indication of language choice or opt-in. The policy for this audit flags language or locale constraints when they are not explicitly optional or justified.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"description": "百度千帆搜索API调用技能",
  "type": "module",
  "dependencies": {
    "commander": "^12.0.0",
    "dotenv": "^16.4.0"
  }
}
Confidence
92% confidence
Finding
The dependency uses a caret range (^12.0.0), which permits automatic installation of newer compatible releases. This creates supply-chain risk because future upstream changes or a compromised publisher account could introduce malicious or breaking code without any change to this repository.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"type": "module",
  "dependencies": {
    "commander": "^12.0.0",
    "dotenv": "^16.4.0"
  }
}
Confidence
92% confidence
Finding
The dotenv dependency is also specified with a caret range (^16.4.0), allowing npm to resolve newer patch/minor versions over time. In a security-sensitive integration that handles API keys, accepting unreviewed upstream updates increases the chance of supply-chain compromise or unexpected behavior affecting secret handling.

Static analysis

No suspicious patterns detected.