Back to skill

Security audit

SHEIN 电商图片生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed AI Hive workflow for generating SHEIN product images, with normal API-key and media-upload behavior plus some non-blocking scope and dependency caveats.

Before installing, expect the skill to send only the media files you choose to AI Hive, store an AI Hive API key under your home directory, and download generated results to your Downloads folder. Use a dedicated virtual environment and a trusted package index for the dependency install, and avoid uploading private or unrelated files.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
SKILL.md:69
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 69
Vulnerability Type: Unpinned runtime dependency and insufficient package integrity verification
Risk Level: Low

Vulnerable Code

bash
pip3 install requests

Technical Analysis

The installation instructions retrieve and install the latest version of requests and its transitive dependencies from the user's configured Python package index. The project does not provide a pinned dependency version, lock file, package hashes, or an explicitly trusted package index.

Consequently, dependency resolution is not reproducible and the code installed at deployment time may differ from the code that was reviewed. If the configured package index, an upstream package release, a transitive dependency, or package-resolution configuration is compromised, following this instruction could install attacker-controlled code. Python packages may execute code during installation or later when imported by scripts/imagegen.py.

This finding does not establish that the legitimate requests package is malicious. It identifies missing supply-chain controls in the documented installation process.

Attack Path

  1. An attacker compromises an upstream dependency release or a package index used by the victim, or causes the victim's pip configuration to resolve packages through an attacker-controlled index.
  2. The user follows the documented pip3 install requests instruction.
  3. Pip resolves an unpinned version of requests or one of its transitive dependencies without validating project-supplied hashes.
  4. The malicious package executes during installation or when scripts/imagegen.py imports requests.
  5. The payload runs with the privileges of the user who invoked pip or the skill.

Impact Assessment

Successful exploitation could provide arbitrary code execution under the installing user's account. The resulting scope could include access to files readable by that user, modification of us ...[truncated 392 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency manifest that pins exact versions, including transitive dependencies.

  2. Record cryptographic hashes and require their validation during installation, for example:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Generate the locked manifest through a reproducible dependency-management process and review dependency updates before regenerating it.

  4. Document the expected trusted package index and avoid untrusted supplemental indexes.

  5. Run the skill in a dedicated virtual environment under a non-privileged account.

  6. Integrate dependency vulnerability and provenance checks into the release process.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese across the substantive changelog entries. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill exposes executable capabilities through documented shell commands, package installation, network access, and file operations, but it does not declare any explicit tool scope or permission boundaries. That creates an unnecessary trust gap: an agent may grant broader runtime access than the user expects, increasing the chance of unintended command execution, filesystem modification, or outbound network activity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instruction '固定使用 public_model_nano_banana_pro' imposes a fixed configuration, and the file also mixes Chinese-language operational guidance without offering any language or locale choice. Under the policy rule, forcing a specific language/locale behavior without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states this file is a '通用 AI 能力调用工具' that wraps text chat, image generation, video generation, model queries, media upload, and task polling. However, the manifest describes a narrowly scoped SHEIN e-commerce image generation/editing skill. The actual codebase retains broad generic AI-hub behavior beyond the manifest's specific product-image purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and user-facing instructions are written exclusively in Chinese, and the CLI help/error/output strings throughout the skill also assume Chinese-language interaction. This creates a language/locale restriction without offering the user a choice or documenting that the skill is intentionally region-specific for compliance or audience reasons.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The code implements full video-generation support, including uploading image/video/audio inputs and polling video-generation tasks. The manifest is centered on creating and editing SHEIN product and fashion images; while it mentions campaign-ready bases and try-on visuals, it does not declare standalone video-generation capability. This is a broader multimodal capability than the stated skill purpose justifies.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The string literal "请替换为你的APIKey" forces a specific language in user-facing configuration guidance. This can violate language/locale policy because the file does not provide an alternative language option or explain why Chinese is required.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill parser description presents the command as a dedicated image skill ('图片 Skill' / '生成或编辑图片'), yet the same file's documented purpose and internal implementation are built from a generic AI Hive client abstraction supporting broader operations. This creates conflicting intent signals between the file's documentation and the wrapped skill identity.

Content

No source excerpt is available for this finding.