Back to skill

Security audit

Web Search Enhanced

Security checks for vulnerabilities and agentic risk

Overview

This skill claims to enhance web search, but its code does not perform real web searches and also uses an unsafe local temporary file for search state.

Do not rely on this as a real web search tool unless it is changed to call a verifiable search provider and to store state safely. Installing it may produce simulated results and may create, overwrite, or delete a predictable temporary file in the working directory.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T07 · Tool Hijacking and Spoofing

Error
Location
index.ts:55
Finding

Fabricated Search Results Presented as Genuine Web Search Output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.ts:83
Finding

Predictable Shared Temporary File Enables Cross-Session Contamination and Symlink-Based File Overwrite

Content
View full analysis
{ const content = `### 搜索结果 ###\n${results.join("\n\n")}`; await this.writeFile(TEMP_RESULTS_FILE, content); } private async cleanupTempResults(): Promise { try { await this.removeFile(TEMP_RESULTS_FILE); } catch { // 忽略清理失败 } } private async writeFile(path: string, content: string): Promise { const fs = require("fs"); fs.writeFileSync(path, content); } private async removeFile(path: string): Promise { const fs = require("fs"); try { fs.unlinkSync(path); } catch { // 忽略 } } ``` ### Technical Analysis All invocations use the same predictable relative filename, `.web-search-temp-results.md`, in the process working directory. The state is not isolated by user, invocation, query, or session. The file is created with `fs.writeFileSync()` without: - Exclusive creation. - An unpredictable filename. - Restrictive permissions. - Symbolic-link checks. - Atomic replacement. - File locking or concurrency control. - A trusted temporary directory. If multiple invocations run concurrently or a previous invocation terminates before cleanup, one invocation can read, overwrite, merge, or delete another invocation's state. Because the code follows ordinary filesystem path resolution, a local attacker who can modify the working directory can pre-create the predictable path as a symbolic link. A subsequent write can then overwrite the symlink target, provided that the Skill process has permission to write that target. The synchronous filesystem operations also block the event loop, although the principal security concern is the use of shared and attacker-influenceable filesystem state. ### Attack Path ...[truncated 1661 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
index.ts:88
Finding

Network Fetch API Incorrectly Used for Local File Access

Content
View full analysis
{ try { return await webFetch(path, { extractMode: "text" }); } catch { throw new Error("文件不存在"); } } ``` ### Technical Analysis The implementation writes temporary state using Node.js filesystem APIs but attempts to read the same relative local path through `webFetch()`, which is a web/network retrieval API. A relative filename such as `.web-search-temp-results.md` is not reliably equivalent to a local filesystem read. Depending on the runtime's `webFetch()` behavior, the call may: - Fail because the value is not a valid web URL. - Resolve the relative path against an implicit base URL. - Initiate an unintended network request. - Be rejected by protocol or sandbox restrictions. The broad `catch` block converts every failure into a generic “file does not exist” error. This hides malformed URL errors, network failures, permission failures, and other runtime problems. The caller then treats the failure as an empty result set, undermining the claimed pagination and checkpoint behavior. No attacker-controlled path is passed into this method in the reviewed implementation; therefore, arbitrary URL fetching through this method was not established. The confirmed issue is the unsafe mismatch between the storage and retrieval mechanisms, with unintended network activity dependent on runtime URL-resolution behavior. ### Attack Path 1. The Skill writes result state to a local relative path with `fs.writeFileSync()`. 2. It later passes that relative path to `webFetch()` instead of a filesystem read API. 3. The runtime either rejects the path or resolves it as a network resource. 4. Any resulting error is misreported as a missing local file. 5. The Skill discards or misinterprets saved state, causing incorrect mer ...[truncated 813 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The skill documentation is entirely in Chinese and provides no indication that users may interact in another language or choose their preferred locale. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises saving intermediate results to temporary storage and supporting resume behavior, but it does not warn users that search content may be persisted beyond a single response. This creates a privacy and data-handling risk because users may provide sensitive queries or retrieved content without realizing it will be stored, even temporarily.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrase '帮我查找 [搜索内容]' is extremely broad and overlaps with normal conversational requests, which can cause the skill to activate unintentionally during routine user interactions. In a search skill that stores intermediate results and supports resumable operation, accidental activation increases the chance of unexpected data collection, persistence, and tool use without clear user awareness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language comments, trigger handling, and user-facing error/output strings are all written in Chinese, and the trigger parsing specifically expects Chinese phrasing such as '帮我', '查我', or '搜我'. This imposes a language-specific interaction model without offering user opt-in or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code treats webFetch(path, { extractMode: "text" }) as if it were a local file read, which blurs the boundary between local state and network-accessible resources. This can cause the tool to ingest attacker-controlled content if webFetch resolves non-local targets or special URI schemes, making the temporary-results logic susceptible to untrusted input, data confusion, or SSRF-like behavior depending on the runtime.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill writes to and deletes a local file in the current working directory without a clearly justified need and without isolation from other runs. Even though the filename is constant and not user-controlled, this creates unintended side effects, can overwrite pre-existing files with the same name, and introduces cross-session data leakage or tampering risks in shared environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill performs write and delete operations on the local filesystem without informing the user or obtaining confirmation. In agent environments, hidden side effects are dangerous because they violate least surprise, can destroy pre-existing files with the same name, and make it harder for users to assess what the tool will modify on their system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description is entirely in Chinese and presents the skill as a Chinese-language experience without indicating any user language choice or locale-specific scope. This can violate language/locale policy when a skill implicitly forces one language for all users without opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.