Back to skill

Security audit

AI Media Generation

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward media-generation client that uses a disclosed AIsa API key and writes generated media locally when the user runs the commands.

Install only if you are comfortable sending prompts, referenced image URLs, task IDs, and generated-media requests to AIsa using your AISA_API_KEY. Avoid submitting sensitive or private content, and be careful with --download and --out because the script writes files locally and does not validate provider-returned download URLs or warn before overwriting a chosen path.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

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

Critical
Category
Data Flow
Content
req = urllib.request.Request(url, data=data, headers=all_headers, method=method.upper())
    try:
        with urllib.request.urlopen(req, timeout=timeout_s) as resp:
            raw = resp.read().decode("utf-8")
            return json.loads(raw) if raw else {}
    except urllib.error.HTTPError as e:
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

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

Critical
Category
Data Flow
Content
os.makedirs(os.path.dirname(out_path) or ".", exist_ok=True)
    req = urllib.request.Request(url, headers={"User-Agent": "OpenClaw-Media-Gen/1.0"})
    try:
        with urllib.request.urlopen(req, timeout=timeout_s) as resp, open(out_path, "wb") as f:
            total = 0
            while True:
                chunk = resp.read(1024 * 1024)  # 1MB
Confidence
90% confidence
Finding
The downloader fetches an arbitrary URL returned by the remote task response and writes the response body directly to disk without validating the scheme, host, content type, or size. If the upstream service is compromised or returns attacker-controlled URLs, this can enable SSRF-style access to internal/local resources or untrusted file writes of unexpected content.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares environment and network requirements and demonstrates outbound API usage, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates a governance gap: agents may be allowed to access secrets and make network calls without clear least-privilege boundaries, increasing the chance of unintended secret exposure or uncontrolled external requests.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This markdown mixes English headings with core usage guidance in Chinese, including the introductory description and capability section. Because the skill does not offer an opt-in language choice or explain that it is intended for a Chinese-speaking audience, it may violate language/locale policy requirements.

External Transmission

Medium
Category
Data Exfiltration
Content
文档:`google-gemini-chat`(GenerateContent)见 `https://docs.aisa.one/reference/generatecontent`。

### curl 示例(返回 inline_data 时为图片)

```bash
curl -X POST "https://api.aisa.one/v1/models/gemini-3-pro-image-preview:generateContent" \
Confidence
89% confidence
Finding
This example sends user prompts and the bearer token to an external third-party service, which is an actual data egress/security boundary crossing. In context, that is the intended function of the skill, so it is not inherently malicious, but it is still security-relevant because prompts or generated content may contain sensitive data and the API key is used for external transmission.

External Transmission

Medium
Category
Data Exfiltration
Content
### curl 示例(返回 inline_data 时为图片)

```bash
curl -X POST "https://api.aisa.one/v1/models/gemini-3-pro-image-preview:generateContent" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
The curl command performs a real outbound request carrying an authorization bearer token and user-supplied prompt to a remote service. This is expected for a media-generation skill, but it remains a true security-relevant behavior because it creates data exfiltration potential and dependency on an external provider's handling of submitted content.

External Transmission

Medium
Category
Data Exfiltration
Content
文档:`video-generation` 见 `https://docs.aisa.one/reference/post_services-aigc-video-generation-video-synthesis`。

```bash
curl -X POST "https://api.aisa.one/apis/v1/services/aigc/video-generation/video-synthesis" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-DashScope-Async: enable" \
Confidence
92% confidence
Finding
This command submits prompts, a referenced image URL, and an authorization token to an external video-generation API. Because the service also ingests an image URL, users may unknowingly send sensitive or private media references to a third party, making the egress risk more significant in practice.

External Transmission

Medium
Category
Data Exfiltration
Content
文档:`task` 见 `https://docs.aisa.one/reference/get_services-aigc-tasks`。

```bash
curl "https://api.aisa.one/apis/v1/services/aigc/tasks?task_id=YOUR_TASK_ID" \
  -H "Authorization: Bearer $AISA_API_KEY"
```
Confidence
84% confidence
Finding
The polling request sends the bearer token and task identifier to the external service, which is still a real network transmission across a trust boundary. The payload is less sensitive than prompt/media submission, so impact is lower, but it still should be governed and disclosed.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
OpenClaw Media Gen - AIsa API Client

Image:
  - Gemini GenerateContent: POST https://api.aisa.one/v1/models/{model}:generateContent

Video:
  - Wan 2.6 async task:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
88% confidence
Finding
This markdown file describes sending user prompts and image URLs to external AIsa endpoints and downloading generated media, but it does not warn users that their prompts or referenced content will be transmitted to a third-party service. Under the markdown-specific missing-warning criterion, user-facing documentation should disclose behaviors that may affect privacy or data handling.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The natural-language content and usage instructions are presented in Chinese, which can amount to forcing a specific language for users without opt-in. The policy allows locale constraints when they are explicitly offered as a choice or clearly justified, which is not present here.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The code saves generated image bytes directly to a local path, but there is no confirmation prompt or user-facing disclosure at the point of write. While file output is part of the tool's purpose, the operation itself is silent and could affect user files if an explicit --out path is supplied.

Missing User Warnings

Low
Confidence
88% confidence
Finding
When --download is used, the code automatically downloads the returned video URL and saves it to a local file, but there is no explicit runtime warning or confirmation before the write. Although the flag implies download intent, the code does not clearly disclose the destination write action to the user at execution time.

Static analysis

No suspicious patterns detected.