Back to skill

Security audit

bizyair-banana2

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its image-generation purpose, but its instructions can expose a paid BizyAir API key and its triggers are broad enough to cause unintended use.

Install only if you are comfortable sending prompts and reference images to BizyAir and paying for generated outputs. Prefer an environment variable or secret manager for BIZYAIR_API_KEY, do not run commands that print .env files, never share those files or terminal output containing them, and rotate the key if it has already appeared in logs or screenshots.

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
SKILL.md:183
Finding

Troubleshooting Instructions Expose API Credentials in Terminal and Agent Logs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 183–191
Vulnerability Type: Credential disclosure through unsafe troubleshooting instructions
Risk Level: Medium

Vulnerable Code Snippet

bash
### 1. Check API Key
```bash
# Method 1: Check the Skill directory .env
cat /path/to/skills/bizyair-banana2/.env

# Method 2: Check user configuration
cat ~/.config/bizyair-banana2/.env
cat ~/.bizyair-banana2/.env
text

### Technical Analysis

The referenced `.env` files are documented as containing the user's `BIZYAIR_API_KEY`. The troubleshooting commands print their complete contents directly to standard output.

Although reading a dedicated Skill configuration file internally is necessary for authentication, displaying the full file is not required for diagnosis and violates the principle of minimizing secret exposure. When these commands are executed through an AI agent or interactive terminal, the credential may be retained in tool transcripts, terminal history captures, support logs, screen recordings, or session telemetry.

The executable script itself restricts credential lookup to the environment and Skill-specific configuration paths and transmits the key only to the BizyAir API. The vulnerability is therefore in the documented troubleshooting procedure rather than evidence of intentional credential exfiltration.

### Attack Path

1. A user encounters an authentication or configuration problem.
2. The user or an AI agent follows the troubleshooting procedure in `SKILL.md`.
3. One or more `cat` commands print the complete `.env` file, including `BIZYAIR_API_KEY`.
4. The command output is captured in an agent transcript, terminal log, support record, screen share, or other observable channel.
5. An unauthorized party with access to that output extracts the bearer credential.
6. The party reuses the key against BizyAir services within the permissions and account limits associated with
...[truncated 503 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all instructions that print .env files or credential values.

  2. Replace them with checks that confirm file existence and key presence without displaying the secret, for example:

    bash
    config="$HOME/.config/bizyair-banana2/.env"
    
    if [ -f "$config" ]; then
      echo "Configuration file exists"
    else
      echo "Configuration file is missing"
    fi
    
    if grep -q '^BIZYAIR_API_KEY=.' "$config" 2>/dev/null; then
      echo "BIZYAIR_API_KEY is configured"
    else
      echo "BIZYAIR_API_KEY is missing or empty"
    fi
    
  3. Recommend restrictive permissions for credential files:

    bash
    chmod 600 ~/.config/bizyair-banana2/.env
    chmod 600 ~/.bizyair-banana2/.env
    
  4. Instruct users to rotate the API key immediately if it has already appeared in an agent transcript, terminal capture, support log, or screen recording.

  5. Prefer environment-based secret injection or a dedicated secret manager where supported, and ensure application errors never include credential values.

  6. Update every troubleshooting guide consistently so unsafe commands are not reintroduced from copied documentation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (37)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · CONFIG.md (reported line 5)May include surrounding context.

⚙️ API Key 配置

方式 1:.env 文件(推荐)

在技能目录创建 .env 文件:

bash

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README_SHARE.md (reported line 27)May include surrounding context.

⚙️ API Key 配置

方式 1:.env 文件(推荐)

在技能目录创建 .env 文件:

bash

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 322)May include surrounding context.

python
## ⚙️ API Key 配置

### 方式 1:.env 文件(推荐)

在技能目录创建 `.env` 文件:
```bash

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test.sh (reported line 20)May include surrounding context.

sh
## ⚙️ API Key 配置

### 方式 1:.env 文件(推荐)

