Back to skill

Security audit

fusion-search

Security checks for vulnerabilities and agentic risk

Overview

This is a real search skill, but it uses stealth browsing and unsafe Chromium settings while fetching arbitrary result pages without enough user control or network safeguards.

Install only in a contained environment with restricted outbound network access, especially blocking private networks and metadata endpoints. Avoid sending secrets or internal queries, and treat stealth browsing plus full-content fetching as behavior that may have policy or site-terms implications.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fusion_search.py:157
Finding
Unrestricted Server-Side Navigation Enables SSRF<![CDATA[ ## Vulnerability Details **File Location**: `scripts/fusion_search.py:157-184`, with the vulnerable function invoked at `scripts/fusion_search.py:302-307` **Vulnerability Type**: Server-Side Request Forgery through unrestricted browser navigation **Risk Level**: High ### Vulnerable Code ```python def fetch_full_content(page, url, timeout=8000): """全文抓取""" try: page.goto(url, wait_until="domcontentloaded", timeout=timeout) time.sleep(1.5) try: page.wait_for_load_state("networkidle", timeout=5000) except Exception: pass # 删除干扰元素 page.evaluate("""() => { for (const s of document.querySelectorAll( 'script, style, nav, header, footer, .ad, .sidebar, ' + '.comment, .popup, .modal, .cookie, .advertisement, ' + 'noscript, iframe, .related, .recommend, .share' )) s.remove(); }""") # 优先找主要内容区域 content = page.evaluate("""() => { const main = document.querySelector('article, main, .content, ' + '.post, .article, #content, #main, .entry-content, ' + '.post-content, [role="main"]'); if (main) return main.innerText; return document.body ? document.body.innerText : ''; }""") content = re.sub(r'\s+', ' ', content).strip() return content[:8000] except Exception: return "" ``` The URL is taken directly from search results: ```python for i, r in enumerate(results[:count]): content = fetch_full_content(page, r["url"], timeout=10000) if content: results[i]["content"] = content ``` ### Technical Analysis The full-content extraction feature navigates to search-result URLs without validating: - The URL scheme - The destination hostname - The resolved IP address - Redirect destinations - Loopback, private, link-local, or reserved address ranges - Cloud metadata endpoints - DNS ...[truncated 2264 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only explicitly supported schemes, normally `https` and, if necessary, `http`. 2. Resolve the destination hostname before navigation and reject every address in: - Loopback ranges - RFC1918 private ranges - Link-local ranges - Carrier-grade NAT ranges - Multicast and reserved ranges - IPv6 loopback, unique-local, and link-local ranges - Known cloud metadata addresses 3. Validate every redirect destination rather than only the original result URL. 4. Pin the validated IP for the connection or use a controlled outbound proxy to prevent DNS rebinding. 5. Apply an outbound network policy that prevents the browser container from reaching internal networks and metadata endpoints. 6. Consider restricting full-content extraction to an explicit user request instead of enabling it automatically through routing rules. 7. Use a strict destination allowlist where operationally possible. 8. Return an explicit validation error rather than silently navigating to an unsafe destination. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fusion_search.py:39
Finding
Chromium Sandbox and Web Security Protections Are Disabled<![CDATA[ ## Vulnerability Details **File Location**: `scripts/fusion_search.py:39-58` **Vulnerability Type**: Unsafe browser security configuration **Risk Level**: High ### Vulnerable Code ```python _browser = _playwright.chromium.launch( headless=True, args=[ '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage', '--disable-blink-features=AutomationControlled', '--disable-infobars', '--disable-extensions', '--disable-background-networking', '--disable-sync', '--metrics-recording-only', '--disable-default-apps', '--no-first-run', '--disable-component-extensions-with-background-pages', '--disable-features=IsolateOrigins,site-per-process', '--disable-site-isolation-trials', '--disable-web-security', '--allow-running-insecure-content', ] ) ``` ### Technical Analysis The Skill loads untrusted search-engine pages and arbitrary search-result pages in Chromium while disabling several critical security boundaries: - `--no-sandbox` disables Chromium's process sandbox. - `--disable-web-security` weakens same-origin and related web security controls. - `--disable-features=IsolateOrigins,site-per-process` disables important site-isolation behavior. - `--disable-site-isolation-trials` further suppresses site-isolation protections. - `--allow-running-insecure-content` permits active insecure content in otherwise secure pages. Search and full-content extraction do not require these protections to be disabled. Anti-automation behavior can be implemented without removing the browser sandbox or origin security model. Because search-result pages are attacker-influenced, the browser must be treated as an untrusted-content execution environment. Removing sandboxing and site isolation significantly increases the consequences of a Chromium renderer vulnerability or malicious cross-origin content. ### Attack Path 1. An attacker publ ...[truncated 1345 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the following Chromium arguments: - `--no-sandbox` - `--disable-web-security` - `--disable-features=IsolateOrigins,site-per-process` - `--disable-site-isolation-trials` - `--allow-running-insecure-content` 2. Run Chromium as a dedicated, unprivileged operating-system user. 3. Execute the browser inside a hardened container or equivalent isolation boundary. 4. Use a read-only filesystem where possible and expose only a dedicated temporary directory. 5. Drop unnecessary Linux capabilities and apply seccomp, AppArmor, or SELinux restrictions. 6. Restrict outbound network access to approved public destinations and block internal network ranges. 7. Keep Chromium and Playwright patched and version-compatible. 8. Treat stealth modifications as fingerprinting changes only; do not weaken browser security controls to improve anti-bot compatibility. ]]>

T08 · Insecure Dependencies

Note
Location
metadata.json:15
Finding
Playwright and Chromium Dependencies Are Not Version-Pinned<![CDATA[ ## Vulnerability Details **File Location**: `metadata.json:15-17`; installation instructions at `SKILL.md:42-45` **Vulnerability Type**: Unpinned third-party dependency and browser artifact **Risk Level**: Low ### Vulnerable Code The project metadata declares Playwright without a version constraint: ```json "dependencies": [ "playwright" ] ``` The installation instructions retrieve the current package and browser artifact: ```bash pip install playwright playwright install chromium ``` ### Technical Analysis The project does not pin Playwright to a reviewed version and does not provide a lockfile or package hashes. The Chromium installation command similarly retrieves a browser artifact selected by whichever Playwright version is installed. As a result: - Installations are not reproducible. - Future Playwright releases are implicitly trusted. - The installed Chromium revision can change without changes to this project. - Compatibility or security behavior may vary between installations. - A compromise of the upstream package or artifact distribution path would affect subsequent installations. No evidence was found that the current `playwright` package name is a typosquat or malicious dependency. The issue is the absence of version and integrity controls rather than a confirmed malicious package. ### Attack Path 1. A user follows the documented installation procedure. 2. `pip` resolves the latest Playwright version available from the configured package index. 3. The unreviewed package is installed without hash verification. 4. `playwright install chromium` downloads the browser build associated with that version. 5. If an upstream release, package index, mirror, or artifact channel is compromised, attacker-controlled installation or runtime code may execute with the installing user's privileges. ### Impact Assessment Potential impact includes: - Execution of compromised dependency installation or runtime code - Installation of an unrevi ...[truncated 387 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin Playwright to an exact reviewed version, for example through a locked requirements file. 2. Use `pip --require-hashes` with cryptographic hashes for all Python distributions. 3. Commit a reproducible dependency lockfile generated from a controlled environment. 4. Document and verify the expected Chromium revision associated with the pinned Playwright release. 5. Retrieve packages and browser artifacts through an approved, integrity-checked registry or internal mirror. 6. Add automated dependency scanning and scheduled review of security advisories. 7. Test upgrades separately before updating the pinned dependency and Chromium revision. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding
The documented behavior substantially overstates what the implementation appears to do, including anti-bot browsing, multi-engine routing, and full-content fetching. This mismatch is dangerous because reviewers and users may grant trust, permissions, or operational approval based on inaccurate claims, obscuring the real attack surface and preventing effective risk assessment.

Vague Triggers

High
Confidence
97% confidence
Finding
The trigger keywords include very generic terms such as '搜索', '最新', '是什么', 'search', and 'find', which are likely to activate during ordinary conversation. Over-broad triggering can cause unintended network searches or content fetching, exposing user prompts to external services and invoking the skill in contexts where the user did not explicitly consent.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares a network-capable search tool and references file-backed scripts, but the manifest does not constrain permissions or allowed tools. In practice this weakens least-privilege controls, making it easier for the skill to perform broader network or local file interactions than a reviewer or runtime policy might expect.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill advertises external search and optional full-page content retrieval but does not clearly warn that user queries and fetched URLs will be transmitted to third-party services. This creates privacy and compliance risk because sensitive prompts, internal terms, or browsing targets could be disclosed outside the local environment without informed consent.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill describes stealth.js-based anti-detection browsing and anti-crawling evasion without clearly warning operators about the resulting network and policy implications. Anti-detection behavior can bypass normal expectations of transparent automation, potentially violating site terms, triggering security monitoring issues, or creating legal and reputational exposure for the deploying environment.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The Bing CN URL forces `mkt=zh-CN`, `setlang=zh-CN`, and `cc=CN`, and the file overall defines multiple engines with fixed `language` values such as `zh` and `en`. This is a natural-language locale policy concern because the skill imposes language/region behavior rather than offering a user choice or documenting an explicit region-specific limitation.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The Playwright browser context is hard-coded to use locale="zh-CN" and timezone_id="Asia/Shanghai", which imposes a specific language/locale behavior on all searches. This matches the policy category for language or locale constraints because the file provides no user opt-in or alternative locale selection.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The secondary browser context used for fetching full page content again hard-codes locale="zh-CN". Repeating the locale restriction in this path means the entire skill consistently enforces a specific locale rather than letting the user choose.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The code classifies any query containing Chinese characters as "zh" and all others as "en", creating a hard language/locale decision with no user choice. This can violate language/locale policy because the skill behavior is forced by heuristic detection rather than explicit user opt-in or a documented justified regional scope.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The URL builder defaults the language parameter to "zh-CN", which imposes a specific locale on generated search requests unless callers override it. This is a natural-language policy concern because it forces a locale preference without visible user opt-in in this file.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This script deliberately alters multiple browser fingerprint surfaces (webdriver, plugins, languages, platform, hardware, permissions, canvas, and WebGL) to evade bot and anti-automation detection. In a search skill using Playwright and explicitly advertising anti-crawling bypass, this meaningfully increases the ability to access services in ways operators may not expect, creating abuse, compliance, and account/IP blocking risk.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
Forcing navigator.languages to a Chinese-first locale overrides the real client profile and can be used to influence content delivery while also contributing to fingerprint spoofing. In this context, it makes the stealth behavior more targeted and deceptive, potentially causing region-specific scraping behavior, misleading downstream services, and inconsistent or biased results without user awareness.

Static analysis

No suspicious patterns detected.