Back to skill

Security audit

image-gen

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill mostly matches its stated purpose, but it needs review because it can send user content to an external API, follow API-supplied download URLs outside its claimed network scope, and encourages posting/avatar/memory side effects without clear user confirmation.

Install only if you are comfortable sending prompts and any edited images to SkillBoss API Hub. Avoid sensitive or private images, review generated gallery files before opening or sharing them, and do not let an agent post images, update avatars, or save results to memory unless you explicitly approve each action. Prefer pinned install/update tooling where available.

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/gen.py:143
Finding

Unvalidated API-Provided Image URL Enables Server-Side Request Forgery

Content
View full analysis
bytes: """Download image bytes from a URL.""" with urllib.request.urlopen(url, timeout=60) as resp: return resp.read() ``` The unvalidated URL is obtained from the remote API in both generation paths: ```python def generate_image(api_key: str, prompt: str) -> bytes: """Generate an image via SkillBoss API Hub (auto-routed).""" result = _pilot(api_key, { "type": "image", "inputs": {"prompt": prompt}, "prefer": "quality", }) image_url = result["result"]["image_url"] return _download_image(image_url) ``` ```python def generate_image_hq(api_key: str, prompt: str, aspect: str) -> bytes: """Generate a high-quality image via SkillBoss API Hub with aspect ratio support.""" inputs = {"prompt": prompt} if aspect and aspect != "1:1": aspect_map = { "16:9": "1536x864", "9:16": "864x1536", "4:3": "1280x960", "3:4": "960x1280", } if aspect in aspect_map: inputs["size"] = aspect_map[aspect] result = _pilot(api_key, { "type": "image", "inputs": inputs, "prefer": "quality", }) image_url = result["result"]["image_url"] return _download_image(image_url) ``` ### Technical Analysis The application trusts `result["result"]["image_url"]` returned by the SkillBoss API and passes it directly to `urllib.request.urlopen`. It does not validate: - The URL scheme. - The destination hostname. - The resolved IP address. - Redirect destinations. - Whether the address belongs to a loopback, private, link-local, or reserved network. - The response content type. - The maximum response size. Consequently, a compromised API, ...[truncated 1671 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/gen.py:182
Finding

Unescaped Prompt Content Enables Persistent HTML Injection in Generated Galleries

Content
View full analysis
None: thumbs = "\n".join( [ f'\n' f' \n' f' {it["prompt"]}\n' f'' for it in items ] ) ``` ### Technical Analysis User-controlled prompt text is interpolated directly into an HTML document without contextual escaping. A prompt containing HTML markup can terminate the intended `figcaption` content and inject arbitrary elements, event handlers, or scripts. The value is persisted in the generated `index.html`, making this a stored injection issue rather than a transient display defect. Prompts may originate from users, automation pipelines, or untrusted agent tasks, so they cannot safely be assumed to contain plain text. Although modern browsers may impose restrictions when opening local files, injected active content can still manipulate the gallery, create deceptive links or forms, issue network requests, and access data available to the same browser origin and execution context. ### Attack Path 1. An attacker supplies a crafted prompt, for example through an automated task that invokes the Skill. 2. The prompt is sent to the image API and generation succeeds. 3. The prompt is added to `items` without sanitization. 4. `write_gallery` embeds the prompt verbatim inside ``. 5. The resulting payload is stored in `index.html`. 6. When a user opens the gallery, the browser interprets the injected prompt as markup rather than text. 7. The injected content executes or alters the displayed gallery within the browser's applicable security boundaries. ### Impact Assessment Successful exploitation can: - Execute sc ...[truncated 450 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
INSTALL.md:5
Finding

Unpinned npx Installation and Update Commands Execute Mutable Third-Party Code

