Back to skill

Security audit

Ai Image Cli

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill is mostly coherent, but its installer uses unsafe package-installation and credential-handling patterns that deserve manual review before installation.

Review this skill before installing. Only use it in an environment where you trust the internal package index and the ai-image-cli package, rotate or remove the exposed repository credentials, prefer HTTPS with pinned hashes, and do not allow untrusted users or processes to write ~/.openclaw/user.env because the scripts execute it as shell code. Avoid submitting sensitive prompts, private image URLs, or secrets unless you are comfortable sending them to the documented remote services.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
scripts/install.sh:14
Finding

Hardcoded Repository Credentials Transmitted over Unencrypted HTTP

Content
View full analysis
&2 PIP_INDEX_URL="$DEFAULT_PYPI_INDEX" fi export PIP_TRUSTED_HOST PIP_INDEX_URL ``` ### Technical Analysis The installer embeds the username and password `avlab:avlab123` directly in the repository URL. Anyone with access to the project can recover and attempt to reuse these credentials. The repository uses plain HTTP rather than HTTPS. HTTP Basic credentials embedded in a URL are encoded for transport but are not encrypted. A party capable of observing the connection can recover the credentials and inspect or modify repository traffic. Setting `PIP_TRUSTED_HOST` also instructs pip to accept the host without normal TLS-based authenticity guarantees. This creates both a credential-exposure vulnerability and a package supply-chain vulnerability. An attacker positioned on the network may be able to return a modified package or package metadata while the installer believes it is communicating with the intended repository. ### Attack Path 1. A user or Agent runs `scripts/install.sh`. 2. The script exports an HTTP repository URL containing the hardcoded credentials. ...[truncated 1042 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/install.sh:127
Finding

Unpinned Installation of Unreviewed Code from a Mutable Remote Package Index

Content
View full analysis
&2 install_output="" if install_output=$($PIP_CMD "${INSTALL_ARGS[@]}" 2>&1); then echo "pip install succeeded" >&2 else # If global installation fails, automatically fall back to --user. if [[ "$USER_INSTALL" == false ]]; then echo "Global installation failed; attempting user installation (--user)..." >&2 INSTALL_ARGS+=(--user) if ! install_output=$($PIP_CMD "${INSTALL_ARGS[@]}" 2>&1); then print_error "pip installation failed globally and for the user: $(echo "$install_output" | tail -3 | tr '\n' ' ')" fi echo "User installation succeeded" >&2 else print_error "pip install --user failed: $(echo "$install_output" | tail -3 | tr '\n' ' ')" fi fi ``` The documentation also recommends the same unpinned installation pattern: ```bash pip install ai-image-cli \ -i http://music-pypi.hz.netease.com/simple \ --trusted-host music-pypi.hz.netease.com ``` ### Technical Analysis The installer requests `ai-image-cli` by package name without an exact version or cryptographic hash. The selected artifact can therefore change whenever the remote index publishes or replaces a release. The `--upgrade` option explicitly requests the newest available version, further weake ...[truncated 1976 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/install.sh:80
Finding

Arbitrary Shell Execution Through Sourced Environment Files

