Back to skill

Security audit

Cs Free Image Generator Nv

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward NVIDIA image-generation skill, with disclosed API use and local JSON output, but users should avoid sensitive prompts and review its credential/temp-file handling.

Install only if you are comfortable sending prompts and generated output metadata to NVIDIA and storing full response JSON under /tmp. Keep ~/.openclaw/.env limited to necessary secrets, and prefer a hardened version that reads only NVIDIA_API_KEY and writes output to a private, randomly named file.

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/cs-free-image-generator-nv.py:15
Finding

Overbroad Shared Credential File Loading with Environment Override

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cs-free-image-generator-nv.py:66
Finding

Predictable Temporary Output Permits Symlink Attacks and Data Exposure

Content
View full analysis
Remediation
View remediation
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 (10)

Tainted flow: 'headers' from os.environ.get (line 50, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/cs-free-image-generator-nv.py (reported line 63)May include surrounding context.

python
"steps": 4,
    }

    response = requests.post(invoke_url, headers=headers, json=payload, timeout=120)
    response.raise_for_status()
    response_body = response.json()

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/cs-free-image-generator-nv.py (reported line 16)May include surrounding context.

python
import requests

# 尝试加载 dotenv(标准方式读取 .env 文件)
try:
    import dotenv
    dotenv.load_dotenv(os.path.expanduser("~/.openclaw/.env"), override=True)

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/cs-free-image-generator-nv.py (reported line 19)May include surrounding context.

python
# 尝试加载 dotenv(标准方式读取 .env 文件)
try:
    import dotenv
    dotenv.load_dotenv(os.path.expanduser("~/.openclaw/.env"), override=True)
except ImportError:
    pass

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes capabilities that access environment variables, write files, and call an external network service, but the manifest does not declare any tool scope or permissions boundary. This weakens reviewability and consent because users and platform controls cannot clearly see that prompts and generated image data will be sent externally and stored locally.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases include very generic requests like '生成图片', '画一张图', and 'text to image', which can match ordinary conversation and cause the skill to activate unexpectedly. Because the skill sends prompts to NVIDIA and saves results locally, accidental activation can expose user content to a third party and create unintended local artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The markdown does not clearly warn users that their prompts are transmitted to NVIDIA's external service and that the full response, including base64 image data, is saved under /tmp. This creates a transparency and privacy risk because sensitive prompts or generated content may be shared off-device and persist locally without informed user consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/cs-free-image-generator-nv.py (reported line 63)May include surrounding context.

python
"steps": 4,
    }

    response = requests.post(invoke_url, headers=headers, json=payload, timeout=120)
    response.raise_for_status()
    response_body = response.json()

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring and CLI help text are written in Chinese, which imposes a specific language on users. The file does not offer a language/locale option or indicate that the skill is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The stated purpose is text-to-image generation through NVIDIA's API, but the code also accesses ~/.openclaw/.env to load environment variables. Reading a home-directory configuration file is not mentioned in the manifest and is not inherent from the user-facing description of image generation itself.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The script stores the full API response under /tmp, which may include image URLs, metadata, revised prompts, request identifiers, or other provider-returned content not necessary for the user-facing function. Because /tmp is a shared and less-controlled location on many systems, this creates unnecessary local data exposure and retention beyond the stated skill behavior.

Content

No source excerpt is available for this finding.