Back to skill

Security audit

深度内容搜索

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed Chinese content-search scraper, but its weak WeChat URL validation can make the agent request unintended internal or arbitrary URLs, and its file output can overwrite user-chosen paths.

Install only if you are comfortable with search terms and pasted URLs being sent to Chinese search/content services. Avoid using it with private links, secrets, internal hostnames, or sensitive research terms, and do not let an agent pass untrusted URLs or arbitrary --output paths without review. A safer version should strictly validate WeChat URLs, block private-network destinations and redirects, pin dependencies, and require confirmation before overwriting files.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/deep_search.py:1367
Finding

Server-Side Request Forgery Through Inadequate WeChat URL Validation

Content
View full analysis
Optional[WechatArticle]: """获取微信公众号文章内容""" wechat_url = url if 'weixin.sogou.com' in url: wechat_url = self._extract_wechat_url_from_js(url) if not wechat_url: return None resp = self.session.get(wechat_url, timeout=30) ``` ```python def is_wechat_url(text: str) -> bool: """检测是否为微信公众号链接""" return 'mp.weixin.qq.com' in text and ('/s' in text or '/s?' in text) def fetch_wechat_url(url: str, json_output: bool = False) -> str: """直接获取微信公众号文章内容""" print(f"📱 直接解析微信链接: {url}") fetcher = WechatFetcher() article = fetcher.fetch_article(url) ``` ### Technical Analysis The application determines whether user input is a WeChat article URL by checking for the substrings `mp.weixin.qq.com` and `/s`. It does not parse the URL or verify that its actual hostname is exactly `mp.weixin.qq.com`. After this weak check succeeds, `fetch_article()` passes the original user-controlled value directly to `requests.Session.get()`. An attacker can therefore construct a URL whose path, query string, or user-information component contains the required substrings while its destination points to another host. For example, a URL shaped like the following can satisfy the substring checks while targeting a local service: ```text http://127.0.0.1/private/mp.weixin.qq.com/s ``` The `requests` library also follows redirects by default. Consequently, even an initially permitted destination could redirect the request to a loopback, private-network, link-local, or cloud metadata address unless every redirect target is independently validated. ### Attack Path 1. An attacker supplies a crafted value as the positional `keyword` argument. 2. The value contains `mp.weix ...[truncated 1576 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:7
Finding

Unpinned Automatically Installed Python Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and installs code that performs outbound network access and can write results to arbitrary user-specified files, but it does not declare any explicit tool scope, permissions, or allowed-tools boundaries. That increases the chance an agent runtime will invoke the skill without clear user consent or policy enforcement around network exfiltration and filesystem modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation emphasizes convenience and supported platforms but does not clearly warn that user search terms, account names, and pasted URLs are transmitted to third-party services including search engines and content providers. This can expose sensitive prompts, internal research topics, or private links to external parties without informed consent, especially because the skill supports direct URL parsing and multi-platform querying.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation states that the AI 'must' follow specified output formats and examples entirely in Chinese, including required source-label text such as '来源:公众号'. This imposes a specific language/locale behavior without indicating that users may choose another language or opt in to Chinese output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This Python file performs numerous HTTP requests to external services including Sogou, WeChat, Zhihu, Douban, 360 Search, Bing, Toutiao, Weibo, and Bilibili, sending the user-provided search keyword and sometimes URLs to those third parties. While the code prints progress messages during execution, the user-facing description and CLI help do not warn that queries and link inputs will be transmitted to multiple external platforms and search engines.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The request headers explicitly force 'Accept-Language' to prefer Chinese ('zh-CN,zh;q=0.9,en;q=0.8'), and similar hard-coded locale behavior appears elsewhere in the file. This is a natural-language/locale policy issue because the skill imposes a specific language preference on remote interactions without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Zhihu fetcher sets 'Accept-Language' to prefer Chinese responses, forcing a locale choice during remote requests. The file does not provide any option for users to select another language or explain that the tool is restricted to Chinese-language operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes this skill as integrating content grabbing across Toutiao, Baijiahao, Weibo, and Bilibili-column platforms, implying direct platform content retrieval comparable to the WeChat/Zhihu support it advertises. In code, these fetchers only query 360 search and extract titles/snippets/links, with no direct fetching of the underlying platform article bodies, so the actual behavior is materially narrower than the manifest suggests.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script accepts an arbitrary output path and writes to it without any path restrictions, overwrite confirmation, or safety checks. In an agent context, this expands the skill from read/network operations into local file modification, which can overwrite user files or place untrusted scraped content into sensitive locations if the path is attacker-influenced.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The manifest frames the skill primarily as a multi-platform search tool with per-platform result limits, but this code also supports a separate direct-resolution mode that fetches and returns an entire WeChat article when the input is a URL. While the manifest briefly mentions parsing WeChat links, the behavior is operationally distinct from 'search' and should be explicitly described as a separate full-content retrieval mode.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

When --output is used, the tool writes directly to the specified path with mode w, silently overwriting any existing file. In an agent setting, this can cause destructive local changes and may be abused to replace configuration, notes, or other user data if a crafted path is supplied.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.