Back to skill

Security audit

AI大模型专家|GPT Image 2 图片生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches an AI-HIVE image-generation workflow, but it handles API credentials in a way that can send the bearer key to an arbitrary configured endpoint.

Review before installing. Use only the official AI-HIVE endpoint, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the destination, store the API key in a dedicated low-privilege account if possible, and install dependencies in an isolated virtual environment. Rotate the AI-HIVE key if it may have been used with a custom or untrusted endpoint.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:90
Finding

Bearer API Key Can Be Transmitted to a Configurable Untrusted Endpoint

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:57
Finding

Runtime Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill describes and demonstrates capabilities that read environment variables, write local configuration files, invoke shell commands, and access the network, yet it declares no explicit permission or allowed-tools scope. This creates an authority-transparency gap: a user or host system cannot easily tell what privileged actions the skill may perform, increasing the risk of unintended secret access, local file modification, or external data exfiltration if the skill is executed in an over-permissive environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest sets language: zh-CN, and the document consistently frames the skill for Chinese usage, including explicit output requirements like '保持简体中文'. There is no indication that users can choose another language or locale, which can violate language/locale policy requirements when not documented as a justified regional-only tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The display name, description, and default prompt are all written in Chinese, which indicates a fixed language presentation. There is no indication that users can opt into another language or that the skill is intentionally restricted to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill enables implicit invocation globally without any trigger constraints, exclusions, or user-confirmation guardrails. In a skill that can submit image-generation/editing jobs, upload reference assets, and save task IDs/results, this increases the chance of unintended activation and action execution from loosely related user prompts or prompt-injected context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file presents itself as a GPT Image 2 image-generation/editing skill, but the module-level design and documentation expose a broader general-purpose AI-Hive client surface. Excess capability in a narrowly scoped skill increases attack surface, makes review harder, and can enable unintended use paths that bypass product or policy expectations.

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 and prompts throughout the file continue that requirement. This creates a language policy concern because the skill effectively mandates a specific language/locale without documenting opt-in or offering an alternative.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Including text-chat and video-generation endpoints in a skill advertised only for GPT Image 2 image workflows violates least privilege and creates hidden functionality beyond the declared scope. In agent environments, such latent capabilities can be invoked accidentally or intentionally to exfiltrate data, consume credits, or perform unreviewed operations under the user's API key.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring explicitly says this is a '通用 AI 能力调用工具' and lists text chat, image generation, video generation, model queries, media upload, and task polling. That directly conflicts with the surrounding skill identity and manifest, which present a specialized GPT Image 2 image-generation/editing skill rather than a general AI-Hive multipurpose client.

Content

No source excerpt is available for this finding.