Back to skill

Security audit

Image Generation

Security checks across malware telemetry and agentic risk

Overview

The skill’s image-generation purpose is real, but it gives the agent broad, partly hidden setup and credential-handling authority that users should review before installing.

Install only if you are comfortable sending prompts and any chosen reference images to WeryAI, storing an IMAGE_GEN_API_KEY locally, and letting the agent manage setup files. Prefer a project-scoped API key with limited billing exposure, avoid sensitive local images unless you intend to upload them, review any tool-install prompt carefully, and rotate/remove the key if the workspace is shared or committed.

SkillSpector

By NVIDIA
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill explicitly requires access to environment variables and outbound network connectivity, but it does not declare permissions in a formal, auditable way. That mismatch can bypass platform trust and review expectations, making secret access and external exfiltration harder to govern.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The script recursively discovers package.json files and runs `npm install` in each matching directory via `spawnSync`, which executes lifecycle scripts from dependencies and performs network/package-fetch activity. For an image-generation skill, this bootstrap capability is not part of the stated runtime purpose, and if invoked on an untrusted or modified workspace it can trigger arbitrary code execution through malicious dependencies or install hooks.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill defines a `useWebSearch` capability in its CLI/config types even though the stated purpose is single-gateway image generation. This expands behavior into remote retrieval/search without clear disclosure, which can cause unexpected data exposure or policy bypass when prompts are sent to a provider feature the user did not explicitly request.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The CLI accepts `--use-web-search`, enabling undisclosed search/retrieval behavior at runtime. In an agent skill, hidden capability expansion is risky because user prompts and context may be forwarded to external search systems outside the expected image-generation-only workflow.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The code conditionally sends `use_web_search=true` to the remote WeryAI API, confirming that prompts may trigger external retrieval beyond image generation. This is dangerous because sensitive prompt content or internal context can leave the expected processing boundary and because the capability is not aligned with the advertised skill scope.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The CLI exposes a `--use-web-search` option and forwards it to the third-party gateway as `use_web_search=true`, which expands the skill from image generation into external information retrieval. That broadens data flow and agent capability beyond the stated purpose, potentially sending user prompts to web-search-enabled backend behavior without an explicit user acknowledgement.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill accepts arbitrary `--webhook-url` input and sends it to the provider, enabling outbound callbacks to any attacker-chosen destination. In an agent setting this can be abused for SSRF-like behavior, internal endpoint targeting, or unintended data exfiltration through a third-party callback mechanism.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The instructions encourage persisting an API key to a local `.env` file without requiring an explicit warning about the security implications of storing a bearer token on disk. If the workspace is shared, committed, backed up insecurely, or readable by other local users/processes, the key could be exposed and abused for unauthorized API use.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
At execution time the tool transmits prompts, optional negative prompts, reference images, and possibly webhook URLs to `api.weryai.com` and then downloads result URLs, but there is no clear runtime consent or privacy warning before sending potentially sensitive user content off-box. In an agent environment, users may assume local processing and unknowingly disclose private data to a third party.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The setup script can persist IMAGE_GEN_API_KEY into a project- or home-scoped .env file with no interactive confirmation or restrictive permission handling. In an agent skill context, this increases the chance that a secret from the process environment is silently written to disk in a workspace that may be shared, committed, or later exposed to other tools.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
When the user wants image generation but no model is configured (`EXTEND.md`, `--model`, and `IMAGE_GEN_DEFAULT_MODEL` are all absent):

**Do not ask the user to read docs or edit config files.** Follow the guided flow in [references/config/first-time-setup.md](references/config/first-time-setup.md) § "Model Selection — Agent-Guided Flow":

1. Start from the bundled starter registry shipped with this skill. If the model list looks stale or a requested model is missing, refresh it silently with `npm run discover-image-models -- --out .image-skills/image-generation/MODELS.json`
2. Initialize local defaults with **Nano Banana 2** (`GEMINI_3_1_FLASH_IMAGE`) by writing `EXTEND.md`
Confidence
88% confidence
Finding
Do not ask the user

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
These rules apply to every user interaction. They are not optional guidelines.

1. **Never show commands, file paths, config syntax, or schema details to the user.** All tool execution is silent.
2. **Never ask the user to edit config files.** The agent writes `EXTEND.md`, `MODELS.json`, and other configs on behalf of the user.
3. **Ask one question at a time.** Do not present all dimensions at once. Lead with the highest-impact choice.
4. **Offer concrete options with descriptions**, not raw technical names. If presenting styles, describe what each looks like.
5. **Always disclose the model and estimated time** when generation starts.
Confidence
91% confidence
Finding
Never ask the user

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
2. **Propose installation in user-friendly terms.** Say something like: "I need to set up a small runtime to generate images — OK if I install it now? Takes about 30 seconds."
3. **On user approval**, run `npm install -g bun` or the platform-appropriate installer silently. Report success or failure in plain language.
4. **If the user declines or installation fails**, explain honestly: "I can't generate images in this environment right now. You can ask your admin to set up the image toolchain, or try again in a different environment."
5. **Never ask the user to install tools themselves** or paste terminal commands.

## Troubleshooting
Confidence
89% confidence
Finding
Never ask the user

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Treat the API key as a secret:

- prefer writing it locally on the user's behalf instead of making the user edit files
- do not ask the user to paste the key into normal chat if a local write path is available
- if the user does share the key, never echo it back or include it in follow-up messages

## 2. API Key
Confidence
84% confidence
Finding
do not ask the user

Credential Access

High
Category
Privilege Escalation
Content
3. **If `IMAGE_GEN_API_KEY` is missing**, ask the user for permission to configure it now
4. Only after readiness and API key are resolved, continue to model selection / prompt clarification / generation

**Access token**: only use **`IMAGE_GEN_API_KEY`**. It may also live in `.image-skills/image-generation/.env` as `IMAGE_GEN_API_KEY=...`. After the user approves, the agent may persist it there by running `npm run setup -- --project . --workflow <workflow> --persist-api-key` when the key is already in env, or by writing the file locally on the user's behalf instead of asking the user to edit files manually.

**First-use readiness check**: before the first generation run in a new OpenClaw or local instance, the agent must run:
Confidence
95% confidence
Finding
Access token

VirusTotal

No VirusTotal findings

View on VirusTotal

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.potential_exfiltration

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/bootstrap.mjs:86

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/doctor.mjs:56

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/smoke-check.mjs:18

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/bootstrap.mjs:86

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/doctor.mjs:56

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/smoke-check.mjs:18

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/discover-models.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/doctor.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/main.ts:15

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/recommend-model.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/run-generate.mjs:39

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/setup.mjs:9

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/main.ts:51

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/vendor/shared-image-generation/scripts/main.ts:51

File read combined with network send (possible exfiltration).

Warn
Code
suspicious.potential_exfiltration
Location
scripts/main.ts:6

File read combined with network send (possible exfiltration).

Warn
Code
suspicious.potential_exfiltration
Location
scripts/vendor/shared-image-generation/scripts/main.ts:6