Back to skill

Security audit

superx-art-api

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its media-generation purpose, but it gives a broad trigger to a paid external API and contains unsafe credential and shell-use instructions users should review carefully.

Install only if you explicitly want Codex to use SuperX. Before generation, confirm that prompts, image URLs, masks, audio/music prompts, and face images may be sent to SuperX and may consume account credits. Do not let an agent print your API key; use a protected secret mechanism or a presence-only check, and avoid face-swap or real-person media unless you have consent and a lawful use.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:15
Finding

API Credential Disclosure Through Shell Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15-22
Vulnerability Type: API credential exposure through command output
Risk Level: High

Vulnerable Code Snippet:

markdown
## Authentication

The API requires an API Key in the `Authorization` header.

Resolve the key in this order:
1. Check environment variable `SUPERX_API_KEY` — use it silently if set
2. If not set, ask the user for their API key before making any request

To check if the env var exists, run: `echo $SUPERX_API_KEY`

Technical Analysis

The skill instructs the agent to run echo $SUPERX_API_KEY to determine whether the environment variable exists. This prints the complete secret into the Bash tool output instead of merely checking whether the variable is set.

Tool output may be retained in conversation context, execution logs, telemetry, debugging records, or other transcript storage. This contradicts the preceding instruction to use the key silently and unnecessarily increases credential exposure. The issue does not require the API itself to be compromised; disclosure occurs locally when the prescribed command is executed.

Attack Path

  1. A user invokes the skill for an image, video, music, or related operation.
  2. The agent follows the authentication workflow in SKILL.md.
  3. The agent executes echo $SUPERX_API_KEY.
  4. The complete API key is written to Bash tool output and potentially retained in logs or conversation context.
  5. A party able to access that output obtains the credential.
  6. The exposed key is reused in the Authorization header against the SuperX API.
  7. The unauthorized party can invoke chargeable API operations until the credential is revoked or the account balance is exhausted.

Impact Assessment