Content
View full analysis
&2 break fi done fi ``` From `scripts/preflight.sh`: ```bash USER_ENV_CANDIDATES=( "${HOME:+${HOME}/.openclaw/user.env}" "/home/appops/.openclaw/user.env" ) if [[ -n "${LANGBASE_TOKEN:-}" ]] || [[ -n "${ARK_API_KEY:-}" ]]; then ENV_SOURCE="inherited" else for candidate in "${USER_ENV_CANDIDATES[@]}"; do [[ -z "$candidate" ]] && continue if [[ -f "$candidate" ]]; then set -a # shellcheck source=/dev/null source "$candidate" set +a ENV_SOURCE="user.env" break fi done fi ``` ### Technical Analysis The scripts use Bash `source` to load files represented as environment configuration. `source` does not parse only `KEY=value` entries; it executes the entire file in the current shell. Command substitutions, function definitions, redirections, external commands, and arbitrary shell statements are all accepted. No ownership, permission, symlink, or file-type validation is performed before execution. The fallback path `/home/appops/.openclaw/user.env` introduces an additional trust boundary because it may not belong to the effective user running the script. The installer conditionally sources the file when pip-related variables are absent. The preflight ...[truncated 1542 chars]
Remediation
View remediation
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 (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to generate or edit images, but it also performs environment readiness checks, credential detection, local env-file sourcing, and connectivity diagnostics. In this context, those extra behaviors can expose sensitive configuration details or normalize broader host inspection than users would expect from an image tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to generate or edit images, but it also performs environment readiness checks, credential detection, local env-file sourcing, and connectivity diagnostics. In this context, those extra behaviors can expose sensitive configuration details or normalize broader host inspection than users would expect from an image tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill does not warn users that prompts and image URLs may be transmitted to an external API provider. This is a privacy and data-handling issue because users may supply sensitive text or private image links without realizing that the content leaves the local environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The entire skill description, triggers, examples, and operational guidance are presented only in Chinese, which implicitly enforces a single language/locale experience. There is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation phrases include very common expressions such as '画一个', '改成', and '转为图片', which are likely to match ordinary conversation. Overbroad triggering can cause the skill to activate unexpectedly and send prompts or image URLs to external tooling without sufficiently clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document explicitly describes sending authentication material, prompts, and image URLs to external services, but it does not warn users that their inputs and identifiers leave the local environment. In a CLI skill context, users may assume local-only processing, so omission of data-transfer and privacy disclosures can cause unintentional exposure of sensitive prompts, internal image links, or enterprise tokens to third-party infrastructure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script embeds repository credentials directly in DEFAULT_PYPI_INDEX using an HTTP URL, which exposes secrets in the skill source and can transmit them without transport security. Anyone with access to the script can recover the credentials, and network interception could leak them or allow package-tampering against the installation flow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The installer sources ~/.openclaw/user.env into the current shell and exports whatever variables it contains before performing a package installation. Because this skill is presented as an image-generation tool, loading arbitrary user-controlled shell content and handling package-index authentication is beyond the minimally necessary scope and creates a risk of unintended secret exposure or execution of attacker-influenced shell code if that file is tampered with.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script imports and exports sensitive package-index variables from a user environment file without explicit user consent or warning, then uses them for package installation. This can unintentionally disclose secrets to subprocesses, logs, or unexpected package sources, especially when the script also rewrites PIP_INDEX_URL based on internal-host matching.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script's comments, usage text, and user-visible issue messages are written entirely in Chinese, which effectively imposes a specific language on users. There is no indication that the skill is region-specific or that users can opt into another language, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically sources a per-user environment file to import credentials into the current shell without validating ownership/permissions or clearly disclosing that secrets will be loaded. In an agent-executed context, this expands the trust boundary to a mutable local file and can expose or misuse credentials if that file is tampered with or unexpectedly populated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

SQP-3 适用于所有文件类型。该文档在提示词最佳实践中明确表示“中英文均可,建议使用中文”,但未说明这是可选偏好、也未提供基于用户选择的语言方案,容易形成默认语言偏置。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This is a markdown file, so SQP-2 applies to omissions in the skill description. The section shows a script that fetches a remote image URL with curl and saves it to a user-specified local file, but the surrounding documentation does not explicitly warn that it will perform a network download and overwrite/create a local file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The workflow example consumes LANGBASE_TOKEN, makes automated generation requests, stores JSON results, and uploads them as artifacts. In markdown, SQP-2 expects warnings when behavior can affect privacy, user data, or system integrity; here there is no explicit caution that prompts/results may be persisted and published through CI artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

All help text, status messages, and errors are presented in Chinese, which imposes a language choice on all users of the skill. There is no opt-in, fallback language, or documentation indicating that the skill is intentionally restricted to a Chinese-speaking environment.

Content

No source excerpt is available for this finding.