Back to skill

Security audit

Openai Image Gen Andy27725

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a straightforward OpenAI image-generation helper that sends user prompts to OpenAI, writes generated files locally, and does not show hidden persistence or deceptive behavior.

Install only if you are comfortable providing an OpenAI API key and sending your prompts to OpenAI for image generation. Use --out-dir to choose where files are written, and avoid putting private or sensitive content in prompts unless you intend to send it to the API provider.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
prompts.append(
            f"{random.choice(styles)} of {random.choice(subjects)}, {random.choice(lighting)}"
        )
    return prompts


def get_model_defaults(model: str) -> tuple[str, str]:
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill invokes a Python script that uses an API key, writes image files and an HTML gallery, and makes network requests to the OpenAI Images API, but the manifest does not declare an explicit tool scope such as permissions or allowed-tools. This creates unnecessary ambient authority: an agent or runtime may grant broader capabilities than operators expect, increasing the risk of unintended file access, outbound requests, or misuse of secrets.

External Transmission

Medium
Category
Data Exfiltration
Content
output_format: str = "",
    style: str = "",
) -> dict:
    url = "https://api.openai.com/v1/images/generations"
    args = {
        "model": model,
        "prompt": prompt,
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.