在技能目录创建 `.env` 文件:
```bash

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README_SHARE.md (reported line 26)May include surrounding context.

bash
cd bizyair-banana2/
cp .env.example .env
# 编辑 .env 填入你的 API Key

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

Instructing users to store a live API key in a skill-local .env file can expose credentials to other local processes, backups, accidental publication, or future tooling that reads the skill directory. In the context of a networked paid API, leaked credentials can directly enable unauthorized usage and billing abuse.

Content

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

在技能目录创建 .env 文件:

bash
# 技能目录/.env
BIZYAIR_API_KEY=your_api_key_here

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The troubleshooting section explicitly tells users to cat .env files that contain API keys. Displaying secrets in the terminal materially increases the chance of exposure via shell history capture, terminal logging, screen sharing, copy/paste mistakes, or observation by other users.

Content

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

1. 检查 API Key

bash
# 方式 1:检查技能目录的.env
cat /path/to/skills/bizyair-banana2/.env

# 方式 2:检查用户目录配置
cat ~/.config/bizyair-banana2/.env

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The documentation continues to direct users to print configuration files from user directories that likely contain the API key. Enumerating and displaying secrets across multiple paths expands the exposure surface and normalizes insecure secret-handling practices.

Content

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

cat /path/to/skills/bizyair-banana2/.env

方式 2:检查用户目录配置

cat ~/.config/bizyair-banana2/.env cat ~/.bizyair-banana2/.env

text

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

This line again instructs displaying another likely secret-bearing .env file in plaintext. Repeated credential-retrieval guidance in a skill that depends on a billable external API increases the practical likelihood of credential leakage and unauthorized third-party use.

Content

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

方式 2:检查用户目录配置

cat ~/.config/bizyair-banana2/.env cat ~/.bizyair-banana2/.env

text

### 2. 运行测试

Tainted flow: 'files' from open (line 123, file read) → requests.post (network output)

High
Category
Data Flow
Confidence
80% confidence
Finding

File contents flow to a network sink. This may indicate data exfiltration of sensitive files.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 135)May include surrounding context.

python
'x-oss-security-token': security_token,
    }
    
    response = requests.post(oss_url, data=oss_data, files=files, timeout=60)
    if response.status_code != 204:
        raise Exception(f"OSS 上传失败:{response.status_code} {response.text}")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 36)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 38)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 40)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 41)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 43)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/bizyair_gen.py (reported line 323)May include surrounding context.

python
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test.sh (reported line 19)May include surrounding context.

sh
echo "  export BIZYAIR_API_KEY=\"your_key\""
    echo ""
    echo "或创建配置文件:"
    echo "  cp $SCRIPT_DIR/.env.example $SCRIPT_DIR/.env"
    echo "  编辑 .env 填入 API Key"
    echo ""
    exit 1

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to place an API key in a local .env file but does not warn them to keep the file out of version control, restrict file permissions, or avoid sharing it. This can lead to accidental credential exposure through Git commits, backups, screenshots, or copied project folders, especially because README setup instructions are often followed verbatim.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents behavior that uses environment variables, reads local files, and sends data over the network, but it does not declare any tool scope or permissions. This creates a transparency and consent gap: users and hosting agents may invoke the skill without an explicit declaration that secrets, local reference images, and prompts can be accessed and transmitted externally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation says the skill directly calls the BizyAir API to generate images, but it does not clearly warn users that prompts and reference images are sent to a third-party service. Users may unknowingly upload sensitive personal images or confidential text prompts to an external provider, creating privacy and compliance risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs users to place an API key in a .env file and provides retrieval-oriented configuration guidance, but it does not warn that the key is sensitive and must not be exposed, committed, or echoed. This increases the chance of accidental credential disclosure through source control, shared directories, screenshots, or debugging output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The metadata is written only in Chinese and the triggers are Chinese-centric, but there is no documented locale restriction or user opt-in indicating the skill should activate only for Chinese-language contexts. This can create routing ambiguity and poor consent boundaries in multilingual environments, where users may not understand why the skill was invoked or what external service it uses.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes very broad phrases such as "画" and generic product words like "Banana", which are likely to appear in ordinary conversation and can cause unintended skill activation. In an agent environment, accidental invocation can redirect user requests to this skill, leading to unexpected external API use, privacy leakage in prompts, or unintended paid actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's user-facing description, argument help text, status messages, and setup instructions are all hard-coded in Chinese, indicating a fixed language/locale experience. The policy requires flagging language constraints when the skill forces a specific language without user opt-in or an explicit justified regional limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes an image-generation skill using BizyAir and Nano Banana 2, but this function expands scope by searching several filesystem locations, including ~/.config and other home-directory paths, for secrets. Accessing arbitrary local credential files is not an obvious requirement of the stated user-facing purpose and introduces local data access beyond simple prompt/image handling.

Content

No source excerpt is available for this finding.