Back to skill

Security audit

公众号爆款文章查询(红狐数据)

Security checks for vulnerabilities and agentic risk

Overview

This article-search skill needs review because it automatically starts payment setup, installs payment software when missing, and can generate unsafe HTML reports.

Keep recharge manual or require approval of the verified payee and exact amount before payment setup. Provision a reviewed, pinned payment CLI instead of allowing automatic latest-version installation. Prefer JSON output until HTML escaping and link validation are fixed. Searches use provider credits; recurring delivery is optional.

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

Warning
Location
scripts/fetch_gzh_trends.py
Finding

External article metadata can inject scripts into HTML reports

Content
View full analysis

Impact

An injected script element or event handler can execute when the report is opened, modify displayed results, present deceptive links or payment prompts, and transmit report content to an attacker-controlled endpoint. This does not establish access to local files or the API key.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (11)

Tainted flow: 'req' from os.environ.get (line 69, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/fetch_gzh_trends.py (reported line 71)May include surrounding context.

python
data = json.dumps(body_dict, ensure_ascii=False).encode("utf-8")
    req = urllib.request.Request(url, data=data, headers=headers, method="POST")
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            raw = resp.read().decode("utf-8")
            return json.loads(raw)
    except urllib.error.HTTPError as e:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The article-search and recommendation behavior matches the description. However, the explicitly promised automatic recharge-and-resume behavior is absent from this chunk: no alipay-bot commands are executed, no payment status is polled, and no query is retried after payment. The printed workflow is output text, not executable payment integration. An external orchestrator might implement it, but none is shown. API authentication, date-range expansion, and HTML generation are supporting implementation details rather than mismatches.

Content

No source excerpt is available for this finding.

The automatic recharge workflow lacks a required user-facing warning before initiating a paid transaction.

High
Category
Output Handling
Confidence
94% confidence
Finding

The visible workflow directs automatic payment initiation on insufficient credits without requiring prior disclosure of the amount, merchant, or purchase terms. A request to search articles is not informed consent to recharge an account; the referenced payment procedure was not supplied, so any protections it might add cannot be verified.

Content

No source excerpt is available for this finding.

A routine search failure is used to escalate into an automatic payment workflow without an explicit purchase-approval gate.

High
Category
Prompt Injection
Confidence
91% confidence
Finding

An API-controlled error code and payment payload move the agent from information retrieval into a financial workflow without an explicit purchase-approval gate in the supplied document. This trusts external service output to initiate a higher-impact action and could enable unwanted payment attempts or misleading orders, although actual debit authorization depends on the unseen payment tools and wallet controls; this overlaps with SQP-2.

Content

No source excerpt is available for this finding.

An insufficient-credit response is turned into instructions for the agent to initiate a payment workflow.

High
Category
Prompt Injection
Confidence
96% confidence
Finding

An insufficient-credit response causes tool output to instruct the agent to initiate a payment workflow using an API-supplied cashier URL, amount, and merchant description without visible validation or an explicit user-approval gate. Although automatic recharge is advertised in the metadata and this script does not itself transfer money, a search request does not establish authorization for an arbitrary payment; following these instructions could expose the user to an unwanted or misdirected payment request.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The activation condition includes obtaining creative inspiration without requiring a WeChat-article search context.

Medium
Category
Trigger Abuse
Confidence
88% confidence
Finding

The description lists “获取创作灵感” (getting creative inspiration) as an activation condition alongside searching public-account articles. This can match general brainstorming requests that do not require WeChat searches, and no exclusion explicitly limits that trigger.

Content

No source excerpt is available for this finding.

The workflow automatically installs a missing CLI without warning the user about executing downloaded code or modifying the local environment.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The workflow directs the agent to install a missing CLI automatically, and npx -y suppresses the package-execution confirmation without establishing user authorization for this environment change. Installing and executing downloaded code goes beyond an ordinary article-search request, and the payment context makes compromise particularly consequential.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx -y @alipay/agent-payment'.

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The command uses @latest, allowing newly published package code to execute with the agent's local permissions without a reviewed version boundary. Although this is a CLI rather than an MCP server, the underlying supply-chain risk is real: a compromised release could access local credentials or interfere with the payment workflow.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx -y @alipay/agent-payment'.

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

L748 unconditionally adds an undeclared commercial solicitation to search output.

Low
Category
Excessive Agency
Confidence
96% confidence
Finding

The manifest describes article search, trend recommendations, and an insufficient-credit recharge workflow. L748 additionally advertises purchasing the provider's full database and directs users to a procurement email address after every completed query, including JSON output; this is unrelated marketing rather than a necessary implementation of the declared functions.

Content

No source excerpt is available for this finding.