Back to skill

Security audit

aigc-images

Security checks for vulnerabilities and agentic risk

Overview

This skill is for BizyAir image generation, but it handles API keys and prompt content in ways that need careful review before installation.

Install only after reviewing the credential-handling risks. Prefer not to use remote key URLs, use limited or disposable BizyAir keys, assume prompts and credentials are sent to BizyAir, and check that /tmp/bizyair.txt does not retain API keys after use. The publisher should remove plaintext key storage, validate remote key sources, make prompt changes explicit and opt-in, and align the helper script with the documented workflow.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:130
Finding

Plaintext API Keys Stored in a Predictable Shared Temporary File

Content
View full analysis
/tmp/bizyair.txt # Function for recording tasks record_task() { local request_id="$1" local api_key="$2" local task_index="$3" echo "${task_index}|${request_id}|${api_key}" >> /tmp/bizyair.txt } ``` The function is subsequently called with the active API key: ```bash if [ -n "$REQUEST_ID" ] && [ "$REQUEST_ID" != "null" ]; then record_task "$REQUEST_ID" "$API_KEY" "$((i+1))" echo "✅ Task $((i+1)) created: requestId = $REQUEST_ID" fi ``` ### Technical Analysis The workflow writes active BizyAir API keys in plaintext to the fixed path `/tmp/bizyair.txt`. The file is created using ordinary shell redirection without: - A restrictive `umask` - Explicit permissions such as mode `0600` - Atomic, exclusive file creation - Symlink checks - A unique per-process filename A shared temporary directory is commonly writable by all local users. Although directory-level protections may prevent deletion of files owned by other users, they do not inherently make the contents of newly created files confidential. Under a permissive process umask, another local user may be able to read the stored bearer tokens. The predictable path also introduces a time-of-check/time-of-use and symbolic-link risk. If an attacker can pre-create `/tmp/bizyair.txt` as a symbolic link before a privileged execution, the initial truncation and subsequent writes may affect the link target. Automatic deletion after task completion does not eliminate exposure during execution and does not address symlink-based modification. ### Attack Path 1. A local attacker predicts that the Skill will use `/tmp/bizyair.txt`. 2. The attacker either monitors the fixed file or pre-creates it as a symbolic link to another writable or security-sen ...[truncated 1109 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:107
Finding

Unrestricted Remote Key URL Enables Server-Side Request Forgery and Data Forwarding

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
assets/bizyair_api.sh:120
Finding

Unescaped Prompt Interpolation Allows JSON Request-Body Injection

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior is internally inconsistent and understates materially relevant actions, including prompt rewriting and credential handling. Security review and user consent depend on accurate descriptions; when the skill says it does one thing but also modifies prompts and handles secrets in other ways, users and orchestrators cannot reliably assess risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow stores API keys in plaintext in /tmp/bizyair.txt without warning users. Temporary directories are commonly accessible to other local processes or users depending on environment configuration, so plaintext secret persistence materially increases credential leakage risk.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The state file format explicitly records task_index|request_id|api_key, creating a reusable plaintext credential cache in a predictable temporary path. Because later functions read this file automatically, any process or follow-up interaction that accesses it can recover and reuse secrets for unauthorized API operations.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
# 清理任务状态文件
cleanup_tasks() {
  if [ -f /tmp/bizyair.txt ]; then
    rm -f /tmp/bizyair.txt
    echo "🧹 已清理临时文件:/tmp/bizyair.txt"
  fi
}

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented history-query flow legitimizes reopening prior task records that contain credentials, effectively training the agent to treat previously supplied secrets as durable and reusable. This expands the window for accidental disclosure and makes unauthorized follow-up use of API keys much easier.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description promises batch multi-key execution from local files or remote URLs, but the script only reads a single API key from the environment and performs one task creation flow. This mismatch is dangerous because operators may assume isolation, batching, or key-rotation behavior that does not exist, leading to misuse, failed operational controls, and accidental exposure of production credentials in unsupported workflows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill contains substantial shell-based behavior (curl, jq, file operations, polling loops) but declares no explicit tool scope or allowed-tools boundary. This weakens governance and increases the chance an agent can invoke shell/network actions beyond user expectations, especially because the skill is marked as mandatory for certain requests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill claims automatic cleanup of temporary task-state files, yet later workflows depend on the same file remaining available for history queries. This contradiction can mislead users into believing sensitive state is ephemeral when in practice it may persist, increasing exposure of request IDs and API keys.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a batch image-generation assistant that reads multiple API keys from local files or remote URLs and uses them to create concurrent BizyAir tasks. The documented fallback to read BIZYAIR_API_KEY from the process environment adds a credential-harvesting capability that is not part of the stated required use case and is not justified by the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill supports fetching API keys from an arbitrary remote URL but does not clearly warn that this causes outbound network access and ingests secrets from an untrusted external source. That creates SSRF-like and secret-handling risks, and users may not realize credentials are being sourced over the network.

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

