Back to skill

Security audit

Poyo Flux 2 Api

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but its helper script can expose the PoYo API key and full request payload through command-line/process arguments while sending user content to PoYo.

Review before installing if prompts, image URLs, callback URLs, or generated media requests may be confidential. Prefer POYO_API_KEY over passing the key on the command line, avoid sensitive payloads, and rotate any key that may already have been exposed through shell history or process logging.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/submit_flux_2.sh:4
Finding

PoYo API Key and Request Payload Exposed Through Process Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/submit_flux_2.sh, lines 4-21
Vulnerability Type: API credential and sensitive request-data exposure through command-line arguments
Risk Level: Medium

Vulnerable Code

sh
api_key="${POYO_API_KEY:-${1:-}}"
if [ -z "$api_key" ]; then
  echo "Usage: submit_flux_2.sh [api_key] [payload.json]" >&2
  echo "Or set POYO_API_KEY and pass [payload.json]. If no payload file is given, JSON is read from stdin." >&2
  exit 1
fi

payload="${2:-${1:+}}"
if [ -n "${POYO_API_KEY:-}" ]; then
  payload="${1:-}"
fi

if [ -n "$payload" ] && [ "$payload" != "$api_key" ]; then
  body=$(cat "$payload")
else
  body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit   -H "Authorization: Bearer $api_key"   -H 'Content-Type: application/json'   -d "$body"

Technical Analysis

The script accepts POYO_API_KEY as a positional command-line argument and interpolates the resulting secret into the curl authorization-header argument. It also loads the complete JSON request into a shell variable and passes it through the -d "$body" command-line argument.

Process arguments can be exposed through operating-system process inspection, process accounting, diagnostic or monitoring software, and execution logs, subject to the host's process visibility controls. Supplying the API key as a positional argument creates an additional disclosure channel because the original invocation may be retained in shell history.

The JSON body may contain private prompts, callback URLs, and source-image URLs. Consequently, the vulnerable invocation can expose both authentication material and user request data.

