Back to skill

Security audit

web-search-skill

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward web search skill, with ordinary privacy and dependency risks from sending queries to Baidu/Bing and installing Python packages.

Install only if you are comfortable with your search terms being sent to Baidu and Bing. Do not use it for passwords, tokens, confidential internal names, or private personal data, and prefer installing dependencies in an isolated virtual environment with pinned package versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding
Unpinned Runtime Dependencies Create a Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:16` **Vulnerability Type**: Unpinned third-party dependencies installed from a mutable package source **Risk Level**: Medium **Complete Code Snippet**: ```bash pip install requests beautifulsoup4 lxml -q ``` ### Technical Analysis The installation command retrieves `requests`, `beautifulsoup4`, `lxml`, and their transitive dependencies without version constraints, cryptographic hashes, a lock file, or an explicitly configured trusted package index. Consequently, the dependencies installed in the future may differ from those reviewed during this audit. This does not prove that any currently named package is malicious. However, it creates a supply-chain exposure: compromise of a package release, maintainer account, transitive dependency, or configured package repository could cause attacker-controlled code to be installed or imported. ### Attack Path 1. An attacker compromises a named dependency, one of its transitive dependencies, its publication account, or a package source used by the environment. 2. The attacker publishes a malicious release that satisfies the unconstrained installation request. 3. A user follows the documented dependency-check procedure and runs the provided `pip install` command. 4. `pip` resolves and installs the malicious or compromised release. 5. Attacker-controlled code executes during an applicable installation/build step or when the search script imports the affected package. ### Impact Assessment Malicious dependency code would generally execute with the privileges of the user running `pip` or invoking the Skill. It could access that user's readable files and environment variables, alter user-writable files, make network requests, or affect subsequent Skill behavior. If installation is performed with elevated privileges, the potential scope increases accordingly. The reviewed project itself contained no credential access, persistence ...[truncated 181 chars]
Remediation
## Remediation Suggestions 1. Move dependencies into a version-controlled requirements or lock file and pin exact, reviewed versions, including transitive dependencies. 2. Generate and verify cryptographic hashes, then install with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Configure an explicit, trusted package index rather than relying on ambient user or system pip configuration. 4. Review and update pinned packages through a controlled dependency-update process with vulnerability and provenance checks. 5. Install dependencies in an isolated virtual environment without administrative privileges. 6. Avoid suppressing installation output with `-q` in security-sensitive setup documentation so source, resolution, and verification failures remain visible.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Vague Triggers

High
Confidence
98% confidence
Finding
The description says the skill should be used whenever the user needs to search for any network information or query any content online, which is an extremely broad activation rule. Overly broad routing can cause the agent to invoke networked behavior for ordinary requests, unnecessarily exposing user queries to external services and expanding the attack surface.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill enables network access by invoking a search script and scraping external search engines, but the manifest does not declare any explicit tool scope or permissions boundary. This makes the skill's capabilities less transparent to the host agent and increases the chance it will be invoked with broader authority than intended.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The workflow instruction '当用户需要搜索信息时' is ambiguous and lacks clear decision boundaries for activation. In practice, this can lead to opportunistic or unnecessary web access, which is especially risky in a network-enabled skill because it may send sensitive or private prompts to external search engines.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The file presents all user prompts, headings, and usage examples exclusively in Chinese, which indicates a fixed language expectation. Under the policy rules, language constraints should either provide user opt-in/choice or be clearly justified as region-specific; neither is present here.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The Accept-Language header hard-codes a preference for zh-CN and zh, which can influence returned content language and locale behavior for all users. There is no opt-in, configuration option, or documented regional constraint justifying this forced locale preference.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The function sends the raw user-provided query to Baidu over the network, which discloses potentially sensitive user input to a third party without any explicit notice or consent mechanism in the tool itself. In a search skill, this behavior is expected functionally, but it is still a real privacy/security issue because prompts may contain secrets, internal names, or personal data that users do not realize will be transmitted externally.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This code transmits the user query to Bing, creating the same third-party data disclosure risk as the Baidu path. Although external transmission is inherent to a web-search skill, the absence of an explicit warning, consent prompt, or sensitivity checks means users may unintentionally leak confidential information.

Static analysis

No suspicious patterns detected.