Back to skill

Security audit

博查搜索

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Bocha web search helper that sends user-entered queries to Bocha's API using a user-provided API key.

Install only if you intend to use Bocha's external search API. Provide a dedicated Bocha API key, review Bocha's handling of submitted queries, and avoid searching for secrets, credentials, private customer data, or confidential internal names unless that disclosure is acceptable.

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill documents use of an environment variable for an API key but does not declare any tool scope, permissions, or allowed-tools metadata to make that capability explicit. This creates a transparency and governance gap: an agent or reviewer may not realize the skill depends on environment access, which can lead to overbroad secret exposure or accidental execution in contexts where env access should be denied.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill sends user-provided search queries to a third-party service, but the documentation does not clearly warn users that their input leaves the local system and is transmitted to Bocha's external API. This can cause unintentional disclosure of sensitive prompts, internal project names, credentials pasted into queries, or other confidential data to an outside provider.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Natural-language strings in the file, including the top-level documentation and help output, are presented only in Chinese. This imposes a specific language on users without opt-in or explanation, which matches the language/locale policy violation criteria.

External Transmission

Medium
Category
Data Exfiltration
Content
const https = require('https');

// 配置
const API_URL = 'https://api.bocha.cn/v1/web-search';
// API Key 优先级: 环境变量 > 配置文件 > 默认值
const CONFIG_PATH = require('path').join(__dirname, '..', 'config.json');
let configKey = null;
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The CLI usage output shown to users at runtime is entirely in Chinese and does not offer an alternative language. This is a user-facing locale restriction rather than an internal implementation detail, so it falls under the policy's language-choice concern.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
SQP-3 applies to natural-language policy violations in all file types, including markdown. A skill that effectively forces a single language can violate language/locale policy when it provides no opt-in, alternative language option, or justification for the restriction.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The file header documents only one credential source: `BOCHA_API_KEY` from the environment. However, the implementation explicitly reads `config.json` and uses `apiKey` from that file as a fallback. This is a direct documentation-to-code contradiction about how credentials are sourced.

Missing User Warnings

Low
Confidence
90% confidence
Finding
This code sends the user's query to a remote HTTPS endpoint in bochaSearch, which is a network operation that transmits user-provided data off-system. While the file comments describe usage and the API endpoint, they do not clearly warn users that their query content will be sent to a third-party service.

Static analysis

No suspicious patterns detected.