Back to skill

Security audit

Hybrid Deep Search

Security checks for vulnerabilities and agentic risk

Overview

This looks like a search scaffold rather than malware, but it asks for broad command/network authority and does not clearly control or disclose external and paid routing risks.

Review before installing. Treat it as a prototype: it may not perform real search yet, it may route sensitive queries to external providers if completed, auto mode may trigger paid OpenAI usage, and the declared shell/network permissions should be narrowed before use in a sensitive workspace.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL_CN.md:1
Finding
Overly Broad Shell and Network Tool Permissions## Vulnerability Details **File Location**: `SKILL_CN.md:1-6` **Vulnerability Type**: Excessive tool permissions that violate least privilege **Risk Level**: Medium **Vulnerable Code Snippet**: ```yaml --- name: hybrid-deep-search description: Hybrid deep search using Brave API and OpenAI Codex with automatic routing argument-hint: [search query] [--mode quick|codex|auto] [--focus web|academic|news] allowed-tools: Bash(*:web_search), Bash(*:curl), Bash(*:python3) --- ``` ### Technical Analysis The skill grants access to general-purpose `curl` and Python execution through the Bash tool. These permissions are substantially broader than those required by the implemented query-routing behavior. The audited scripts do not invoke `curl`, and both search methods in `scripts/deep_search.py` return simulated results rather than performing network requests. General-purpose Python execution can run arbitrary local code, while `curl` can communicate with arbitrary network destinations. Consequently, the declared tool policy does not enforce least privilege or restrict operations to the stated search functionality. No malicious use of these permissions was found in the supplied package. The risk arises from the unnecessary capability exposed if skill instructions, arguments, or later modifications cause unintended tool invocation. ### Attack Path 1. A user loads or invokes the skill, making its declared Bash tool capabilities available. 2. Attacker-controlled or otherwise untrusted content influences a tool invocation. 3. The broad `Bash(*:python3)` permission is used to execute general-purpose Python code, or `Bash(*:curl)` is used to contact an arbitrary external destination. 4. Code running under the agent's operating-system identity accesses resources available to that identity. 5. Accessible data could be processed locally or transmitted through the permitted network tool. This path depends on an attacker obtaining ...[truncated 682 chars]
Remediation
## Remediation Suggestions 1. Remove `Bash(*:curl)` because the current implementation does not use it. 2. Replace unrestricted Python execution with a narrowly scoped permission that permits only the packaged entry point and expected arguments. 3. Permit only the specific search tool needed for the advertised functionality. 4. If direct HTTP access is added later, restrict requests to reviewed HTTPS endpoints and enforce destination allowlists, timeouts, response-size limits, and redirect controls. 5. Run the skill in a sandbox with minimal filesystem access, no unnecessary credentials, and restricted outbound networking. 6. Keep tool declarations synchronized with actual implementation so unused capabilities are removed during review.

T08 · Insecure Dependencies

Note
Location
SKILL.md:25
Finding
Unpinned and Unnecessary Third-Party Dependency Installation## Vulnerability Details **File Locations**: `SKILL.md:25-31`, `SKILL.md:215-218`, `README.md:25-31`, `README.md:259-262`, and `SKILL_CN.md:188-191` **Vulnerability Type**: Unpinned third-party dependencies from the active package index **Risk Level**: Low **Vulnerable Code Snippets**: ```bash pip install openai python-dotenv requests ``` ```bash pip install --upgrade openai python-dotenv requests ``` ```bash pip install openai python-dotenv ``` ### Technical Analysis The installation instructions request mutable package names without version constraints or cryptographic hashes. Package resolution therefore depends on the active pip index and whichever versions are current at installation time. This makes installations non-reproducible and prevents users from verifying that they received versions reviewed with the skill. The current Python scripts do not import `openai`, `python-dotenv`, or `requests`. `scripts/deep_search.py` only reads environment variables and returns simulated results. The recommended dependency installation therefore expands the supply-chain attack surface without supporting currently implemented behavior. No malicious or typosquatted package name was identified, and no compromised package was demonstrated. The finding concerns unsafe dependency-management practices and unnecessary dependency exposure. ### Attack Path 1. A user follows the documented installation command. 2. pip resolves the unpinned names through the user's configured package index or mirror. 3. A compromised release, compromised mirror, or unsafe future version is selected. 4. Package installation or subsequent import executes attacker-controlled package behavior under the user's account. 5. That behavior receives access to resources available to the installation or runtime process. Exploitation requires compromise or manipulation of a selected dependency or package source; the audited project does not itself host ...[truncated 643 chars]
Remediation
## Remediation Suggestions 1. Remove `openai`, `python-dotenv`, and `requests` from installation instructions until the implementation actually requires them. 2. If dependencies are introduced, pin reviewed versions in a lockfile or requirements file. 3. Use hash verification, such as pip's `--require-hashes`, for reproducible installations. 4. Configure installation to use a trusted package index and review any private-index precedence rules for dependency-confusion exposure. 5. Avoid indiscriminate `pip install --upgrade` commands in operational documentation. 6. Run dependency scanning and update pinned versions through a controlled review process. 7. Recommend installation in an isolated virtual environment under a non-privileged account.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Credential Access