The exposed credential grants access to the SuperX account capabilities associated with the API key. An attacker could query the account balance, submit generation jobs, consume ...[truncated 412 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to print the environment variable.

  2. Check only whether the variable is present:

    bash
    if [ -n "${SUPERX_API_KEY:-}" ]; then
      echo "SUPERX_API_KEY is set"
    else
      echo "SUPERX_API_KEY is not set"
    fi
    
  3. Prefer a secret-aware HTTP or credential-management mechanism that does not place the key in generated command text or ordinary tool output.

  4. Redact Authorization header values from execution logs, error output, debugging traces, and command previews.

  5. Avoid asking users to disclose credentials in ordinary chat when a protected secret-input mechanism is available.

  6. Document credential rotation and revocation procedures in case a key is exposed.

  7. Ensure subprocess tracing and shell debugging modes such as set -x are disabled while handling the key.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:27
Finding

Shell Command Injection Risk in User-Controlled JSON Request Construction

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 27-32
Vulnerability Type: Shell command injection through unsafe request-body interpolation
Risk Level: High

Vulnerable Code Snippet:

markdown
## How to make API calls

Use `curl` via the Bash tool. For every request:
- Add `-H 'Authorization: <api_key>'`
- Add `-H 'Content-Type: application/json'` for POST requests
- Use `-d '<json_body>'` to send parameters

Technical Analysis

The skill directs the agent to construct API calls as shell commands and to place a JSON body inside a single-quoted curl -d argument. The documented endpoints accept numerous user-controlled strings, including prompts, image URLs, QR-code content, task identifiers, and button identifiers.

If an agent substitutes these values directly into the illustrated shell form, a single quote in a value can terminate the shell-quoted JSON body. Subsequent shell metacharacters may then be interpreted as command syntax rather than request data. JSON escaping alone is not sufficient because JSON encoding and shell quoting are separate parsing layers.

The reviewed text does not require a structured serializer, stdin-based body transfer, or equivalent mechanism that prevents user input from becoming shell source. Exploitation is contingent on the executing agent interpolating user-controlled values into the prescribed command without robust shell escaping, but that is the natural implementation encouraged by the current instructions.

Attack Path

  1. An attacker submits a media-generation request containing a prompt or URL with a single quote followed by shell syntax.
  2. The agent constructs the JSON request body from that attacker-controlled value.
  3. The agent embeds the body into the prescribed curl -d '<json_body>' shell command.
  4. The attacker-supplied quote closes the surrounding shell argument.
  5. The shell interprets the remaining metachar ...[truncated 1427 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not interpolate prompts, URLs, identifiers, or other user-controlled values into shell command source.

  2. Prefer a native HTTP tool or library that accepts headers and JSON bodies as structured values without shell parsing.

  3. If curl is required, serialize JSON with a dedicated encoder and pass the resulting body through standard input:

    bash
    request_body="$(
      jq -n --arg prompt "$PROMPT" '{prompt: $prompt}'
    )"
    
    printf '%s' "$request_body" |
      curl --fail-with-body \
        -X POST "$URL" \
        -H "Authorization: $SUPERX_API_KEY" \
        -H "Content-Type: application/json" \
        --data-binary @-
    
  4. Populate shell variables through a structured tool interface rather than by inserting user text into a generated script.

  5. Never use eval, command substitution, or dynamically assembled shell fragments to process request values.

  6. Validate endpoint-specific fields using allowlists where possible, including model names, dimensions, ratios, numeric ranges, and known action identifiers.

  7. Treat validation as defense in depth rather than as a substitute for safe serialization and process invocation.

  8. Run the Bash tool with least privilege, restricted filesystem access, minimal environment secrets, and constrained outbound network access to reduce impact if command injection occurs.

  9. Add tests containing apostrophes, quotation marks, newlines, semicolons, command substitutions, and other shell metacharacters to verify that all values remain inert request data.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (23)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger description is extremely broad, covering generic requests like 'draw me a picture', 'make a video', or 'create some music', which can cause the agent to invoke this third-party skill for many ordinary user requests without clear user intent to use SuperX. In context, this is more dangerous because the skill performs authenticated external API calls and can incur account charges, so over-triggering risks unintended data disclosure and billable actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instructions describe authentication and request handling for a third-party API but do not require informing the user that their prompts, and potentially uploaded media, will be transmitted to SuperX. In this skill's context, that omission creates a meaningful privacy risk because creative prompts and reference images may contain sensitive personal or proprietary content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow instructs the agent to check balance first and then generate media using the user's API-backed account, but it does not require warning the user that these actions may consume paid credits. In context, this is risky because the skill is designed for billable generation endpoints, so a user may incur charges from an automatically triggered skill without informed consent.

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-reference.md (reported line 80)May include surrounding context.

| size | string | 否 | auto/1024x1024/1536x1024/1024x1536,默认 auto | | images | string[] | 否 | 参考图 URL 数组(传入则走编辑模式),最多 10 张 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/gpt4o-image' \

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-reference.md (reported line 130)May include surrounding context.

|------|------|------|------| | prompt | string | 是 | 英文提示词,最多 800 个单词。支持 --v 6 等 MJ 参数 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/imagine' \

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-reference.md (reported line 164)May include surrounding context.

| index | number | 是 | 变体索引(1-4) | | imgId | string | 是 | imagine 返回的图片任务 ID |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/variation' \

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-reference.md (reported line 190)May include surrounding context.

| index | number | 是 | 图片索引(1-4) | | imgId | string | 是 | imagine 返回的图片任务 ID |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/upscale' \

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-reference.md (reported line 216)May include surrounding context.

| buttonId | string | 是 | 按钮 ID(从任务详情的 buttons 列表获取) | | imgId | string | 是 | 图片任务 ID |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/do-button-click' \

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-reference.md (reported line 241)May include surrounding context.

|------|------|------|------| | imgs | string[] | 是 | 图片 URL 数组,2-5 张 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/blend' \

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-reference.md (reported line 273)May include surrounding context.

| maskBase64 | string | 是 | 蒙版图片的 Base64 编码 | | prompt | string | 是 | 新的提示词 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/submit-modal' \

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-reference.md (reported line 301)May include surrounding context.

|------|------|------|------| | imgUrl | string | 是 | 图片 URL |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/img-describe-mj' \

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-reference.md (reported line 357)May include surrounding context.

| quality | string | 否 | standard/hd(仅 DALL-E 3) | | style | string | 否 | vivid/natural(仅 DALL-E 3) |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/openai-dalle-painting' \

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-reference.md (reported line 402)May include surrounding context.

| image_url | string | 否 | 参考图 URL(传入则走图生图) | | image_strength | number | 否 | 参考图权重,默认 0.5 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/sd-painting' \

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-reference.md (reported line 441)May include surrounding context.

| seed | number | 否 | 随机种子 | | resolution | string | 否 | 分辨率,默认 1080p |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/ai-video-generate' \

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-reference.md (reported line 489)May include surrounding context.

单图示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/jimeng4-generate' \
  -H 'Authorization: your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{

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-reference.md (reported line 540)May include surrounding context.

| prompt | string | 是 | 提示词,最长 10000 字符 | | image_urls | string[] | 否 | 参考图 URL 数组 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/nanobanana-generate' \

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-reference.md (reported line 580)May include surrounding context.

| codeformer_visibility | number | 否 | 面部修复可见度 | | codeformer_weight | number | 否 | 面部修复权重 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/image-upscale' \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation exposes a face-swap capability using arbitrary source and target image URLs without any consent, identity, or misuse warning. In a general-purpose agent skill, this materially increases the risk of non-consensual impersonation, harassment, and deceptive media generation because the skill normalizes the operation as a routine API action.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
76% confidence
Finding

While external transmission is normally expected, this specific endpoint sends face images for a face-swap operation, a high-abuse biometric/media-manipulation use case. In the skill context, transmitting source and target face images to an external service without any documented consent, privacy, or misuse controls increases the risk of non-consensual deepfake creation and exposure of sensitive biometric data.

Content

Scanner excerpt · references/api-reference.md (reported line 608)May include surrounding context.

| source | string | 是 | 人脸源图 URL | | target | string | 是 | 目标图 URL |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/face-swap' \

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-reference.md (reported line 636)May include surrounding context.

|------|------|------|------| | params | object | 是 | 二维码生成参数(含 prompt、二维码内容等) |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/qrcode-generate' \

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-reference.md (reported line 667)May include surrounding context.

| prompt | string | 是 | 音乐描述 | | modelVersion | string | 否 | v3(默认)或 v2 |

curl 示例:

bash
curl -X POST 'https://superx.chat/art/imgapi/suno-music-generate' \

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line 18 switches to Chinese for API key retrieval guidance, while the rest of the file is in English, and there is no user opt-in or explanation for the locale change. This can violate language/locale policy by forcing a specific language unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The parameter description explicitly states '英文提示词' for the prompt, imposing a language requirement. The document does not present this as an optional model limitation with user choice or a documented policy justification, so it appears to force a specific language.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.