Back to skill

Security audit

Jimeng-Image-Generater

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly aligned with image generation, but it handles cloud credentials and user-supplied content in ways that deserve review before installation.

Review before installing. Use a least-privilege Volcengine key, avoid sensitive prompts or reference images, and do not use the Feishu target option unless you trust the local service on localhost:18789. The publisher should fix JSON construction with a real encoder, avoid passing secrets on the command line, document data sharing clearly, and correct the text-to-Feishu argument examples.

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

Warning
Location
scripts/jimeng.sh:13
Finding

Volcengine Secret Key Exposed Through Process Command-Line Arguments

Content
View full analysis
") sys.exit(1) ak = sys.argv[1] sk = sys.argv[2] ``` ### Technical Analysis The shell script passes `VOLCENGINE_AK` and `VOLCENGINE_SK` to `sign.py` as command-line arguments. Command-line arguments may be exposed through operating-system process inspection interfaces such as `/proc//cmdline`, process-monitoring utilities, audit services, diagnostic tooling, or command telemetry. The exposure window lasts while the signing process is running. Exploitation therefore requires local process visibility or access to process-monitoring records. The exact visibility boundary depends on operating-system configuration, user separation, `/proc` mount options, and monitoring permissions. Although the credentials initially come from environment variables, copying them into `argv` unnecessarily increases exposure because complete process command lines are frequently collected and retained by operational tooling. ### Attack Path 1. A user invokes `jimeng.sh` with valid Volcengine credentials in `VOLCENGINE_AK` and `VOLCENGINE_SK`. 2. `generate_auth_header` starts `sign.py`, placing both credentials in the child process command line. 3. A local attacker or monitoring component with permission to inspect that process reads its command-line arguments while it is running, or retrieves them from collected process telemetry. 4. The attacker extracts the access key an ...[truncated 661 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/jimeng.sh:42
Finding

Unescaped User-Controlled Values Are Interpolated into JSON Requests

Content
View full analysis
/dev/null else echo "图片已生成: $image_url" fi } ``` ### Technical Analysis The script constructs JSON through string concatenation rather than using a JSON serializer. The following values can contain attacker-controlled data: - `prompt`, which is inserted into `prompt` and later into the Feishu `message` field. - `reference_url`, which can become an element of `image_urls`. - `target`, which is inserted into the localhost gateway's `target` field. - The generated image URL, which is inserted into the gateway's `media` field. JSON metacharacters such as double quotes, backslashes, and control characters are not escaped. A crafted value can therefore terminate its intended string and add additional JSON properties. Whether duplicate injected properties override legitimate pr ...[truncated 2704 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The skill appears to expose cryptographic signing behavior beyond simple image generation, including arbitrary method/path/query/body signing via a CLI utility. That materially expands the skill's capability: if misused, it could help generate authenticated requests for unintended APIs using the configured Volcengine credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill appears to expose cryptographic signing behavior beyond simple image generation, including arbitrary method/path/query/body signing via a CLI utility. That materially expands the skill's capability: if misused, it could help generate authenticated requests for unintended APIs using the configured Volcengine credentials.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documentation declares no explicit tool scope even though the skill clearly requires shell execution and network access to call Volcengine and optionally deliver results onward. Missing scope declarations weakens user and platform visibility into what the skill can do, increasing the chance of unintended execution paths or approval bypass for networked actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill says it can send generated images to Feishu but does not clearly warn that prompts, reference image URLs, and generated outputs may be transmitted to third-party services. This is a privacy and data-handling issue because users may unknowingly disclose sensitive text or image content to external providers or messaging platforms.

Content

No source excerpt is available for this finding.

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/jimeng.sh (reported line 50)May include surrounding context.

sh
local payload_hash=$(echo "$auth_info" | head -2 | tail -1)
    local authorization=$(echo "$auth_info" | tail -1)
    
    local response=$(curl -s -X POST "$SUBMIT_URL?$query" \
        -H "Content-Type: application/json" \
        -H "Host: visual.volcengineapi.com" \
        -H "X-Date: $current_date" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This shell script sends the user's prompt and optional reference image URL to the external Volcengine service via HTTP requests. While the script prints status messages, it does not disclose to the user that their content is being sent to a third-party service, which is a safety-relevant network operation for code files.

Content

No source excerpt is available for this finding.

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/jimeng.sh (reported line 77)May include surrounding context.

sh
local payload_hash=$(echo "$auth_info" | head -2 | tail -1)
    local authorization=$(echo "$auth_info" | tail -1)
    
    local response=$(curl -s -X POST "$QUERY_URL?$query" \
        -H "Content-Type: application/json" \
        -H "Host: visual.volcengineapi.com" \
        -H "X-Date: $current_date" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
74% confidence
Finding

The script sends user-controlled caption, target, and media URL into a locally exposed HTTP service by manually interpolating them into JSON without escaping. If an attacker can supply crafted values containing quotes or JSON fragments, they may alter the payload sent to the local messaging bridge, causing message spoofing, parameter injection, or unintended actions in whatever service listens on localhost:18789.

Content

Scanner excerpt · scripts/jimeng.sh (reported line 131)May include surrounding context.

sh
local target="$3"
    
    if [ -n "$target" ]; then
        curl -s -X POST "http://localhost:18789/message" \
            -H "Content-Type: application/json" \
            -d "{
                \"action\": \"send\",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

When a target is provided, the script posts the caption and generated image URL to a local messaging bridge for Feishu delivery. This is a network transmission of user content, but the usage text only describes the target parameter and does not warn that content will be sent onward to Feishu.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, headings, parameter descriptions, and examples are presented only in Chinese. Per SQP-3, forcing a single language without user opt-in can be a language/locale policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script requires and uses VOLCENGINE_AK and VOLCENGINE_SK to sign outbound API requests. Although it checks for their presence, it does not warn the user that sensitive cloud credentials are required and will be used for authenticated external requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.