Back to skill

Security audit

IMA AI Video Generator — Short & Promo Video, Text to Video, Image to Video Generation

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its video-generation purpose, but it handles API keys and image uploads in ways that need careful review before installation.

Install only if you are comfortable giving this skill an IMA API key and sending prompts/images to IMA. Use a low-quota test key, avoid sensitive images, do not use custom endpoint overrides, review or remove the ImgBB example, and clear ~/.openclaw logs/preferences if you do not want local history retained.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ima_video_create.py:1287
Finding

Configurable API Endpoint Can Redirect Bearer Credentials to an Arbitrary Host

Content
View full analysis
dict: return { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", "x-app-source": "ima_skills", "x_app_language": language, } ``` ```python def get_product_list(base_url: str, api_key: str, category: str, app: str = "ima", platform: str = "web", language: str = "en") -> list: url = f"{base_url}/open/v1/product/list" params = {"app": app, "platform": platform, "category": category} headers = make_headers(api_key, language) resp = requests.get(url, params=params, headers=headers, timeout=30) ``` ```python p.add_argument("--base-url", default=DEFAULT_BASE_URL, help="API base URL") ``` ```python def main(): args = build_parser().parse_args() base = args.base_url apikey = args.api_key or os.getenv("IMA_API_KEY") tree = get_product_list(base, apikey, args.task_type, language=args.language) ``` The image-upload destination is similarly configurable: ```python if args.input_images: im_base = os.getenv("IMA_IM_BASE_URL", DEFAULT_IM_BASE_URL) for i, img_source in enumerate(args.input_images, 1): img_url = prepare_image_url(img_source, apikey, im_base) ``` ### Technical Analysis The `--base-url` argument is accepted without validating its scheme or hostname. Requests to this destination contain the IMA API key in the `Authorization` header. Consequently, anyone who can influence the script invocation can direct the bearer credential to an arbitrary server. The image-upload token service has the same problem through `IMA_IM_BASE_URL`. That request sends th ...[truncated 1458 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ima_video_create.py:139
Finding

IMA API Key Is Sent in URL Query Parameters and Can Be Persisted in Error Logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL-DETAIL.md:1007
Finding

Mandatory Documentation Provides an Undeclared Third-Party Image Exfiltration Path

Content
View full analysis
str: """Convert any image source to a public HTTPS URL. - If source is already a public HTTPS URL: return as-is - If source is a local file path or bytes: upload to hosting first """ if isinstance(source, str) and source.startswith("https://"): return source # already public, use directly # Option 1: IMA OSS (requires OSS credentials) # objectName = f"aiagent/src/d/{date}/in/{uuid}.jpg" # bucket.put_object(objectName, image_bytes) # return f"https://ima.esxscloud.com/{objectName}" # Option 2: Any public image hosting (imgbb example) import base64, requests if isinstance(source, str): with open(source, "rb") as f: b64 = base64.b64encode(f.read()).decode() else: b64 = base64.b64encode(source).decode() r = requests.post("https://api.imgbb.com/1/upload", data={"key": IMGBB_API_KEY, "image": b64}) r.raise_for_status() return r.json()["data"]["url"] ``` ### Technical Analysis `SKILL.md` requires the agent to read `SKILL-DETAIL.md` before generation. The detailed instructions state that network traffic uses two IMA-controlled domains, but this example supplies an alternative path that reads a local file, Base64-encodes its complete contents, and sends it to `api.imgbb.com`. Base64 is an encoding, not encryption or protection. The receiving third party obtains the original image and returns a publicly accessible URL. This creates a data-disclosure path outside the two-domain architecture described elsewhere in the Skill. The third-party upload is not necessary for the declared functionality because the bundled script already uploads local images through the stated IMA upload ser ...[truncated 1049 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ima_video_create.py:1448
Finding

Model Preferences Are Persisted Without the Explicit Consent Required by the Skill Policy

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:4
Finding

Unbounded Dependency Version Range Produces Non-Reproducible Installations

Content
View full analysis
=2.25.0 ``` ### Technical Analysis The requirement specifies only a minimum version and permits installation of any later `requests` release. No lockfile or package hashes are supplied. As a result, two installations performed at different times may resolve different dependency versions. The package name is legitimate and no evidence of an intentionally malicious dependency was found. The risk arises from allowing unreviewed future versions and transitive dependency changes into the runtime without reproducible integrity controls. ### Attack Path 1. The Skill is installed using `pip install -r requirements.txt`. 2. The package index resolves the newest release satisfying `requests>=2.25.0`. 3. A future compromised, incompatible, or unexpectedly changed release is selected. 4. That package and its transitive dependencies become part of the Skill's network-processing runtime. 5. Any malicious or vulnerable behavior in the resolved package executes with the privileges of the agent process. ### Impact Assessment The potential scope is the privilege level of the Python process running the Skill, including access to the IMA API key, user-selected images, prompts, local logs, and preference files. No active dependency compromise is demonstrated in the audited artifact, so this is a supply-chain hardening weakness rather than evidence of embedded malicious code. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (29)

Tainted flow: 'task_id' from os.getenv (line 1415, 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/ima_video_create.py (reported line 775)May include surrounding context.

python
"Check the IMA dashboard for status."
            )

        resp = requests.post(url, json={"task_id": task_id},
                             headers=headers, timeout=30)
        resp.raise_for_status()
        data = resp.json()

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 377)May include surrounding context.

md
**Data control:**
- ✅ **View stored data**: `cat ~/.openclaw/memory/ima_prefs.json`
- ✅ **Delete preferences**: `rm ~/.openclaw/memory/ima_prefs.json` (resets to defaults)
- ✅ **Delete logs**: `rm -rf ~/.openclaw/logs/ima_skills/` (auto-cleanup after 7 days anyway)

### ⚠️ Advanced Users: Fork & Modify

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 378)May include surrounding context.

md
**Data control:**
- ✅ **View stored data**: `cat ~/.openclaw/memory/ima_prefs.json`
- ✅ **Delete preferences**: `rm ~/.openclaw/memory/ima_prefs.json` (resets to defaults)
- ✅ **Delete logs**: `rm -rf ~/.openclaw/logs/ima_skills/` (auto-cleanup after 7 days anyway)

### ⚠️ Advanced Users: Fork & Modify

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 378)May include surrounding context.

md
**Data control:**
- ✅ **View stored data**: `cat ~/.openclaw/memory/ima_prefs.json`
- ✅ **Delete preferences**: `rm ~/.openclaw/memory/ima_prefs.json` (resets to defaults)
- ✅ **Delete logs**: `rm -rf ~/.openclaw/logs/ima_skills/` (auto-cleanup after 7 days anyway)

### ⚠️ Advanced Users: Fork & Modify

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 378)May include surrounding context.

md
**Data control:**
- ✅ **View stored data**: `cat ~/.openclaw/memory/ima_prefs.json`
- ✅ **Delete preferences**: `rm ~/.openclaw/memory/ima_prefs.json` (resets to defaults)
- ✅ **Delete logs**: `rm -rf ~/.openclaw/logs/ima_skills/` (auto-cleanup after 7 days anyway)

### ⚠️ Advanced Users: Fork & Modify

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 382)May include surrounding context.

md
### ⚠️ Advanced Users: Fork & Modify

If you need to modify this skill for your use case:
1. **Fork the repository** (don't modify the original)
2. **Update your fork** with your changes
3. **Test thoroughly** with limited API keys

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file repeatedly assures users that only two IMA-owned domains are contacted, but later provides code that uploads images to api.imgbb.com. That contradiction undermines transparency and can mislead users into exposing images and possibly hosting API credentials to an unapproved third party under false privacy assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose centers on AI video generation capabilities and supported model/mode features. However, the actual code shown does not perform any video generation, model invocation, media processing, or knowledge-base guidance. Its primary purpose is unrelated infrastructure for logging and log cleanup, including creating directories, writing log files, and deleting expired logs. While logging can be a supporting detail in a larger video-generation skill, this code chunk by itself does not match the declared functionality and includes filesystem operations not mentioned in the description.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/ima_video_create.py (reported line 1304)May include surrounding context.

python
args   = build_parser().parse_args()
    base   = args.base_url
    
    # Get API key from args or environment variable
    apikey = args.api_key or os.getenv("IMA_API_KEY")
    if not apikey:
        logger.error("API key is required. Use --api-key or set IMA_API_KEY environment variable")

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The keyword file is composed largely of generic SEO-style capability phrases such as 'AI video generator', 'text to video', and 'promo video generator' rather than distinctive invocation triggers. Overly broad keywords can cause unintended activation in unrelated conversations, making the agent run when a user is only discussing video creation generally, which can lead to prompt hijacking opportunities, incorrect tool selection, and degraded safety boundaries.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 231)May include surrounding context.

md
**Both domains are owned by IMA Studio**, but if you're concerned about credential exposure:

✅ **Best practices:**
- Use a **test/scoped API key** for initial testing (create at https://imastudio.com/api-keys)
- Set a low quota (e.g., 100 credits) for the test key
- Rotate your key after testing if needed
- Contact IMA support to confirm domain ownership: support@imastudio.com

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The pre-generation notification section provides a Chinese message template as the default and only later adds a note to adapt to English. This creates a default language constraint that can cause the skill to force Chinese responses unless the agent actively overrides it, which is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

The documentation describes uploading user images to cloud object storage to obtain public URLs. Public hosting of input media can expose sensitive images more broadly than users expect, especially when retention, access control, and ownership boundaries are not clearly specified.

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 1025)May include surrounding context.

md
# Option 1: IMA OSS (requires OSS credentials)
    #   objectName = f"aiagent/src/d/{date}/in/{uuid}.jpg"
    #   bucket.put_object(objectName, image_bytes)
    #   return f"https://ima.esxscloud.com/{objectName}"

    # Option 2: Any public image hosting (imgbb example)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation introduces an alternative upload path to a third-party service (imgbb) that is outside the skill’s advertised IMA-only network scope. This can cause user images to be transmitted to an unexpected external party, creating privacy and data-governance risk, especially if agents copy the example into production behavior.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The hardcoded third-party URL api.imgbb.com indicates an alternate exfiltration path for user images beyond the promised IMA domains. Even as sample code, agents or maintainers may adopt it directly, sending potentially sensitive uploads to an unrelated service.

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 1035)May include surrounding context.

md
b64 = base64.b64encode(f.read()).decode()
    else:
        b64 = base64.b64encode(source).decode()
    r = requests.post("https://api.imgbb.com/1/upload",
                      data={"key": IMGBB_API_KEY, "image": b64})
    r.raise_for_status()
    return r.json()["data"]["url"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The hardcoded third-party URL api.imgbb.com indicates an alternate exfiltration path for user images beyond the promised IMA domains. Even as sample code, agents or maintainers may adopt it directly, sending potentially sensitive uploads to an unrelated service.

Content

Scanner excerpt · SKILL-DETAIL.md (reported line 1035)May include surrounding context.

md
b64 = base64.b64encode(f.read()).decode()
    else:
        b64 = base64.b64encode(source).decode()
    r = requests.post("https://api.imgbb.com/1/upload",
                      data={"key": IMGBB_API_KEY, "image": b64})
    r.raise_for_status()
    return r.json()["data"]["url"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · SKILL-DETAIL.md (reported line 1333)May include surrounding context.

md
"parameters":    nested_params,
        }],
    }
    r = requests.post(f"{BASE_URL}/open/v1/tasks/create", headers=HEADERS, json=body)
    r.raise_for_status()
    return r.json()["data"]["id"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · SKILL-DETAIL.md (reported line 1341)May include surrounding context.

md
def poll(task_id: str, interval: int = 8, timeout: int = 600) -> dict:
    deadline = time.time() + timeout
    while time.time() < deadline:
        r = requests.post(f"{BASE_URL}/open/v1/tasks/detail", headers=HEADERS, json={"task_id": task_id})
        r.raise_for_status()
        task   = r.json()["data"]
        medias = task.get("medias", [])

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language and config guidance explicitly sets the application language header to English, which can violate language or locale policy when no user opt-in is offered. The file includes substantial Chinese-language UX examples, making the hard-coded English locale appear neither user-selectable nor clearly justified as region-specific compliance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes a user-selectable --language option and uses it for product-list requests, but create_task and poll_task call make_headers(api_key) without passing that choice, so the default en is always sent in x_app_language. This is a natural-language locale policy issue because the skill silently forces English for later API interactions instead of preserving user choice or clearly documenting the override.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The script transmits prompts, model selections, and potentially image-derived URLs to an external service for processing. In this skill context that is expected functionality, but it is still security-relevant because sensitive user content may be sent off-host, and the destination base URL is user-configurable via --base-url, increasing SSRF/exfiltration risk if an attacker can influence invocation parameters.

Content

Scanner excerpt · scripts/ima_video_create.py (reported line 713)May include surrounding context.

python
f"credit={credit}, attribute_id={attribute_id}")

    try:
        resp = requests.post(url, json=payload, headers=headers, timeout=30)
        resp.raise_for_status()
        data = resp.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The polling request sends task identifiers to a remote endpoint, which is normal for status checks, but the endpoint is derived from configurable base_url. If an attacker can alter that parameter, they can redirect authenticated polling traffic and metadata to an arbitrary server, making this more than a harmless network call.

Content

Scanner excerpt · scripts/ima_video_create.py (reported line 775)May include surrounding context.

python
"Check the IMA dashboard for status."
            )

        resp = requests.post(url, json={"task_id": task_id},
                             headers=headers, timeout=30)
        resp.raise_for_status()
        data = resp.json()

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill states that user model preferences may be saved in ~/.openclaw/memory/ima_prefs.json, but it does not require clear user-facing notice or consent at the moment of storage. While low severity, silent persistence can surprise users and create privacy concerns, especially on shared systems or where preference history may reveal usage patterns.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is specified as requests>=2.25.0, which permits installation of many future and historical versions without a reproducible security baseline. Because the package is not pinned, builds may resolve to vulnerable or incompatible releases, increasing supply-chain and patch-management risk even though this file alone does not prove exploitation.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# Python dependencies for ima-ai-video-generator skill
# Install with: pip install -r requirements.txt

requests>=2.25.0

Static analysis

Detected: suspicious.destructive_delete_command

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
SKILL-DETAIL.md:378