md
echo "📝 创建任务 $((i+1))/$TASK_COUNT ..."

  # 创建任务
  RESP=$(curl -s -X POST "https://api.bizyair.cn/w/v1/webapp/task/openapi/create" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "X-Bizyair-Task-Async: enable" \

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The global constraints promise automatic cleanup, but the documented history-query scenario relies on preserved state. This inconsistency matters because it normalizes retention of sensitive data under the guise of cleanup, making later unauthorized access more plausible.

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

md
set +e  # 轮询阶段(在下面切换)

# API 配置
API_ENDPOINT="https://api.bizyair.cn/w/v1/webapp/task/openapi"
WEB_APP_ID=38262

# 超时配置(秒)

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

md
set +e  # 轮询阶段(在下面切换)

# API 配置
API_ENDPOINT="https://api.bizyair.cn/w/v1/webapp/task/openapi"
WEB_APP_ID=38262

# 超时配置(秒)

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

md
set +e  # 轮询阶段(在下面切换)

# API 配置
API_ENDPOINT="https://api.bizyair.cn/w/v1/webapp/task/openapi"
WEB_APP_ID=38262

# 超时配置(秒)

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 · assets/bizyair_api.sh (reported line 18)May include surrounding context.

sh
set +e  # 轮询阶段(在下面切换)

# API 配置
API_ENDPOINT="https://api.bizyair.cn/w/v1/webapp/task/openapi"
WEB_APP_ID=38262

# 超时配置(秒)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script silently modifies user input by appending undisclosed sexualized/model-specific prompt text when certain keywords are detected. This creates an integrity and safety issue because users may unknowingly submit altered content to a third-party service, potentially generating unwanted sexualized material and causing policy, reputational, or consent problems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sends the user prompt and bearer token to an external API without any explicit disclosure or confirmation at the point of use. In a skill that may process sensitive creative prompts or private business content, undisclosed third-party transmission creates privacy, compliance, and data-handling risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This code transmits user-controlled prompt content and an authorization bearer token to a remote third-party endpoint. External transmission is expected for an API client, but in this skill it becomes security-relevant because the transfer is not clearly disclosed and the prompt may be silently modified before being sent.

Content

Scanner excerpt · assets/bizyair_api.sh (reported line 117)May include surrounding context.

sh
echo "📤 创建任务: prompt='$PROMPT', size=${WIDTH}x${HEIGHT}, batch=$BATCH_SIZE"

# 创建任务
RESPONSE=$(curl -s -X POST "$API_ENDPOINT/create" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $BIZYAIR_API_KEY" \
    -H "X-Bizyair-Task-Async: enable" \

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script requires and uses the BIZYAIR_API_KEY environment variable, which is a sensitive credential. While it checks for the variable's presence, there is no warning in the usage/help text or comments about protecting this secret or that it will be used for outbound authenticated requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.