Back to skill

Security audit

Wechat Article Search

Security checks for vulnerabilities and agentic risk

Overview

The skill is a WeChat article search tool, but it uses scraping workarounds, an unsafe global dependency install instruction, and weak URL validation that deserve review before installation.

Review this skill before installing. Prefer a project-local, pinned dependency install instead of global npm installation, use it only for explicit WeChat article searches, avoid the real-URL resolution option unless needed, and be aware that it relies on scraping-style requests that may violate site rules or expose your environment to attacker-influenced outbound requests.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding

Unpinned Global Installation of a Third-Party Dependency

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/search_wechat.js:294
Finding

Insufficient Hostname Validation Enables Attacker-Selected HTTPS Requests

Content
View full analysis
{ // If this is not a Sogou link, return the original URL directly if (!url.includes('weixin.sogou.com')) { resolve(url); return; } (async () => { // Build the Cookie header const baseCookies = 'ABTEST=7|1716888919|v1; IPLOC=CN5101; ariaDefaultTheme=default; ariaFixed=true; ariaReadtype=1; ariaStatus=false'; const snuid = cookieObj['SNUID'] || ''; const cookieStr = snuid ? `${baseCookies}; SNUID=${snuid}` : baseCookies; const headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding': 'identity', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 'Cookie': cookieStr, 'User-Agent': getRandomUserAgent(), }; for (let attempt = 0; attempt < retries; attempt++) { try { const resp = await request({ url, headers, timeoutMs: 5000, retries: 0, }); ``` ### Technical Analysis The function attempts to restrict URL resolution to Sogou links by checking whether the complete URL string contains `weixin.sogou.com`. A substring check does not establish that the parsed destination hostname is the trusted domain. For example, both of the following attacker-controlled destinations satisfy the check: ```text https://weixin.sogou.com.attacker.example/path https://attacker.example/path?source=weixin.sogou.com ``` When real-URL resolution is enabled, the unchecked URL is passed to the HTTPS request function. The request also includes a Sogou cookie header, potentially including the dynamically obtained `SNUID` value. ...[truncated 1723 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 (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 29)May include surrounding context.

md
node scripts/search_wechat.js "关键词"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
node scripts/search_wechat.js "关键词"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

md
node scripts/search_wechat.js "关键词"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

md
node scripts/search_wechat.js "关键词"

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger description is broad enough to activate on generic requests like searching articles or gathering reference materials, which can cause the agent to invoke this skill outside a narrowly intended WeChat-article-search context. Over-broad activation increases the chance of unnecessary external lookups, execution of local scripts, and handling of user-controlled query strings when a more specific or safer skill should have been chosen.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script deliberately rotates among 20 desktop/mobile User-Agent strings 'to avoid fixed UA' and reduce detection, which is anti-bot evasion behavior beyond a straightforward search client. In an agent skill, this increases abuse potential by helping automated scraping appear less attributable and more resilient against provider defenses.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The HTTP headers explicitly force Accept-Language to prefer zh-CN, which imposes a specific locale choice in the skill's behavior. The file does not offer the user any language or locale selection, nor does it document this as a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code fetches cookies from an unrelated Sogou video endpoint solely to support later search/link access, which is a workaround to obtain session material not directly required by the stated article-search function. This is risky because it expands tracking/session acquisition behavior and suggests circumvention of anti-automation controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The cookie-fetching request separately sets Accept-Language to zh-CN,zh;q=0.9,en;q=0.8, again enforcing a specific locale. Because this behavior is repeated in request paths and not presented as an opt-in or documented requirement, it matches the locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The optional real-URL resolution performs extra per-result requests and parses redirect/JavaScript patterns to unmask final WeChat article URLs, extending the tool from metadata search into link-resolution/circumvention. That capability can bypass intermediary controls and increases scraping and tracking risk compared with simply returning search results.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The real-URL resolution flow sends requests with a fixed Chinese language preference, which forces a locale in another part of the skill. There is no visible mechanism for the user to choose a different locale or confirm that this region-specific behavior is intended.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The inline comment says the code checks redirects '不跟随重定向,直接获取Location', but the custom request function uses Node's https.request without any logic to disable or manage redirect following because https.request itself does not automatically expose followed redirect chains. In practice, this code only inspects whatever response it receives and the comment overstates the redirect-handling behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.