Back to skill

Security audit

小红书爆款封面生成大师

Security checks for vulnerabilities and agentic risk

Overview

The skill’s cover-analysis purpose is understandable, but it uses unsafe network fetching and unvalidated remote image URLs that need review before installation.

Install only if you are comfortable with your search keywords being sent to onetotenvip.com and with the agent retrieving third-party cover images. The publisher should replace the custom no-SNI TLS code with normal certificate validation and add URL allowlisting, request limits, and disclosure before this is treated as routine.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_explosive_covers.py:69
Finding

TLS Certificate and Hostname Validation Are Disabled

Content
View full analysis

Vulnerability Details

File Location: scripts/fetch_explosive_covers.py, lines 69-77
Vulnerability Type: Improper certificate validation in a custom HTTPS client
Risk Level: High

Vulnerable code:

python
# Create TCP connection
sock = socket.create_connection((host, 443), timeout=timeout)

# Create SSL context without SNI
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE

# Wrap socket without server_hostname to avoid sending SNI
ssl_sock = context.wrap_socket(sock)

Technical Analysis

The custom HTTPS implementation explicitly disables certificate-chain validation by setting verify_mode to ssl.CERT_NONE. It also disables hostname verification and omits server_hostname when wrapping the socket.

TLS encryption without server authentication does not establish that the client is communicating with the intended API. Any certificate, including a self-signed certificate controlled by an attacker, will be accepted. A network-positioned attacker can therefore impersonate onetotenvip.com, inspect user-derived query keywords, and modify the API response.

This issue is compounded by the later workflow, which trusts returned post metadata and cover-image URLs. A forged API response can consequently influence both the generated analysis and subsequent network requests made by image-analysis tooling.

