Back to skill

Security audit

公众号违禁词检测

Security checks for vulnerabilities and agentic risk

Overview

The content checker is coherent, but its automatic recharge workflow can install additional software and act on unchecked payment details.

Before installing, require explicit approval of each recharge’s recipient and amount, validate checkout destinations, and safely pass response values to commands. Separately approve and pin any payment-tool installation. Submitted text goes to RedFox, and rewritten copies are saved locally; use an environment variable to avoid shell-file credential lookup.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (12)

Tainted flow: 'headers' from os.getenv (line 137, credential/environment) → requests.post (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/check_sensitive_words.py (reported line 151)May include surrounding context.

python
last_error = None
    for attempt in range(max_retries + 1):
        try:
            response = requests.post(API_URL, headers=headers, json=payload, timeout=30)

            if response.status_code >= 500 and attempt < max_retries:
                import time

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The core scanning and risk-highlighting behavior matches the description. However, the supplied code does not execute payment commands, launch Alipay, monitor payment completion, or retry the original query after recharge. Its printed instructions describe those actions but do not perform them. It also returns no replacement suggestions. Reading the service API key, extracting files and webpages, and contacting the detection API are supporting implementation details rather than unrelated capabilities. The payment workflow could exist elsewhere, but it is not demonstrated by this code chunk.

Content

No source excerpt is available for this finding.

A routine content-checking request is escalated into an automatic payment workflow when the service reports insufficient credits.

High
Category
Prompt Injection
Confidence
87% confidence
Finding

The instructions escalate a content-checking request into payment submission based on a remote insufficient-credit response, without requiring transaction-specific user authorization in the provided file. Because payment details come from the response, a compromised service or manipulated response could steer the agent toward an unwanted purchase or fraudulent checkout; the referenced payment workflow was not supplied, so any additional safeguards cannot be verified.

Content

No source excerpt is available for this finding.

Tool output redirects the agent from content checking into a payment workflow without requiring user authorization.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

An insufficient-credit response produces imperative instructions directing the agent to initiate a payment workflow using server-supplied URLs, amounts, and merchant information, without an explicit user-approval gate. This promotes tool output into operational authority and could cause an agent to initiate an unauthorized or attacker-directed payment; the script itself does not execute the payment.

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_read, 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 workflow automatically installs third-party software without notifying the user about local system changes.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

When the CLI is missing, the workflow directs the agent to install software without first disclosing or obtaining approval for the local change. Authorization to scan text or initiate a recharge does not necessarily authorize executing an installer and adding persistent tooling. This also compounds the unpinned-dependency risk identified above.

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 installation command executes a dynamically resolved npm package using @latest and automatically accepts installation with -y. A compromised publisher account or malicious release could therefore execute code with the agent's local privileges; the payment context increases the potential sensitivity of accessible information. This is a CLI supply-chain risk, not specifically an MCP-server issue.

Content

No source excerpt is available for this finding.

The payment workflow lacks a user-facing disclosure about transmitting payment-link and order details to the payment service.

Medium
Category
Output Handling
Confidence
89% confidence
Finding

The workflow actively passes the complete cashier URL, product information, and amount to the payment-link shortening operation. The document notes that these URLs contain timestamps and signatures, but never instructs the agent to tell the user that this payment information will be shared with the payment service.

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.

Credential discovery reads personal shell configuration files beyond the text-scanning task.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

When REDFOX_API_KEY is absent from the environment, L094–L109 read shell startup files in the user's home directory to locate a credential. Authenticating the detection API is expected, but searching general-purpose shell configuration files—which may contain unrelated secrets and private settings—is not an obvious requirement of scanning supplied text, files, or webpages.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_sensitive_words.py (reported line 151)May include surrounding context.

python
last_error = None
    for attempt in range(max_retries + 1):
        try:
            response = requests.post(API_URL, headers=headers, json=payload, timeout=30)

            if response.status_code >= 500 and attempt < max_retries:
                import time

Tainted flow: 'payload' from requests.get (line 142, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/check_sensitive_words.py (reported line 151)May include surrounding context.

python
last_error = None
    for attempt in range(max_retries + 1):
        try:
            response = requests.post(API_URL, headers=headers, json=payload, timeout=30)

            if response.status_code >= 500 and attempt < max_retries:
                import time