Back to skill

Security audit

Hailuo2

Security checks for vulnerabilities and agentic risk

Overview

This looks like a legitimate PoYo video-generation helper, but it needs review because its shell script can expose the API key and submitted payload through command-line arguments.

Review before installing. Use this only if you are comfortable sending prompts, image URLs, callback URLs, and job metadata to PoYo. Avoid private/internal image URLs, do not pass the API key as a command-line argument, and consider hardening or replacing the helper script so the bearer token and payload are not exposed in process arguments. No hidden persistence, destructive behavior, or unrelated local data access was found.

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_hailuo_02.sh:4
Finding

Bearer API Key Exposed Through Process Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/submit_hailuo_02.sh, lines 4–22
Vulnerability Type: API credential 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_hailuo_02.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 explicitly supports accepting the PoYo API key as its first positional argument. Secrets supplied this way can be recorded in shell history and exposed through process listings, command auditing, terminal logging, and process telemetry.

In addition, regardless of whether the key originates from a positional argument or POYO_API_KEY, the script interpolates it into the curl authorization-header argument. This places the Bearer token in the curl process argument vector while the request is running. On systems where another user, monitoring agent, or process has permission to inspect command lines, the token may be recovered.

The request body is also supplied through curl's -d argument. Although this is not necessarily sensitive in every use case, prompts, callback URLs, and other payload contents may consequently be visible through the same process-inspection channels.

Attack Path

  1. A user invokes the script with the API key as its first argument or provides it through POYO_API_KEY.
  2. The script expands the secret into the Authorization: Bearer ... argument used to launch curl.
  3. While `curl ...[truncated 1086 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove support for passing API keys as positional command-line arguments. Require POYO_API_KEY or a protected credential source instead.
  2. Avoid embedding the authorization value directly in curl's command-line arguments. Provide sensitive headers through a temporary curl configuration file or another mechanism that does not expose them in the argument vector.
  3. If a temporary configuration file is used:
    • Create it with permissions restricted to the current user, such as mode 0600.
    • Use a securely created unpredictable path.
    • Install an exit trap to delete it on normal completion, errors, and signals.
    • Do not place it in a shared or predictably named location.
  4. Pass the JSON body through standard input, for example with --data-binary @-, rather than interpolating it into the command line.
  5. Disable shell tracing around credential handling and document that users must not invoke the script with set -x.
  6. Redact authorization headers from process telemetry, debugging output, and audit logs where supported.
  7. Rotate any API key that may previously have been passed positionally or captured by command-line monitoring.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

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:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill explicitly instructs use of shell via curl but does not declare any tool scope or allowed-tools boundary. This creates a governance and containment gap: an agent may invoke shell capabilities more broadly than reviewers or policy expect, increasing the chance of unintended command execution or misuse in environments where tool permissions are enforced by declaration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This skill is designed around transmitting data to an external endpoint, so the external transmission is real rather than hypothetical. The risk is contextual rather than inherently malicious: prompts, image references, and possibly sensitive creative or proprietary content may be sent off-platform to a third party.

Content

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

md
---
name: poyo-hailuo-02
description: Use PoYo AI Hailuo 02 for prompt-optimized video generation and image-to-video workflows through the `https://api.poyo.ai/api/generate/submit` endpoint. Use when a user wants standard or pro video jobs, optional prompt optimization, end-frame control, or PoYo payloads for `hailuo-02` and `hailuo-02-pro`.
metadata: {"openclaw": {"homepage": "https://poyo.ai/models/hailuo-02", "requires": {"bins": ["curl"], "env": ["POYO_API_KEY"]}, "primaryEnv": "POYO_API_KEY"}}
---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill directs sending user prompts and optional image URLs to a third-party API but provides no warning that user data leaves the local system. This can cause unintentional disclosure of sensitive prompts, private images, or internal URLs to an external service, especially when users assume the assistant is operating only locally.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The workflow concretely instructs POSTing JSON with Bearer authentication to an external API, confirming active outbound transmission. In this context the danger is increased because the skill not only references the service but operationalizes submission and polling, making accidental disclosure of sensitive prompts, image URLs, or callback metadata more likely.

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.

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": "hailuo-02",
  "callback_url": "https://your-domain.com/callback",
  "input": {

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 5)May include surrounding context.

md
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
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.

md
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
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/submit_hailuo_02.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
70% 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/submit_hailuo_02.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
91% confidence
Finding

Line L22 sends the request body and bearer token to an external API using curl, which is a network operation that may transmit user or system data. Aside from the usage syntax, the script provides no confirmation, logging, or explanatory comment warning the user that input JSON and the API key will be sent to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill requires an API key environment variable and instructs Bearer authentication, but it does not warn about credential handling or safe storage. In practice this can lead to accidental exposure of the key in shell history, logs, screenshots, debug output, or copied example commands.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.