Back to skill

Security audit

小红书作品爬取

Security checks for vulnerabilities and agentic risk

Overview

This search skill needs review because it automatically installs payment software when needed and handles retrieved content in ways that can execute commands or browser code.

Wait for the shell and report-export handling to be fixed before using exports. Require approval before payment-software installation or recharge setup, verify the recipient and amount, and use a reviewed, pinned installer. Search terms are sent to RedFox, so avoid confidential queries.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md
Finding

Report-export instructions interpolate external JSON into shell syntax

Content
View full analysis

Impact

Arbitrary local command execution during the documented export workflow. This is a vulnerable operational instruction, not a shell-execution function in either Python script.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_report.py
Finding

External post data can terminate the report's inline script

Content
View full analysis

Impact

Attacker-controlled JavaScript executes when the generated report is opened. It can alter the report, read its embedded dataset, and attempt outbound requests, subject to browser policy. Arbitrary local-file access is not established.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_report.py
Finding

CSV export preserves attacker-controlled spreadsheet formulas

Content
View full analysis

Impact

In compatible spreadsheet configurations that permit external functions, opening the export can initiate attacker-directed requests and transmit referenced report-cell values. Formula-generated links or values can also misrepresent the exported content.

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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (9)

Tainted flow: 'headers' from os.environ.get (line 117, 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/crawl_xhs.py (reported line 124)May include surrounding context.

python
}

    try:
        resp = requests.post(API_URL, json=payload, headers=headers, timeout=15, verify=True)
        resp.raise_for_status()
        result = resp.json()
    except requests.exceptions.HTTPError as e:

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: xiaohongshu-crawler
description: 小红书作品爬取工具。根据关键词爬取小红书热门作品数据,支持按日期范围、排序方式筛选,结果以结构化表格展示。当用户需要爬取小红书作品、查询小红书热门内容、搜索小红书爆款笔记时使用。触发词:小红书爬取、小红书作品、小红书爆款、小红书搜索、小红书热门、小红书笔记查询。当接口返回积分不足(code=3210)时,自动唤起支付宝完成充值后继续查询。
---

# 小红书作品爬取

## 📝 简介

根据关键词爬取小红书热门作品,支

A routine search workflow escalates into automatic payment when the service reports insufficient credits, without requiring explicit spending authorization in the shown instructions.

High
Category
Prompt Injection
Confidence
93% confidence
Finding

The shown instructions escalate a search request into payment submission based on an external insufficient-credit response, without an explicit spending-authorization gate. The payment amount, cashier URL, and order information originate in that response, so this crosses a financial authority boundary and could cause unauthorized charges; the referenced payment guide is not supplied, so additional safeguards cannot be verified.

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, 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 search workflow lacks a privacy notice that user-supplied search parameters are sent to an external API service.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The workflow forwards user-derived keywords and search parameters to an external API without explicitly explaining that disclosure. Although API-key setup makes use of a third-party service somewhat apparent, users may still submit sensitive keywords without understanding who receives them or how they are retained.

Content

No source excerpt is available for this finding.

Automatically installs and executes a third-party npm package without warning the user about local system changes.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

When the CLI is missing, the workflow instructs the agent to execute a downloaded npm package and install software without first explaining the local changes or obtaining explicit approval. The user's request to retrieve content does not necessarily authorize software installation, and this payment-triggered fallback expands the task into local code execution with the agent's permissions.

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 uses @latest rather than an immutable, reviewed version, allowing npm to download and execute code that can change without changes to the skill. Although the text does not establish that this package is an MCP server, the underlying supply-chain risk is real: a compromised release could execute with the agent's local permissions, with heightened sensitivity in a payment-related 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.

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/crawl_xhs.py (reported line 124)May include surrounding context.

python
}

    try:
        resp = requests.post(API_URL, json=payload, headers=headers, timeout=15, verify=True)
        resp.raise_for_status()
        result = resp.json()
    except requests.exceptions.HTTPError as e:

Static analysis

No suspicious patterns detected.