Back to skill

Security audit

product-replace

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it sends user images and an API key to Flyelep and uploaded local images become permanent public URLs.

Install only if you trust Flyelep with the images and API key used for this workflow. Do not upload confidential, personal, regulated, or unreleased product images unless permanent public image URLs are acceptable, and rotate the Flyelep secretKey if it is ever exposed in chat, logs, shell history, or tool output.

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

Warning
Location
SKILL.md:103
Finding
Permanent Public Exposure of Uploaded User Images## Vulnerability Details **File Location**: `SKILL.md`, lines 103-113 **Vulnerability Type**: Uploading user files to permanently accessible unsigned public URLs **Risk Level**: Medium ### Vulnerable Instruction Snippet ```text ## Local File Upload When the user provides a local file path instead of a public direct URL, upload the file to obtain a direct URL before invoking the replacement API. - The original filename does not appear in the URL. - Use data.fullPath as the public direct URL. - The URL is permanently valid and does not contain a signature. ``` ### Technical Analysis The Skill instructs the agent to upload locally supplied user images to a third-party storage service. The resulting `data.fullPath` is explicitly described as a permanently valid public URL without a signature. A non-expiring unsigned URL provides no time-based access control. Anyone who obtains the URL can retrieve the image without presenting the user's API key or another authorization credential. The fact that the original filename is removed does not provide meaningful access control; it only reduces immediately visible metadata. URLs may be exposed through agent transcripts, API request logs, application telemetry, browser history, proxy logs, generated output, or accidental sharing. The Skill does not require informed user consent for permanent storage, provide deletion instructions, or distinguish ordinary product images from sensitive local files. ### Attack Path 1. A user supplies a local image for product replacement. 2. The agent uploads the image to the Flyelep file-upload endpoint. 3. The service returns an unsigned, permanently valid public URL in `data.fullPath`. 4. The URL is used in subsequent API requests and may also appear in the conversation or operational logs. 5. A party with access to any leaked transcript, request log, telemetry record, or forwarded result obtains the URL. 6. That party retrieves the imag ...[truncated 563 chars]
Remediation
## Remediation Suggestions 1. Obtain explicit user consent before uploading any local file to third-party infrastructure. 2. Clearly disclose the storage provider, retention period, public-access characteristics, and deletion procedure. 3. Replace permanent public URLs with signed URLs that expire after the generation task completes. 4. Require authenticated retrieval where supported instead of relying on URL secrecy. 5. Add an API or documented workflow for deleting uploaded files immediately after processing. 6. Avoid returning source-image URLs to the user unless operationally necessary. 7. Redact uploaded URLs from logs, telemetry, error reports, and diagnostic output. 8. Warn users not to upload confidential, regulated, biometric, or personally identifying images unless the service provides appropriate safeguards. 9. Validate that redirects and returned URLs remain restricted to approved HTTPS storage domains.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:131
Finding
API Secret Passed Directly Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, lines 131-144, 171, 181, and 200 **Vulnerability Type**: Plaintext credential exposure through command arguments and agent conversation **Risk Level**: Medium ### Vulnerable Instruction Snippets ```bash curl.exe -X POST "https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload" \ -H "secretKey: YOUR_SECRET_KEY" \ --max-time 120 \ -F "file=@C:/path/to/product.png" curl -X POST "https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload" \ -H "secretKey: YOUR_SECRET_KEY" \ --max-time 120 \ -F "file=@./product.png" ``` ```bash curl.exe --% -X POST "https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/aiTool/productReplace" \ -H "Content-Type: application/json; charset=utf-8" \ -H "secretKey: YOUR_SECRET_KEY" \ --max-time 300 \ --data-binary @payload_temp.json ``` ```bash curl -X POST "https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/aiTool/productReplace" \ -H "Content-Type: application/json; charset=utf-8" \ -H "secretKey: YOUR_SECRET_KEY" \ --max-time 300 \ --data-binary '{"sourceUrl":"https://example.com/scene_with_old_product.jpg","replaceImageUrl":"https://example.com/new_product_front.jpg,https://example.com/new_product_side.jpg","modelType":9,"textPrompt":"Replace the product using the supplied image and make it red."}' ``` ```text Ask the user for secretKey. The API key must be supplied by the user and must not be invented by the agent. ``` ### Technical Analysis The Skill requires the agent to solicit an API key and demonstrates passing that key directly in a `curl` header argument. Although the examples contain a placeholder, normal execution requires replacing it with the real key. Command-line arguments can be exposed through process inspection facilities, command logging, terminal capture, shell debugging, automation logs, agent tool-call transcripts, and endpo ...[truncated 1517 chars]
Remediation
## Remediation Suggestions 1. Use a protected runtime secret store or environment-level secret injection rather than collecting credentials in ordinary chat. 2. Ensure the agent platform marks the key as sensitive and redacts it from tool calls, transcripts, logs, errors, and telemetry. 3. Avoid placing the literal credential in command-line arguments where possible. Use an HTTP client that accepts secrets through a protected credential interface. 4. If `curl` is unavoidable, generate a permission-restricted temporary configuration or header file outside the project directory and securely delete it immediately after use. 5. Do not enable shell tracing or verbose HTTP output while credentials are present. 6. Disable or bypass command history for invocations involving secrets. 7. Never echo the supplied key back to the user or include it in diagnostic output. 8. Use narrowly scoped, short-lived API keys where the service supports them. 9. Document immediate key rotation and revocation procedures for suspected disclosure. 10. Ensure temporary payload and credential files are created with owner-only permissions and are cleaned up on success, failure, timeout, and interruption.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The manifest description defines when to use the skill entirely in Chinese, and the document consistently instructs the agent in Chinese without indicating that users may choose another language. This creates a locale/language policy concern because it imposes a specific language rather than offering user preference or documenting a justified region-specific restriction.

External Transmission

Medium
Category
Data Exfiltration
Content
判断成功只看 `code`,业务失败时 HTTP 状态码仍是 200,`code` 为 500 或 9999,原因在 `msg` 里。

```bash
# Windows/PowerShell(用 curl.exe,PowerShell 里的 curl 是 Invoke-WebRequest 的别名)
curl.exe -X POST "https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload" -H "secretKey: 你的密钥" --max-time 120 -F "file=@C:/path/to/product.png"

# macOS/Linux
Confidence
92% confidence
Finding
The skill instructs the agent to upload user-provided local files and image URLs to a third-party external service, which is an external data transmission path. Even though the behavior is part of the skill's intended function, it can expose sensitive images, metadata, and user-provided API secrets to an external domain if the user or agent does not fully understand the disclosure and trust boundary.

Static analysis

No suspicious patterns detected.