Back to skill

Security audit

GPT Image 2 电商主图

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its image-generation purpose, but it needs review because API credentials can be sent to arbitrary endpoints and the package includes broader AI client code than the advertised workflow.

Review before installing. Use it only with the official HTTPS AI Hive endpoint, avoid setting AI_HIVE_BASE_URL unless you control and trust the server, provide only files you are comfortable uploading to the service, and prefer installing dependencies in a dedicated environment with pinned versions.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:69
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
``` ### Technical Analysis The documented installation process retrieves `requests` without specifying an audited version, lock file, package hash, or trusted artifact. The installed package and its transitive dependencies therefore depend on mutable package-index state at installation time. Although the audit found no evidence that the current `requests` package is malicious, this practice leaves the installation workflow exposed to supply-chain compromise. A compromised release, maintainer account, package index, dependency, or package-resolution path could cause unreviewed code to be installed. Because `scripts/imagegen.py` imports `requests` at startup, malicious package code could execute in the user's Python process. ### Attack Path 1. An attacker compromises a relevant package release, transitive dependency, package-index account, or package-resolution path. 2. The user follows the documented `pip3 install requests` instruction. 3. `pip` resolves and installs the attacker-controlled or compromised release because no version or hash constrains the artifact. 4. The user runs `scripts/imagegen.py`. 5. Python imports the installed package, allowing malicious initialization code to execute with the privileges of the user running the skill. 6. Such code could access data available to that user, including environment variables, local files, and the AI Hive configuration file. ### Impact Assessment Successful exploitation would execute code with the operating-system privileges of the user who installed or ran the skill. The potential scope includes: - Reading the AI Hive API key from environment variab ...[truncated 516 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:79
Finding

API Credentials Can Be Sent to an Arbitrary or Plaintext Base URL

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill includes text chat and video-generation command handlers even though its declared purpose is ecommerce main-image generation with GPT Image 2. In a skill ecosystem, these hidden extra capabilities materially increase the attack surface and enable off-purpose remote actions, including sending arbitrary prompts and media to external services under the same API key.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill invokes shell commands, installs packages, reads environment variables via the runtime, performs network access, and reads local files, but it does not declare any explicit tool scope or permissions. This creates an avoidable over-privilege and transparency problem: an agent may execute code and access resources without clear policy boundaries, increasing the chance of unintended file, network, or shell abuse if the skill is modified, misused, or combined with untrusted task inputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description and operational instructions are written as if the skill is intended to be used in Chinese, with no indication that users may choose another language or locale. This can violate a language/locale policy when a skill implicitly requires a specific language without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file presents itself as a dedicated GPT Image 2 ecommerce main-image skill, but the implementation is a generic AI Hive API client exposing broader capabilities such as account info, model enumeration, uploads, chat, image, and video operations. This scope mismatch violates least privilege and can mislead users or upstream agents into granting trust, credentials, or data access to a tool that does substantially more than advertised.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring explicitly describes a general-purpose AI capability tool, contradicting the advertised identity of a dedicated ecommerce image skill. Such contradictory framing is dangerous because reviewers, users, or orchestrators may apply weaker scrutiny or broader trust based on the benign skill label while the code is actually a multipurpose remote-operation client.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural-language descriptions and prompts in Chinese, including the module docstring and CLI help text, but does not provide any user opt-in or alternative locale. That can violate language/locale policy when a skill implicitly forces a specific language for all users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The upload flow sends arbitrary local files to remote object storage and then completes registration with the external API, but the user-facing messaging only shows operational progress rather than a clear disclosure that local content will leave the machine and be stored by third parties. In the context of an image-generation skill, users may reasonably provide product images or assets without realizing the full disclosure and retention implications, creating confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing natural language entirely in Chinese across the substantive changelog entries. Under the policy for natural-language violations, forcing a specific language without opt-in or documented regional justification can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The string "请替换为你的APIKey" is presented only in Chinese, which imposes a specific language in user-facing configuration text. The file does not provide an alternative language, opt-in, or any documented locale-specific justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

For a narrowly described ecommerce image skill, automatically opening a browser to an account page is an extra capability outside the core generation workflow. While convenient for setup, it is not inherent to generating product images and expands the skill's operational context beyond its stated purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.