Back to skill

Security audit

使用Nano Banana Pro(Gemini 3 Pro Image)通过第三方中转API站清云EchoFlow API生成或编辑图像。支持图像生成、图像编辑和多图像合成(最多14张图像)。当用户请求生成图像、创建图像、编辑图像或组合图像时使用。关键词:图像生成、图片生成、生成图片、AI绘画、Nano Banana Pro、Gemini、Gemini 3 Pro Image。

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its image-generation purpose, but needs review because it can send prompts, images, and unrelated API keys to external or caller-chosen endpoints.

Review before installing. Use a dedicated EchoFlow key only, avoid relying on ambient OPENAI_API_KEY or GEMINI_API_KEY, do not send private prompts or images unless EchoFlow is approved for that data, and avoid --api-base unless you fully trust the endpoint.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_image.py:39
Finding

Cross-provider API credentials may be disclosed to the EchoFlow gateway

Content
View full analysis
str | None: """Get API key from argument first, then environment.""" if provided_key: return provided_key return os.environ.get("ECHOFLOW_API_KEY") or os.environ.get("OPENAI_API_KEY") or os.environ.get("GEMINI_API_KEY") ``` ```python api_key = get_api_key(args.api_key) if not api_key: print("Error: No API key provided.", file=sys.stderr) print("Please either:", file=sys.stderr) print(" 1. Provide --api-key argument", file=sys.stderr) print(" 2. Set ECHOFLOW_API_KEY environment variable", file=sys.stderr) print(" 3. Set OPENAI_API_KEY environment variable", file=sys.stderr) print(" 4. Set GEMINI_API_KEY environment variable", file=sys.stderr) sys.exit(1) ``` ```python headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } response = httpx.post( f"{args.api_base}/chat/completions", headers=headers, json=request_body, timeout=120.0 ) ``` ### Technical Analysis The Skill documentation declares `ECHOFLOW_API_KEY` as its required credential, but the implementation silently falls back to `OPENAI_API_KEY` and `GEMINI_API_KEY`. The selected credential is then placed in a bearer authorization header and sent to the configured API base, which defaults to the third-party EchoFlow gateway. Provider API credentials are bearer secrets and should be bound to their intended service origin. Base64 image processing is necessary for the documented image API format and is not itself covert exfiltration; the security problem is the silent forwarding of unrelated provider credentials to another service. ### Attack Path 1. A user or execution environment has `OPENAI_API ...[truncated 885 chars]
Remediation
View remediation
str | None: return provided_key or os.environ.get("ECHOFLOW_API_KEY") ``` 2. Bind credentials to explicit service origins. If other providers must be supported, require a provider-specific configuration and key instead of automatically reusing ambient credentials. 3. Require explicit confirmation before sending a credential to a non-default endpoint. 4. Update help text and documentation to state exactly which credential is read and which service receives it. 5. Prefer environment variables or protected configuration over `--api-key`, because command-line arguments may be visible in process listings or shell history. 6. Rotate any OpenAI or Gemini keys that may already have been sent to EchoFlow unintentionally. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_image.py:105
Finding

Unrestricted API base permits credential and private image disclosure to arbitrary endpoints

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_image.py:245
Finding

API-controlled image URL enables server-side request forgery

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The setup and introductory text explain how to obtain an API key and run the tool, but they do not prominently warn that prompts and input images are transmitted to EchoFlow, a remote third-party provider. This creates a real data-handling risk because users may supply confidential prompts, personal photos, or proprietary images without understanding they will leave the local environment.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

uv run {baseDir}/scripts/generate_image.py -p "create a collage of these photos" -f "collage.png" -i photo1.png -i photo2.png -i photo3.png -i photo4.png

Use gemini-3-pro-image-preview model

uv run {baseDir}/scripts/generate_image.py -p "abstract art" -f "art.png" -m "gemini-3-pro-image-preview"

text

## API Reference

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/generate_image.py (reported line 41)May include surrounding context.

python
def get_api_key(provided_key: str | None) -> str | None:
    """Get API key from argument first, then environment."""
    if provided_key:
        return provided_key
    return os.environ.get("ECHOFLOW_API_KEY") or os.environ.get("OPENAI_API_KEY") or os.environ.get("GEMINI_API_KEY")

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises very broad matching criteria such as 'generate images, create images, edit images, or combine images' plus multilingual keywords, which can cause it to trigger for ordinary image-related requests without making clear that a third-party service will be used. In an agent setting, over-broad invocation increases the chance that user prompts or local images are sent externally when the user did not explicitly consent to remote processing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This reference explicitly directs traffic to an external service endpoint, meaning any prompts, uploaded images, and API credentials will leave the local environment and be transmitted to a third party. That is not inherently malicious, but without surrounding trust, privacy, and handling guidance it creates data exfiltration and third-party exposure risk.

Content

Scanner excerpt · references/echoflow_api.md (reported line 3)May include surrounding context.

md
# EchoFlow API Reference

EchoFlow API (https://api.echoflow.cn/) is an OpenAI-compatible API gateway that provides access to 580+ AI models including image generation models.

## Authentication

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document instructs users to send prompts and potentially image data to a third-party API gateway, but it does not disclose any privacy, retention, or data-sharing implications. In a skill context, this can cause users or downstream developers to unknowingly transmit sensitive content to an external provider, creating privacy, compliance, and data-governance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The base URL defines the external API endpoint that client implementations will send requests to, including prompts, images, and bearer-authenticated traffic. In a skill or reference file, this is security-relevant because it operationalizes outbound transmission to a third party without accompanying constraints on sensitive data use.

Content

Scanner excerpt · references/echoflow_api.md (reported line 18)May include surrounding context.

Base URL

text
https://api.echoflow.cn/v1

Image Generation Endpoint

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/echoflow_api.md (reported line 13)May include surrounding context.

md
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/echoflow_api.md (reported line 129)May include surrounding context.

md
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_image.py (reported line 13)May include surrounding context.

python
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_image.py (reported line 112)May include surrounding context.

python
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_image.py (reported line 113)May include surrounding context.

python
"""
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image).

EchoFlow API: https://api.echoflow.cn/
Model: gemini-3-pro-image-preview (Nano Banana Pro)

Usage:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code performs an HTTP POST to a third-party service and includes the user's prompt plus any provided input images in the request body. Although network transmission is inherent to the feature, the script does not present any explicit disclosure in code output or help text warning that local images and prompt content will be uploaded to EchoFlow.

Content

No source excerpt is available for this finding.

Tainted flow: 'content' from httpx.post (line 234, network input) → httpx.get (network output)

Medium
Category
Data Flow
Confidence
97% confidence
Finding

The script trusts model-controlled response content and, if it starts with 'http', performs a second outbound fetch to that URL. This creates an SSRF-style primitive and lets an external service influence what network locations the local machine contacts, which is risky in agent or enterprise environments with access to internal resources.

Content

Scanner excerpt · scripts/generate_image.py (reported line 255)May include surrounding context.

python
# Check if content is a URL
            if not image_saved and content.startswith("http"):
                img_response = httpx.get(content, timeout=60)
                img_response.raise_for_status()
                image = PILImage.open(BytesIO(img_response.content))
                image.save(str(output_path), 'PNG')

Static analysis

No suspicious patterns detected.