Back to skill

Security audit

openlens-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it ships a real-looking API key and gives broad, weakly warned control over where prompts, media, and credentials are sent.

Review before installing. Do not rely on the bundled config.json key, revoke or replace any exposed key, and only enter your own API keys when the base URL is an HTTPS endpoint you trust. Avoid sending sensitive prompts, images, or videos, especially on shared Streamlit hosts, because the skill forwards them to configured providers and may save or temporarily retain generated or uploaded media locally.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
config.json:2
Finding

Hardcoded API Credential Distributed in Project Configuration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skill_main.py:146
Finding

Unrestricted API Endpoints Can Receive Credentials and Private Media

Content
View full analysis
dict: ``` That URL is used to send bearer credentials and prompts: ```python def _call_t2i(base_url: str, api_key: str, model_id: str, prompt: str, resolution: str, steps: int) -> Path: payload = _build_t2i_payload(model_id, prompt, resolution, steps) url = f"{base_url.rstrip('/')}/images/generations" log.info("T2I request → %s model=%s", url, model_id) resp = requests.post(url, headers=_auth_headers(api_key), json=payload, timeout=60) resp.raise_for_status() image_url = resp.json()["data"][0]["url"] dest = _output_path("T2I", model_id, "png") return _download(image_url, dest) def _call_t2t(base_url: str, api_key: str, model_id: str, prompt: str, system_prompt: str = "") -> str: url = f"{base_url.rstrip('/')}/chat/completions" messages = [] if system_prompt: messages.append({"role": "system", "content": system_prompt}) messages.append({"role": "user", "content": prompt}) payload = {"model": model_id, "messages": messages, "temperature": 0.7, "max_tokens": 2048} log.info("T2T request → %s model=%s", url, model_id) resp = requests.post(url, headers=_auth_headers(api_key), json=payl ...[truncated 3452 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill_main.py:386
Finding

Predictable Shared Temporary Files Permit Collisions and Symlink-Based Overwrites

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (64)

Ssd 1

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly markets itself as bypassing content filtering restrictions and operating with no safety middleware, which is a strong red flag under adversarial review. In the context of an AI media generation portal, this materially increases the likelihood of abuse for prohibited, harmful, or policy-evading content generation and indicates deliberate removal of safeguards rather than an incidental omission.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Advertising 'no content filtering, pure pass-through' is a safety-bypass posture that encourages use of the tool without moderation or policy enforcement, increasing the likelihood it will be used to generate abusive, unsafe, or policy-violating content. In an AI media generation skill, that context makes the statement more dangerous because the tool directly brokers user prompts to generation APIs and even supports prompt enhancement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly advertises 'no content filtering - pure pass-through to your API' and 'Local Save' behavior, but it does not clearly warn users that prompts, images, and generated outputs may be transmitted to third-party endpoints and written to local disk. In a skill context, this can lead to unsafe handling of sensitive data, policy-violating content generation, or unexpected filesystem side effects because users are encouraged to use a tool with reduced safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs users to send prompts and API keys to a remote third-party endpoint without any explicit privacy or security warning about off-device transmission. Because prompts may contain sensitive data and API keys are high-value secrets, omission of this warning can mislead users about confidentiality and increase the chance of accidental disclosure.

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 place API credentials in config.json and describes sending prompts and optional image URLs to external text and video APIs, but it does not clearly warn about the privacy and credential-handling implications. Users may unknowingly expose sensitive prompts, media inputs, or secrets through local plaintext storage and third-party transmission.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · app.py (reported line 27)May include surrounding context.

python
"age_enter": "I am 18+ - Enter", "age_exit": "Exit", "age_redirecting": "Redirecting...",
        "main_title": "OpenLens", "main_subtitle": "Multi-Modal AI | T2I T2V I2V V2V",
        "config_title": "Configuration", "global_settings": "Global Settings",
        "global_api_url": "API Base URL", "global_api_url_placeholder": "https://api.openai.com/v1",
        "text_model": "Text Model (Prompt)", "text_api_key": "Text API Key", "text_api_key_placeholder": "sk-...",
        "text_model_name": "Model Name", "text_model_placeholder": "gpt-4o",
        "t2i_model": "Image (T2I)", "t2i_api_key": "T2I API Key", "t2i_api_key_placeholder": "sk-...",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · app.py (reported line 70)May include surrounding context.

python
"age_enter": "I am 18+ - Enter", "age_exit": "Exit", "age_redirecting": "Redirecting...",
        "main_title": "OpenLens", "main_subtitle": "Multi-Modal AI | T2I T2V I2V V2V",
        "config_title": "Configuration", "global_settings": "Global Settings",
        "global_api_url": "API Base URL", "global_api_url_placeholder": "https://api.openai.com/v1",
        "text_model": "Text Model (Prompt)", "text_api_key": "Text API Key", "text_api_key_placeholder": "sk-...",
        "text_model_name": "Model Name", "text_model_placeholder": "gpt-4o",
        "t2i_model": "Image (T2I)", "t2i_api_key": "T2I API Key", "t2i_api_key_placeholder": "sk-...",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · app.py (reported line 113)May include surrounding context.

python
"age_enter": "I am 18+ - Enter", "age_exit": "Exit", "age_redirecting": "Redirecting...",
        "main_title": "OpenLens", "main_subtitle": "Multi-Modal AI | T2I T2V I2V V2V",
        "config_title": "Configuration", "global_settings": "Global Settings",
        "global_api_url": "API Base URL", "global_api_url_placeholder": "https://api.openai.com/v1",
        "text_model": "Text Model (Prompt)", "text_api_key": "Text API Key", "text_api_key_placeholder": "sk-...",
        "text_model_name": "Model Name", "text_model_placeholder": "gpt-4o",
        "t2i_model": "Image (T2I)", "t2i_api_key": "T2I API Key", "t2i_api_key_placeholder": "sk-...",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · app.py (reported line 185)May include surrounding context.

python
"age_enter": "I am 18+ - Enter", "age_exit": "Exit", "age_redirecting": "Redirecting...",
        "main_title": "OpenLens", "main_subtitle": "Multi-Modal AI | T2I T2V I2V V2V",
        "config_title": "Configuration", "global_settings": "Global Settings",
        "global_api_url": "API Base URL", "global_api_url_placeholder": "https://api.openai.com/v1",
        "text_model": "Text Model (Prompt)", "text_api_key": "Text API Key", "text_api_key_placeholder": "sk-...",
        "text_model_name": "Model Name", "text_model_placeholder": "gpt-4o",
        "t2i_model": "Image (T2I)", "t2i_api_key": "T2I API Key", "t2i_api_key_placeholder": "sk-...",

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The UI claims 'No API Keys stored', but the app places API keys into Streamlit session state for the lifetime of the session. Even if this is not long-term persistent storage, the statement is inaccurate and can mislead users into entering sensitive credentials under a false privacy assumption.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The localized Chinese footer repeats the same misleading claim that API keys are not stored, while they are retained in session state during app use. Misrepresenting secret handling is a security issue because it undermines informed consent and safe credential use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Japanese footer also states that API keys are not stored, but the application keeps them in Streamlit session state while the app runs. This discrepancy can cause users to trust the app with secrets they might not otherwise provide.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This call transmits user prompt content and the bearer API key to an external service. External transmission is expected for an AI client, but in this skill it is made riskier by the fully configurable api_url, which allows secrets and content to be sent to arbitrary destinations.

Content

Scanner excerpt · app.py (reported line 225)May include surrounding context.

python
headers = make_headers(api_key)
    payload = {"model": model, "messages":[{"role":"system","content":"Enhance prompt with cinematic details."},{"role":"user","content":prompt}], "temperature":0.7}
    try:
        r = requests.post(f"{api_url}/chat/completions", headers=headers, json=payload, timeout=60)
        if r.status_code != 200: return handle_error(r)
        return r.json()["choices"][0]["message"]["content"]
    except Exception as e:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The application sends user prompts, uploaded media, media URLs, and API keys to a user-configurable external endpoint without an explicit disclosure or trust boundary warning. Because the base URL is configurable, the app can be pointed at arbitrary third-party servers, increasing the risk of sensitive data exfiltration or accidental disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This request sends the user's generation prompt and authorization token to an external image-generation endpoint. In context, the transmission is part of normal functionality, but it still presents a real disclosure risk because the destination is configurable and the user is not clearly warned about data sharing.

Content

Scanner excerpt · app.py (reported line 237)May include surrounding context.

python
headers = make_headers(api_key)
    payload = {"model": model, "prompt": prompt, "n":1, "size":"1024x1024"}
    try:
        r = requests.post(f"{api_url}/images/generations", headers=headers, json=payload, timeout=120)
        if r.status_code != 200: return handle_error(r)
        return {"url": r.json()["data"][0]["url"], "type": "image", "prompt": prompt}
    except Exception as e:

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This generic task submission sends arbitrary payloads, which in this app can include prompts plus image/video content or base64-encoded uploaded files, to an external endpoint along with bearer credentials. Because media may be sensitive and the endpoint is configurable, this creates a substantial exfiltration and privacy risk if misconfigured or abused.

Content

Scanner excerpt · app.py (reported line 248)May include surrounding context.

python
"""提交异步任务"""
    headers = make_headers(api_key)
    try:
        r = requests.post(f"{api_url}{endpoint}", headers=headers, json=payload, timeout=60)
        if r.status_code != 200: return handle_error(r), None
        data = r.json()
        return data.get("task_id") or data.get("id"), data

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The top-level documentation states the CLI is a 'pure pass-through' to the API, implying user input is forwarded unchanged. However, when --refine is enabled, the code sends the prompt through a separate text model with an instruction to transform and enhance it, then submits the modified prompt for video generation.

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 · cli.py (reported line 81)May include surrounding context.

python
for endpoint in [f"{api_url}/chat/completions", f"{api_url}/responses"]:
        try:
            resp = requests.post(endpoint, headers=headers, json=payload, timeout=60)
            if resp.status_code == 200:
                data = resp.json()
                if "choices" in data:

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 · cli.py (reported line 115)May include surrounding context.

python
payload["input"]["img_url"] = image_url
    
    log_msg(f"Submitting to {api_url}/video/generations...")
    resp = requests.post(f"{api_url}/video/generations", headers=headers, json=payload, timeout=30)
    
    if resp.status_code == 200:
        data = resp.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description advertises image/video generation via external APIs, and the config schema includes API URLs and API keys. The manifest does not warn that prompts and possibly media inputs may be transmitted to third-party endpoints, which is relevant to user privacy and data handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest explicitly highlights absence of content filtering, which increases the likelihood of unsafe, offensive, or policy-sensitive outputs. There is no adjacent warning or disclaimer to inform users about this behavior or recommend appropriate use.

Content

No source excerpt is available for this finding.

Tainted flow: 'image_url' from requests.post (line 275, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
92% confidence
Finding

The app blindly dereferences an image URL returned by an external API and fetches it server-side. If the configured or compromised upstream API returns an internal, link-local, or cloud-metadata URL, this creates a server-side request forgery path and can expose internal services or sensitive data through the Streamlit host.

Content

Scanner excerpt · openlens-web/app.py (reported line 276)May include surrounding context.

python
resp = requests.post(url, headers=_headers(api_key), json=payload, timeout=60)
    resp.raise_for_status()
    image_url = resp.json()["data"][0]["url"]
    return requests.get(image_url, timeout=60).content


def submit_video_task(base_url: str, api_key: str, model: str,

Tainted flow: 'data' from requests.get (line 324, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · openlens-web/app.py (reported line 305)May include surrounding context.

python
elif video_bytes:
        files = {"video": ("source.mp4", video_bytes, "video/mp4")}
        data = {**payload, "model": model}
        resp = requests.post(url, headers=headers, data=data, files=files, timeout=60)
    else:
        resp = requests.post(url, headers=_headers(api_key), json=payload, timeout=60)

Tainted flow: 'video_url' from requests.get (line 327, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
93% confidence
Finding

The app polls a remote task endpoint, extracts a video_url from the JSON response, and then fetches that URL without validation. A malicious or untrusted API endpoint can supply attacker-controlled URLs, enabling SSRF from the application server to internal network resources or sensitive metadata endpoints.

Content

Scanner excerpt · openlens-web/app.py (reported line 333)May include surrounding context.

python
or (data.get("videos") or [{}])[0].get("video_url")
                    or data.get("output", {}).get("url")
                )
                return requests.get(video_url, timeout=120).content
            if status in ("FAILED", "ERROR", "CANCELLED"):
                raise RuntimeError(f"Task failed with status: {status}")
            time.sleep(5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The UI sends prompts and uploaded media to user-specified external endpoints but does not clearly disclose that this content will leave the local app/session. In a tool handling arbitrary images, videos, and unrestricted generation prompts, this can cause unintended disclosure of sensitive or proprietary user content.

Content

No source excerpt is available for this finding.