Attack Path

  1. A user invokes the Skill with a topic or set of keywords.
  2. The script opens a connection to the configured third-party API.
  3. An attacker with a suitable network position intercepts or redirects that connection.
  4. The attacker presents an arbitrary TLS certificate.
  5. The client accepts the certificate because certificate and hostname verification are disabled.
  6. The attacker reads the submitted keywords and returns attacker-controlled JSON.
  7. The forged response can contain fabricated engagement ...[truncated 786 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the raw socket-based HTTPS implementation with a standard verified client such as requests:
    python
    response = requests.get(
        base_url,
        params=params,
        headers=headers,
        timeout=(5, 60),
    )
    response.raise_for_status()
    data = response.json()
    
  2. Do not pass verify=False; use the operating system or certifi trust store.
  3. Require normal SNI and hostname validation. If the remote server fails when SNI is enabled, correct or replace the server rather than weakening TLS.
  4. Fail closed on certificate, hostname, protocol, and response-parsing errors.
  5. Consider certificate or public-key pinning if the service is controlled by the project and operational key rotation can be managed safely.
  6. Add automated tests verifying that expired, self-signed, wrong-host, and untrusted certificates are rejected.
  7. Apply URL allowlisting to fields returned by the API so that transport compromise cannot freely redirect subsequent Agent requests.

T09 · Insecure Skill Coding Practices

Error
Location
references/core_workflow.md:118
Finding

Untrusted API-Provided Image URLs Are Accessed Without Destination Validation

Content
View full analysis

Vulnerability Details

File Location: references/core_workflow.md, lines 118-128 and 145-167
Vulnerability Type: Server-side request forgery risk through unvalidated remote URLs
Risk Level: High

Relevant workflow directives, translated into English:

text
2. Extract cover image URLs from the coverUrl field of each item.
   - Important: Directly use the original coverUrl returned by the API.
     Do not modify or transform the URL.

4. Batch image-recognition analysis: proactively invoke native image-understanding
   capabilities and directly access the cover URLs for image analysis.
   - Visit each coverUrl individually using native image-understanding capabilities.
   - Every cover must be analyzed separately.

The later report instructions also require the returned coverUrl values to be embedded as real images and reused as reference images in generated prompts.

Technical Analysis

The workflow treats the API-provided coverUrl field as trusted and expressly requires the Agent to access each URL without modification. It does not impose restrictions on URL schemes, destination hostnames, resolved IP addresses, ports, redirects, response sizes, or content types.

Because the values originate outside the project, a compromised API can return arbitrary destinations. The disabled TLS verification in the accompanying script also allows a network-positioned attacker to alter these values in transit.

If the native image tool performs server-side retrieval, an attacker may be able to induce requests to loopback addresses, private network ranges, link-local services, cloud instance metadata endpoints, or attacker-controlled tracking servers. Redirects can also bypass a superficial initial-host check unless every redirect target is independently validated.

Attack Path

  1. The attacker compromises the remote API, controls its response, or exploits the script's missing TLS verification to imp ...[truncated 1580 chars]
Remediation
View remediation

Remediation Suggestions

  1. Permit only https URLs.
  2. Maintain an explicit allowlist of documented Xiaohongshu image-CDN hostnames. Reject raw IP-address hosts and all unrecognized domains.
  3. Resolve the hostname before each request and reject loopback, private, link-local, multicast, reserved, and unspecified IPv4 and IPv6 addresses.
  4. Validate every redirect target using the same scheme, hostname, port, and resolved-address rules. Alternatively, disable redirects.
  5. Restrict destination ports to TCP 443.
  6. Block credentials in URLs, ambiguous hostname encodings, malformed URLs, alternate numeric IP representations, and unsupported schemes such as file, ftp, or data.
  7. Enforce connection and read timeouts, maximum response sizes, download limits, and a strict image MIME-type allowlist.
  8. Decode images with a hardened library in an isolated, unprivileged environment.
  9. Route image retrieval through a dedicated proxy with outbound network controls that deny private and metadata ranges.
  10. Validate API response fields against a strict schema before passing them to Agent tools.
  11. Remove the directive that URLs must be used without transformation; allow safe normalization and reject any value that cannot be validated.
  12. Combine these controls with proper TLS certificate validation for the API connection.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

There is a significant mismatch between the declared purpose and the reported implementation: the skill claims AI-driven cover analysis/generation but apparently performs undeclared third-party network retrieval and uses evasive TLS behavior like disabling certificate verification and SNI. This is dangerous because deceptive capability hiding can mask data exfiltration or unsafe collection, and bypassing TLS validation exposes users to man-in-the-middle attacks and untrusted content ingestion.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
项。生成 **HTML 报告**时另需按该文档要求读取 `references/xhs_trend_data_format.md`。脚本路径(相对技能目录):`scripts/fetch_explosive_covers.py`。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
项。生成 **HTML 报告**时另需按该文档要求读取 `references/xhs_trend_data_format.md`。脚本路径(相对技能目录):`scripts/fetch_explosive_covers.py`。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
项。生成 **HTML 报告**时另需按该文档要求读取 `references/xhs_trend_data_format.md`。脚本路径(相对技能目录):`scripts/fetch_explosive_covers.py`。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
项。生成 **HTML 报告**时另需按该文档要求读取 `references/xhs_trend_data_format.md`。脚本路径(相对技能目录):`scripts/fetch_explosive_covers.py`。

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly disables hostname verification, disables certificate validation, and avoids sending SNI while connecting to a third-party HTTPS endpoint. This makes the connection vulnerable to man-in-the-middle interception and tampering, and the SNI-evasion behavior is especially suspicious in a skill whose stated purpose is cover-design analysis rather than low-level network bypassing.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises behavior that involves network access and likely file output/report generation, but it does not declare any tool scope or permissions boundaries. Missing explicit permissions weakens reviewability and sandbox enforcement, increasing the risk of unintended data access, exfiltration, or writes when the skill is executed in a tool-enabled environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example response instructs the assistant to use specific Chinese terminology, and the later note requires externally facing use of workflow-mandated terms. This imposes a language/locale constraint in natural-language instructions without indicating that users may choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction to uniformly use workflow-specified terms and ban listed alternatives is a natural-language policy issue when no user choice is offered. Although the skill is for a Chinese platform, this file does not clearly justify that all outputs must remain in that language or terminology regardless of user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

These lines mandate that all outward-facing text must use a fixed Chinese expression in every title, reply, report, and prompt. This is a natural-language policy constraint applied universally, and the file does not offer the user any language or locale choice or document a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow requires collecting, analyzing, and then reproducing large numbers of third-party cover image URLs, titles, and author/profile links in the final output, which goes beyond what is strictly necessary to generate a design recommendation. This creates unnecessary exposure of third-party content and metadata, increases privacy/compliance risk, and broadens the external attack surface through agent-initiated retrieval of many remote resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to directly visit and analyze third-party image URLs, then display those external images and links to the user, without any notice or consent around network access, tracking, or privacy implications. This can leak user activity to third parties, trigger unbounded remote requests, and expose the system to unsafe or unexpected external content handling.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow explicitly requires exposing all real cover URLs, images, titles, and author links in the final output, which republishes third-party content and identifiers far beyond the minimum needed for the task. This unnecessarily discloses external metadata, may violate platform/content-use expectations, and amplifies privacy and compliance risk by making the model a redistribution channel for scraped or aggregated content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes an AI cover-design capability based on large-scale visual element analysis and generation of actionable cover schemes. In contrast, this code performs remote retrieval of trend data and returns note lists plus engagement metrics; it does not analyze visuals or generate cover design recommendations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code sends the user-provided keyword to an external domain without any visible disclosure, consent flow, or data-handling notice in the script. If users enter sensitive business topics, campaign terms, or personal information as keywords, that data is exposed to a third party and could be logged or retained.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest centers on producing AI-generated cover design solutions for creators. Here, the code extracts raw cover URLs and Xiaohongshu links for downstream inspection and prints them for 'style analysis', which is supportive scraping/output behavior rather than the advertised design-generation function.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Step 3 says the system must perform intelligent matching and return the 20 most relevant items using a weighted relevance formula, prioritizing intent and content relevance over engagement. Step 4 then instructs selecting the top 20 purely by interaction volume, which conflicts with the earlier mandatory selection logic and changes the actual intent of the analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The request forces the Accept-Language header to zh-CN/zh, which imposes a specific locale preference regardless of user choice. This is a natural-language policy concern because the file does not offer any way to select or opt into that locale behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

When --output-file is provided, the script writes fetched content directly to the specified path, persisting potentially sensitive query results to disk. The code logs success after writing, but it does not warn beforehand that data will be saved locally or that an existing file may be overwritten.

Content

No source excerpt is available for this finding.