Back to skill

Security audit

PixelLab AI

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed PixelLab API helper that uses a user-provided API key to generate and download game art assets, with no artifact-backed evidence of theft or hidden behavior.

Install this only if you intend to use PixelLab and are comfortable sending prompts, payload JSON, and optional reference images to PixelLab. Keep PIXELLAB_API_KEY in a local environment variable or secret manager, review manifests before running with --yes, and use a dedicated output folder for downloaded assets.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Tainted flow: 'request' from os.environ.get (line 380, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
"Accept": "image/png,image/*,*/*",
        },
    )
    with urllib.request.urlopen(request, timeout=timeout) as resp, open(destination, "wb") as f:
        while True:
            chunk = resp.read(1024 * 256)
            if not chunk:
Confidence
95% confidence
Finding
The client downloads arbitrary HTTPS URLs discovered in API responses and writes them to disk. Although intended for asset retrieval, this creates an SSRF-style outbound fetch primitive and untrusted file write path in the agent context: a compromised API, test endpoint, or allowed custom base could cause the tool to contact attacker-controlled hosts, internal services, or very large files.

Tainted flow: 'req' from os.environ.get (line 178, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
for attempt in range(retry_limit + 1):
        req = urllib.request.Request(url=url, data=body, method=method_upper, headers=headers)
        try:
            with urllib.request.urlopen(req, timeout=timeout) as resp:
                raw = resp.read()
                if not raw:
                    return {}
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
When --download-dir is set, the tool automatically fetches discovered asset URLs and writes them to disk without an explicit interactive warning at the operation site. In an agent setting, that can surprise users and increases the risk of retrieving malicious, sensitive, or unexpectedly large content from response-controlled URLs.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
args = parse_args(argv)
    load_explicit_env_file(args.env_file)

    api_key = os.environ.get("PIXELLAB_API_KEY")
    if not api_key:
        error = build_error_result(
            status="failed",
Confidence
70% confidence
Finding
Code accesses environment variables that may contain secrets (API keys, tokens). This is a common pattern for credential theft.

Static analysis

No suspicious patterns detected.