Content
View full analysis
Remediation
View remediation
`. 2. Use a lockfile and verify package integrity hashes where supported. 3. Specify the expected registry and publisher identity. 4. Prefer a locally installed, reviewed CLI over implicit on-demand execution. 5. Document how users can inspect and verify the package before execution. 6. Pin transitive dependencies for reproducible installation. 7. Treat updates as security-sensitive changes requiring review rather than automatically executing the newest release. 8. Where available, distribute signed releases and verify signatures or checksums before use. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (15)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/gen.py (reported line 96)May include surrounding context.

python
prompts.append(
            f"{random.choice(styles)} of {random.choice(subjects)}, {random.choice(moods)}"
        )
    return prompts


def load_image_as_base64(path: str) -> tuple:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The heartbeat guidance expands the skill beyond image generation/editing into social posting, avatar updates, and memory persistence, which are separate side-effecting capabilities with privacy and integrity implications. In an agent setting, this can cause autonomous external actions or retention of generated content without clear user consent or scope controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guidance encourages sharing/posting generated images but provides no warning that this is an external, potentially irreversible action requiring user awareness. In context, the skill is for image generation, not publishing, so omission of a warning makes it more likely an agent will treat posting as routine rather than a sensitive side effect.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Directing the agent to post generated images to social platforms or update a profile avatar introduces outbound publication and account-modification behavior that is not justified by the skill's stated purpose. These actions can create reputational harm, unauthorized account changes, or accidental disclosure if performed automatically or without user awareness.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The installation command uses npx clawhub install gemini-image-gen without pinning a specific package version, which can cause users to execute whatever version is current at install time. If the upstream package, dependency chain, or distribution channel is compromised, users may run unexpected code during installation or update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The update command uses npx clawhub update gemini-image-gen without pinning a specific version, so the executed code may change over time and can silently pull a compromised or malicious upstream release. This increases supply-chain risk, especially because update flows are often trusted and rerun repeatedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README promotes image generation and editing via an external API service but does not clearly disclose that prompts, generated content, and potentially user-supplied images may be transmitted to SkillBoss API Hub using the configured API key. This can mislead users about data handling and cause unintended disclosure of sensitive images or prompts, especially in agent contexts where inputs may contain private or proprietary content.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documentation declares required binaries and environment variables but does not define any explicit tool scope such as permissions or allowed-tools, even though its described behavior clearly implies network access, reading local files for image editing, and writing generated outputs. This creates an authorization gap where an agent platform may permit broader actions than users expect, increasing the chance of unintended file or network operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs users to send prompts and optionally local images to SkillBoss API Hub for generation and editing, but it does not explicitly warn that this content leaves the local environment and is transmitted to a third-party service. Users may unknowingly upload sensitive prompts, confidential imagery, or regulated data, leading to privacy, compliance, or data-handling risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest clearly states that the skill uses an external API and requires an API key, but it does not prominently warn users that prompts and edited images may be transmitted off-host to a third-party service. In an image generation/editing skill, this matters because users may submit sensitive prompts or local images without realizing they leave the local environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The script sends user prompts, and for edit mode the full contents of a local image, to an external third-party API endpoint. This is an actual data-exposure risk because sensitive prompts or images may be transmitted off-host without any built-in consent prompt, redaction, allowlist, or environment restrictions.

Content

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

python
"pop-art": "bold pop art style, Ben-Day dots, strong outlines, vibrant contrasting colors",
}

API_BASE = "https://api.heybossai.com/v1"


# ---------------------------------------------------------------------------

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instruction to save good results to memory adds persistence behavior outside the core image-generation/editing purpose. Even if seemingly harmless, storing generated images or related metadata can create unnecessary retention, privacy, or profiling risks when done without transparent limits and user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This manifest includes general-purpose usage examples such as image generation, editing, and batch commands, but it does not state any explicit activation boundaries, exclusion conditions, or narrower trigger scope for when the skill should be invoked. In a manifest file, the absence of specific trigger constraints can make invocation behavior ambiguous for an agent selecting skills.

Content

No source excerpt is available for this finding.