Back to skill

Security audit

Poyo Grok Imagine Image Quality

Security checks for vulnerabilities and agentic risk

Overview

This skill is a clearly scoped PoYo image-generation helper that sends user-approved payloads to PoYo, with a local API-key handling caveat.

Install only if you intend to use PoYo for Grok Imagine Image Quality. Use a narrowly scoped POYO_API_KEY on a trusted machine, avoid submitting confidential prompts or private image/callback URLs unless you trust PoYo and the receiver, and rotate the key if command-line process telemetry may capture curl arguments.

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_grok_imagine_image_quality.sh:9
Finding

PoYo API Key Exposed Through Process Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/submit_grok_imagine_image_quality.sh, lines 9–15
Vulnerability Type: API credential exposure through process command-line arguments
Risk Level: Medium

Vulnerable Code

bash
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

Technical Analysis

The shell expands POYO_API_KEY before starting curl. Consequently, the complete authorization header, including the secret API key, is placed in the curl process argument vector.

On systems where process arguments are visible to other local users, diagnostic utilities, monitoring agents, or process collectors, the credential may be obtained from process listings or interfaces such as /proc/<pid>/cmdline. The exposure exists for the lifetime of the curl process and may last longer if process telemetry records command-line arguments.

Exploitation requires local process-inspection access or access to monitoring data containing process arguments. The script does not print the key directly and does not provide remote code execution.

Attack Path

  1. A user sets a valid POYO_API_KEY and invokes the submission helper with a JSON payload.
  2. The shell expands ${POYO_API_KEY} into the value passed to curl through the --header argument.
  3. While the request is active, a local user or monitoring process reads the curl command-line arguments.
  4. The observer extracts the bearer token from the authorization header.
  5. The attacker reuses the token to submit unauthorized requests to the PoYo API until the credential is revoked or expires.

Impact Assessment

Successful exploitation discloses the privileges associated with the affected PoYo API key. An attacker could make unauthor ...[truncated 334 chars]

Remediation
View remediation

Remediation Suggestions

  • Avoid placing the authorization header directly in curl command-line arguments.
  • Supply sensitive curl configuration through standard input using curl --config -, so the process argument vector contains only the non-sensitive configuration source indicator.
  • If a temporary configuration file is unavoidable, create it with owner-only permissions, prevent symbolic-link attacks, and delete it reliably with a shell trap.
  • Disable shell tracing before handling the credential and ensure request-debugging or monitoring systems do not record authorization headers.
  • Restrict process visibility between local users through operating-system controls where available.
  • Use a narrowly scoped API key, rotate it periodically, and revoke it immediately if process telemetry may have captured the current value.
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 17)May include surrounding context.

Content-Type: application/json

text

Get API keys from <https://poyo.ai/dashboard/api-key>. Use the server-side `POYO_API_KEY` environment variable.

## Model

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill describes shell execution and network/secret access in prose, but it does not declare an explicit machine-enforceable tool scope such as permissions or allowed-tools. That mismatch can let a runtime grant broader capabilities than intended, increasing the chance of accidental command execution or unreviewed external API use with the API key.

Content

No source excerpt is available for this finding.

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

Text-to-Image Example

bash
curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \

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_grok_imagine_image_quality.sh (reported line 11)May include surrounding context.

sh
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script performs a POST request to an external API and sends the contents of the user-supplied JSON file along with an Authorization header derived from an environment variable. There is no visible disclosure, confirmation prompt, or user-facing notice in the script warning that local data will be transmitted off-system.

Content

No source excerpt is available for this finding.

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

md
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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

md
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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

md
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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

md
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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

md
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"

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_grok_imagine_image_quality.sh (reported line 12)May include surrounding context.

sh
: "${POYO_API_KEY:?POYO_API_KEY is required}"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"$1"