Attack Path

  1. A user runs the helper with the PoYo API key as its first positional argument, for example, submit_flux_2.sh API_KEY payload.json, or runs it with POYO_API_KEY set.
  2. The script starts curl with the bearer token embedded in the authorization ...[truncated 1171 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove support for supplying the API key as a positional argument. Require POYO_API_KEY from a controlled environment or read the credential from a permission-restricted secret file or secret manager.

  2. Do not place the JSON body directly in the curl argument vector. Stream it through standard input using --data-binary @-, for example:

    sh
    if [ -n "$payload" ]; then
      curl -sS https://api.poyo.ai/api/generate/submit \
        -H "Authorization: Bearer $POYO_API_KEY" \
        -H 'Content-Type: application/json' \
        --data-binary @- < "$payload"
    else
      curl -sS https://api.poyo.ai/api/generate/submit \
        -H "Authorization: Bearer $POYO_API_KEY" \
        -H 'Content-Type: application/json' \
        --data-binary @-
    fi
    
  3. Where local process visibility is a concern, avoid placing the authorization header in the process argument vector as well. Use a permission-restricted temporary curl configuration or an API client that constructs headers internally. Ensure any credential file is created with mode 0600, is not stored in a shared directory, and is securely removed after use.

  4. Document that secrets must not be entered directly on the shell command line and advise users to remove any previously exposed keys from shell history.

  5. Rotate any API key that may already have been supplied positionally or captured by process monitoring.

  6. Apply least privilege, quotas, and usage alerts to PoYo credentials to constrain the effect of future disclosure.

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

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
---
name: poyo-flux-2
description: Use PoYo AI Flux 2 through the `https://api.poyo.ai/api/generate/submit` endpoint. Use when a user wants to generate or edit media with this model family, prepare PoYo-compatible payloads, submit jobs, or poll task status for `flux-2-pro`, `flux-2-pro-edit`, `flux-2-flex`, `flux-2-flex-edit`.
metadata: {"openclaw": {"homepage":"https://poyo.ai/models/flux-2", "requires": {"bins": ["curl"], "env": ["POYO_API_KEY"]}, "primaryEnv": "POYO_API_KEY"}}

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 · references/api.md (reported line 19)May include surrounding context.

Content-Type: application/json

text

Get API keys from <https://poyo.ai/dashboard/api-key>.

Recommended skill env var:

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The skill is designed to route user content to an external API endpoint, which creates a real data exfiltration surface by design. While external transmission is expected for this integration, it is still security-relevant because user inputs and generated job metadata may be sent off-platform to a third party.

Content

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

md
---
name: poyo-flux-2
description: Use PoYo AI Flux 2 through the `https://api.poyo.ai/api/generate/submit` endpoint. Use when a user wants to generate or edit media with this model family, prepare PoYo-compatible payloads, submit jobs, or poll task status for `flux-2-pro`, `flux-2-pro-edit`, `flux-2-flex`, `flux-2-flex-edit`.
metadata: {"openclaw": {"homepage":"https://poyo.ai/models/flux-2", "requires": {"bins": ["curl"], "env": ["POYO_API_KEY"]}, "primaryEnv": "POYO_API_KEY"}}
---

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The workflow tells the agent to POST data to PoYo and use bearer authentication, confirming active outbound transmission of user-provided content and credentials to a third-party service. In context this is the intended function of the skill, but it remains dangerous if used with confidential prompts, private images, or without user awareness.

Content

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

md
## Quick workflow

1. Choose the right model id for the requested output.
2. Build the request body for `POST https://api.poyo.ai/api/generate/submit`.
3. Send Bearer-authenticated JSON with `Authorization: Bearer <POYO_API_KEY>`.
4. Save the returned `task_id`.
5. Poll unified task status or wait for `callback_url` notifications.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly instructs sending prompts, image URLs, and potentially user-supplied media to a third-party API using a bearer token, but it does not disclose that this data leaves the local environment. This can cause unintended disclosure of sensitive prompts, proprietary images, or personal data because users and downstream agents are not warned before transmission.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/api.md (reported line 5)May include surrounding context.

md
## Endpoint

- Submit task: `https://api.poyo.ai/api/generate/submit`
- Status query: <https://docs.poyo.ai/api-manual/task-management/status>
- Source docs: <https://docs.poyo.ai/api-manual/image-series/flux-2>
- OpenAPI JSON: <https://docs.poyo.ai/api-manual/image-series/flux-2.json>

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/api.md (reported line 44)May include surrounding context.

md
## Endpoint

- Submit task: `https://api.poyo.ai/api/generate/submit`
- Status query: <https://docs.poyo.ai/api-manual/task-management/status>
- Source docs: <https://docs.poyo.ai/api-manual/image-series/flux-2>
- OpenAPI JSON: <https://docs.poyo.ai/api-manual/image-series/flux-2.json>

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/api.md (reported line 44)May include surrounding context.

Submission example

bash
curl -sS https://api.poyo.ai/api/generate/submit   -H 'Authorization: Bearer YOUR_API_KEY'   -H 'Content-Type: application/json'   -d '{
  "model": "flux-2-pro",
  "callback_url": "https://your-domain.com/callback",
  "input": {

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded remote endpoint confirms that the script is designed to transmit data to an external service. While contacting an API can be legitimate, in a skill setting this becomes a real security concern when users may not realize their input or piped data is being sent off-device, especially with no warning or confirmation.

Content

Scanner excerpt · scripts/submit_flux_2.sh (reported line 22)May include surrounding context.

sh
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit   -H "Authorization: Bearer $api_key"   -H 'Content-Type: application/json'   -d "$body"

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded remote endpoint confirms that the script is designed to transmit data to an external service. While contacting an API can be legitimate, in a skill setting this becomes a real security concern when users may not realize their input or piped data is being sent off-device, especially with no warning or confirmation.

Content

Scanner excerpt · scripts/submit_flux_2.sh (reported line 22)May include surrounding context.

sh
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit   -H "Authorization: Bearer $api_key"   -H 'Content-Type: application/json'   -d "$body"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends user-provided JSON payloads to a third-party remote API using curl, but provides no interactive warning, confirmation, or disclosure at the point of transmission. In an agent-skill context, this can lead to unintended exfiltration of sensitive prompts, files, or stdin content because the script will silently read from a file or stdin and transmit it off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script reads a bearer token from either POYO_API_KEY or a positional argument and later uses it for authentication, but the file does not include any comment, prompt, or disclosure about handling sensitive credentials. Access to sensitive environment variables or credentials is in scope for missing-warning findings when there is no visible notice in the code.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.