High
Category
Privilege Escalation
Content
#### OpenAI Codex API (Optional for Deep Search)
```bash
# Get API Key from: https://platform.openai.com/api-keys

export OPENAI_API_KEY="sk-your-openai-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # Optional
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README instructs users to send queries either to Brave search or to OpenAI Codex, but it does not clearly warn that the full query content will be transmitted to third-party services. Users may unknowingly submit sensitive, proprietary, or personal data, creating a privacy and data-governance risk that is especially relevant for search and LLM workflows.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents use of environment-based credentials and external services but does not declare any explicit tool scope or permissions boundary. This weakens reviewability and can cause users or hosting systems to underestimate the skill's access to secrets and outbound capabilities.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill promotes web and Codex-backed search but does not clearly warn users that their queries may be transmitted to Brave/OpenAI or other third-party services. This creates privacy and compliance risk because users may submit sensitive internal data under the assumption the search is local.

External Transmission

Medium
Category
Data Exfiltration
Content
# Get API Key from: https://platform.openai.com/api-keys

export OPENAI_API_KEY="sk-your-openai-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # Optional
```

## Usage
Confidence
88% confidence
Finding
The skill is explicitly configured to send data to the OpenAI API, which is an external transmission path. In this context the issue is not that external connectivity exists, but that the transmission is insufficiently disclosed and may expose user queries or embedded sensitive information to a third party.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation mentions usage-based pricing and recommends auto mode, but it does not clearly warn that automatic routing can trigger paid OpenAI API usage. Users may incur unexpected charges simply by issuing a query that the router classifies as complex.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The configuration example places an API key directly in a local config file without any warning about secret storage risks. This encourages insecure credential handling, increasing the chance of accidental commits, local disclosure, or leakage through backups and logs.

External Transmission

Medium
Category
Data Exfiltration
Content
"openai_codex": {
    "enabled": true,
    "api_key": "YOUR_OPENAI_API_KEY_HERE",
    "base_url": "https://api.openai.com/v1",
    "model": "gpt-5-codex",
    "max_tokens": 4096,
    "temperature": 0.7
Confidence
88% confidence
Finding
The config example hardcodes an external base URL for OpenAI, reinforcing that the skill transmits content off-platform. Without strong disclosure and controls, users may unknowingly route sensitive research prompts or internal data to a third-party service.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill routes user queries to external services including OpenAI and web search, but the description does not clearly warn users that their prompts may be transmitted to third parties. This can lead to unintentional disclosure of sensitive internal data, credentials, customer information, or proprietary research if users assume the skill is local-only.

External Transmission

Medium
Category
Data Exfiltration
Content
# 设置环境变量
export OPENAI_API_KEY="sk-your-openai-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # 可选,默认官方端点
```

### 3. 配置文件
Confidence
98% confidence
Finding
The skill explicitly documents sending requests to `https://api.openai.com/v1`, confirming external data transmission. In context, the danger is not the endpoint itself but that user-supplied search content may leave the local environment and reach a third-party API, which matters if users input sensitive data.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This code file contains user-facing natural-language content in Chinese, beginning with the title and continuing through prompts, help text, and output messages. Because the skill presents a fixed language/locale experience without opt-in or justification, it conflicts with the policy against forcing a specific language without user choice.

External Transmission

Medium
Category
Data Exfiltration
Content
def __init__(self):
        self.router = QueryRouter()
        self.openai_api_key = os.getenv("OPENAI_API_KEY")
        self.openai_base_url = os.getenv("OPENAI_BASE_URL", "https://api.openai.com/v1")

    def search(
        self,
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest describes intelligent routing between two real search backends, but both `_search_brave` and `_search_codex` are implemented as stubs. The Brave path explicitly says real tool invocation is not present, and the Codex path only constructs a prompt and returns a mock success result, so the code behavior does not match the claimed operational search capability.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The `_search_codex` docstring says it 'uses OpenAI Codex search,' and success messages describe searches as completed or in progress, yet no API call is made. Similarly, the Brave path labels the engine as Brave API while noting only simulated results, creating contradictory intent signals in documentation and output.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The module description explicitly states behavior in Chinese, and the rest of the user-facing strings are also hard-coded in Chinese. This creates a language/locale policy issue because the skill does not offer user opt-in or a language selection path.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The primary descriptive and instructional content is presented in Chinese, and the document does not indicate that users can choose another language. This can violate a language/locale policy when a skill imposes a language without opt-in or justification.

Intent-Code Divergence

Low
Confidence
77% confidence
Finding
The documentation introduces a `--format` option with json/markdown/text modes, but the earlier Parameters table does not define this argument at all. This is not merely incomplete usage text; it presents a concrete documented capability that appears inconsistent with the declared interface and therefore creates intent-versus-implementation ambiguity for the skill.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The skill documentation is entirely in Chinese and presents the skill as if that locale is mandatory, with no indication that users may choose another language or that the skill is intentionally region-specific. Under the policy, forcing a specific language without opt-in or justification is a natural-language policy concern.

Intent-Code Divergence

Low
Confidence
79% confidence
Finding
The document says Brave API is '已内置' and can be used directly via OpenClaw's `web_search` tool with no additional configuration. That contradicts the stated architecture and branding of a Brave API path, because the implementation surface described here is actually a generic `web_search` tool call rather than a documented direct Brave API integration.

Intent-Code Divergence

Low
Confidence
74% confidence
Finding
The file documents `youtube` as a valid `--focus` value and later shows `--format` options, but the top-level argument hint only declares `[--mode quick|codex|auto] [--focus web|academic|news]`. This creates an intent/documentation mismatch within the skill definition about what arguments the skill actually supports.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This shell script presents its title and status messages in Chinese, which imposes a specific language on users without any opt-in or documented locale justification. The policy explicitly calls for flagging language or locale constraints when the skill does not offer a choice.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This markdown file is predominantly written in Chinese, including headings, test descriptions, and conclusions, with no indication that the user opted into that language or that the skill is intended only for a Chinese-speaking or region-specific audience. That creates a natural-language locale policy concern under the rule for forced language without user opt-in.

Static analysis

No suspicious patterns detected.