Back to skill

Security audit

小红书爆款文案创作(红狐数据)

Security checks for vulnerabilities and agentic risk

Overview

This writing helper needs review because it automatically initiates payment setup and creates HTML files with unsafe content and filename handling.

Require separate approval for installing payment software and initiating each recharge, and verify the payee and amount in Alipay. Search terms go to external services, so avoid confidential topics. Prefer a corrected version that honors JSON-only output, confines files to one folder, prevents accidental overwrites, and safely displays external text.

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_xhs_hot_articles.py
Finding

External author names are rendered as executable HTML

Content
View full analysis

Impact

An injected element with an event handler can execute JavaScript when the report is opened, alter the displayed report, or initiate attacker-directed browser requests. This does not establish arbitrary local file access or operating-system code execution.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (10)

Tainted flow: 'req' from os.environ.get (line 134, 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_xhs_hot_articles.py (reported line 135)May include surrounding context.

python
body = json.dumps(payload, ensure_ascii=False).encode("utf-8")
            req = urllib.request.Request(url, data=body, headers=headers, method="POST")
            with urllib.request.urlopen(req, timeout=30) as resp:
                status_code = resp.status
                resp_bytes = resp.read()
            resp_text = resp_bytes.decode("utf-8")

The content-writing workflow escalates an insufficient-credit error into an automatic payment workflow without establishing user authorization for the purchase.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

An insufficient-credit response automatically escalates a writing request into a payment-submission workflow using payment details supplied by the API response, without establishing explicit purchase authorization in the supplied file. This crosses a financial authorization boundary and could cause unwanted charges; the referenced payment guide was not provided, so any safeguards it might contain cannot be verified.

Content

No source excerpt is available for this finding.

Search-error recovery instructions escalate into a payment workflow without an explicit user-authorization step.

High
Category
Prompt Injection
Confidence
97% confidence
Finding

An insufficient-credit response produces instructions directing the consuming agent to initiate a payment workflow using API-supplied payment URLs, amounts, and merchant information, without an explicit user-approval step. The skill metadata reinforces automatic recharge, expanding a content-search request into a financial action; although this Python file does not itself execute payments, an agent following its output could initiate an unwanted or attacker-directed payment workflow.

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 examples include generic copywriting requests without requiring Xiaohongshu context.

Medium
Category
Trigger Abuse
Confidence
97% confidence
Finding

The generic copywriting activation example can route unrelated writing requests into a Xiaohongshu-specific workflow without establishing that the user wants this service. This becomes security-relevant because activation introduces external keyword disclosure, potentially billable queries, and an automatic recharge path rather than merely changing the writing format.

Content

No source excerpt is available for this finding.

The workflow sends user-derived keywords to external services without a privacy warning.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The workflow sends user-derived keywords to the Redfox service and a web-search provider without a privacy notice or a check for sensitive content. External retrieval is relevant to the skill's purpose, but broad activation means confidential campaign topics or personal details could leave the conversation when the user expected only local drafting.

Content

No source excerpt is available for this finding.

The workflow automatically installs a missing payment CLI without warning the user about executing downloaded code or modifying their system.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The workflow directs the agent to download and execute an installer automatically when the payment CLI is missing, without an explicit installation approval step. A request for content generation can therefore expand into local software installation, and the payment context increases the consequences of executing compromised code or modifying the user's environment.

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 @alipay/agent-payment@latest without pinning an audited version, so the code executed can change between runs. A compromised package release could execute with the agent's local permissions and access sensitive data or tamper with the payment workflow; this is an npm supply-chain risk, not specifically an MCP-server issue.

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
95% confidence
Finding

The failure-handling section repeats the same unpinned @latest installation command, preserving the supply-chain exposure identified at line 62. This is a duplicate reference to that vulnerability rather than evidence of a separate execution path, and nothing here establishes that the package itself is malicious.

Content

No source excerpt is available for this finding.

The documented output-format selection is ignored: JSON mode still writes an HTML file.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The output-format argument is never used to gate HTML generation, so even the default JSON mode writes a file using truncating write mode. This becomes security-relevant because the default filename incorporates the search keyword without removing path separators or traversal components, allowing a keyword to direct an unexpected write outside the intended directory, subject to filesystem permissions and the appended filename suffix.

Content

No source excerpt is available for this finding.