Back to skill

Security audit

wacai-zhishudashi-baidu-ranking

Security checks for vulnerabilities and agentic risk

Overview

The skill does its stated Baidu title collection and WeCom notification workflow, but it embeds a live webhook credential and sends to that fixed external destination by default.

Review before installing. Use this only if you intend title lists to be sent to the bundled WeCom robot, or modify/configure it so the webhook is supplied by you. The exposed webhook key should be revoked or rotated by its owner, and a safer version should require an explicit user-provided webhook and confirmation before sending.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/push_wecom.py:9
Finding

Hardcoded WeCom Webhook Credential

Content
View full analysis

Vulnerability Details

File Location: scripts/push_wecom.py, line 9
Vulnerability Type: Hardcoded secret in source code
Risk Level: High

Vulnerable Code

python
DEFAULT_WEBHOOK_URL = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0e41994e-9e62-4713-ad69-fddeaaba8e9a"

The same credential is also exposed in SKILL.md, lines 67–74:

bash
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0e41994e-9e62-4713-ad69-fddeaaba8e9a' \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "text",
    "text": {
      "content": "百度首页主标题列表:\n1. 标题1\n2. 标题2\n3. 标题3"
    }
  }'

Technical Analysis

The project embeds a reusable WeCom robot webhook key directly in both executable source code and documentation. A WeCom webhook URL is a bearer credential: possession of the complete URL generally enables the holder to submit messages to the associated robot without another authentication factor.

Sending extracted search-result titles to WeCom is consistent with the Skill's declared functionality. However, distributing a shared destination credential is not required to provide that functionality and violates least-secret-exposure principles. The script supports WECOM_WEBHOOK_URL and --webhook-url, but silently falls back to the exposed credential, causing ordinary execution to transmit titles to a fixed destination that may not be controlled or understood by the user.

No evidence was found that the script reads arbitrary files, harvests credentials, executes remote payloads, establishes persistence, or transmits data other than titles explicitly provided through command-line arguments or standard input.

Attack Path

  1. An attacker obtains the Skill package, reads its documentation, or accesses a repository or artifact containing these files.
  2. The attacker copies the complete webhook URL and its embedded key.
  3. The attacker sends crafted HTTP POST request ...[truncated 1235 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed WeCom webhook key.

  2. Remove the complete webhook URL from both scripts/push_wecom.py and SKILL.md, including examples.

  3. Require the webhook to be supplied explicitly through a protected environment variable or secret manager. Do not provide a shared fallback:

    python
    webhook_url = os.environ.get("WECOM_WEBHOOK_URL")
    if not webhook_url:
        parser.error("WECOM_WEBHOOK_URL must be configured")
    
  4. Consider removing --webhook-url, because command-line arguments may be visible in shell history and process listings. If retained, document this exposure and prefer environment-based secret injection.

  5. Validate that the destination uses HTTPS and restrict the hostname to the expected WeCom API domain when custom destinations are unnecessary.

  6. Clearly disclose the destination and request confirmation before the first non-dry-run transmission.

  7. Redact webhook URLs and query-string keys from diagnostics, logs, exceptions, and user-facing output.

  8. Use placeholder values such as https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=REDACTED in documentation.

  9. Review repository history, build artifacts, logs, and published packages for the exposed key; deleting it only from the current files is insufficient.

  10. Add secret-scanning checks to CI to prevent future commits containing webhook keys or comparable bearer credentials.

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims a narrow purpose around scraping Baidu titles, but its instructions also operationalize direct network transmission through an embedded default WeCom webhook. A description-behavior mismatch is dangerous because users may approve the skill for local browsing tasks without realizing it can exfiltrate collected data to a third-party endpoint.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill invokes browser automation and outbound webhook delivery, but it does not declare any explicit tool scope or allowed-tools boundaries. That makes the skill harder to audit and can lead to unintended access to network-capable functionality beyond what a reviewer or user expects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The markdown instructs the agent to send scraped search-result content to a WeCom webhook without a prominent warning or consent step for outbound transmission. Even if the content seems low sensitivity, silent forwarding of gathered data to an external service creates a data-handling and trust risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

The skill contains a hardcoded WeCom webhook URL with a concrete key and provides instructions to POST scraped content to it. Hardcoded outbound endpoints and tokens are dangerous because they enable unauthorized data exfiltration, accidental misuse of a production channel, and secret leakage if the skill is shared or reused.

Content

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

如需直接发 HTTP,可使用:

bash
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0e41994e-9e62-4713-ad69-fddeaaba8e9a' \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "text",

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script embeds a live WeCom webhook as a default destination, so running it without explicit configuration will transmit collected titles to an external party-controlled endpoint. In a skill whose purpose is automated scraping and reporting, this creates a real data exfiltration path and unauthorized message delivery risk, especially if users assume output stays local or under their own webhook.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

A hardcoded default webhook causes user-provided titles to be sent to an external WeCom endpoint without transparent disclosure at runtime. Because the skill is designed to gather search results and push them automatically, this silent transmission materially increases the risk of unintended data leakage and misuse of an embedded secret/integration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The skill mandates Chinese search terms and fixed Chinese webhook/body formats throughout the document, but it does not state that the skill is intentionally region- or locale-specific or give the user an option to choose another language. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The generated message content uses a Chinese-only label ("标题的列表:"), which imposes a specific language in the skill output. There is no opt-in, locale selection, or documentation indicating that this skill is intentionally limited to Chinese-language environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.