Back to skill

Security audit

IMA Seedance2.0 Video Generator

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real IMA video-generation skill, but it needs Review because it can expose API keys and private media through unsafe URL fetching, uploads, logging, and consent ordering.

Install only after reviewing the media and credential risks. Use a scoped or test IMA key, avoid private or regulated media, avoid user-supplied remote URLs from untrusted parties, assume prompts/media URLs may appear in output or logs, and do not enable IMA_AUTO_CONSENT unless the deployment has already shown a clear disclosure and accepts third-party upload/verification.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ima_reference_validation.py:105
Finding

Unrestricted remote media fetching enables server-side request forgery

Content
View full analysis
tuple[str, int, str | None]: with requests.get(url, stream=True, timeout=30) as response: response.raise_for_status() ``` The separate video-cover download path is also affected: ```python def download_remote_media_to_temp(url: str, suffix: str = "") -> str: """Download remote media URL to a temporary local file and return the path.""" with requests.get(url, stream=True, timeout=60) as response: response.raise_for_status() with tempfile.NamedTemporaryFile(delete=False, suffix=suffix) as temp_file: for chunk in response.iter_content(chunk_size=1024 * 64): if chunk: temp_file.write(chunk) return temp_file.name ``` It is reached with user-controlled input: ```python if isinstance(source, str) and is_remote_url(source): suffix = Path(source).suffix or ".mp4" temp_video_path = download_remote_media_to_temp(source, suffix=suffix) video_path = temp_video_path ``` ### Technical Analysis The Skill fetches user-supplied HTTP and HTTPS URLs without validating the destination hostname, resolved IP address, port, or redirect chain. The only relevant input check is whether the string begins with `http://` or `https://`. Consequently, URLs targeting loopback, private, link-local, reserved, or cloud metadata addresses are accepted. Because `requests` follows redirects by default, an initially public URL can also redirect to an internal destination. The reference-validation downloader applies a byte limit, but that limit does not prevent SSRF. The separate vi ...[truncated 1416 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ima_media_upload.py:143
Finding

IMA API key is transmitted in URL query parameters

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ima_media_upload.py:188
Finding

Local media is uploaded to an unvalidated server-supplied destination

Content
View full analysis
None: """Step 2: PUT image bytes to the presigned OSS URL.""" logger.info(f"Uploading {len(image_bytes)} bytes to OSS...") try: resp = requests.put(ful, data=image_bytes, headers={"Content-Type": content_type}, timeout=60) resp.raise_for_status() ``` The destination comes directly from the upload-token response: ```python token_data = get_upload_token(api_key, ext, content_type, im_base_url, f_type=f_type) ful = token_data.get("ful") fdl = token_data.get("fdl") if not ful or not fdl: raise RuntimeError("Upload token missing 'ful' or 'fdl' field") upload_to_oss(file_bytes, content_type, ful) ``` ### Technical Analysis The upload-token service completely controls the `ful` URL. The Skill uploads the full contents of a user-selected local file to that destination without checking: - Whether the scheme is HTTPS. - Whether the host belongs to an approved storage provider. - Whether the resolved address is public. - Whether the port is expected. - Whether redirects remain on an approved host. `SECURITY.md` describes `*.aliyuncs.com` and `*.esxscloud.com` as expected upload destinations, but this trust boundary is not enforced in code. If the upload-token endpoint is compromised, misconfigured, or returns attacker-influenced data, the Skill becomes a file-exfiltration mechanism. ### Attack Path 1. The user selects local image, video, or audio content. 2. The Skill reads the complete file into memory. 3. The upload-token service returns a malicious or compromised `ful` value. 4. The Skill performs an HTTP PUT to that destination without v ...[truncated 527 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ima_api_client.py:365
Finding

Complete task payloads containing prompts and media URLs are printed unconditionally

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ima_video_create.py:643
Finding

Compliance consent is requested only after local media has already been uploaded

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:4
Finding

Python dependency is not reproducibly pinned

Content
View full analysis
=2.25.0 ``` ### Technical Analysis The dependency declaration accepts any release of `requests` newer than or equal to version 2.25.0. It does not specify an exact reviewed version, an upper compatibility bound, or an integrity hash. As a result, future installations may execute a dependency version that was not represented in this audit. This weakens build reproducibility and expands supply-chain exposure. No malicious package or unsafe package index was identified in the reviewed repository; the issue is the absence of deterministic dependency controls. ### Attack Path 1. The Skill is installed in a new environment at a later date. 2. The package resolver selects the newest release satisfying `requests>=2.25.0`. 3. That release or one of its transitive dependencies differs from the reviewed environment. 4. A compromised, incompatible, or unexpectedly changed release executes with the Skill's process permissions. ### Impact Assessment A compromised dependency could access the same API key, local media, network connectivity, and filesystem permissions as the Skill process. More commonly, an unreviewed update may change redirect, certificate, proxy, or request behavior and invalidate the Skill's security assumptions. The finding does not establish that the current `requests` package is malicious. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The manifest exposes interactive consent handling, event streaming, and compliance-status reporting helpers that are not clearly surfaced in the top-level description. Hidden interaction and reporting pathways matter in a security context because they can affect user consent, data disclosure, and how downstream agents consume sensitive status data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manifest exposes interactive consent handling, event streaming, and compliance-status reporting helpers that are not clearly surfaced in the top-level description. Hidden interaction and reporting pathways matter in a security context because they can affect user consent, data disclosure, and how downstream agents consume sensitive status data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The manifest exposes interactive consent handling, event streaming, and compliance-status reporting helpers that are not clearly surfaced in the top-level description. Hidden interaction and reporting pathways matter in a security context because they can affect user consent, data disclosure, and how downstream agents consume sensitive status data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The manifest exposes interactive consent handling, event streaming, and compliance-status reporting helpers that are not clearly surfaced in the top-level description. Hidden interaction and reporting pathways matter in a security context because they can affect user consent, data disclosure, and how downstream agents consume sensitive status data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manifest exposes interactive consent handling, event streaming, and compliance-status reporting helpers that are not clearly surfaced in the top-level description. Hidden interaction and reporting pathways matter in a security context because they can affect user consent, data disclosure, and how downstream agents consume sensitive status data.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

md
default: "SKILL.md"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
default: "SKILL.md"

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/ima_events.py (reported line 247)May include surrounding context.

python
# Wait for user input
    while True:
        try:
            # Print prompt to stderr (so it doesn't interfere with event stream)
            print(f"\n❓ {message}", file=sys.stderr)
            print(f"   Options: {' / '.join(options)}", file=sys.stderr)
            if default:

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 508)May include surrounding context.

python
sys.exit(1)
        args.model_id = normalized_model_id

    # 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")

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SECURITY.md (reported line 25)May include surrounding context.

md
| Variable | Purpose | Security impact |
|---|---|---|
| `IMA_STDOUT_MODE` | Control stdout event-stream mode (`events` / `mixed` / `auto`) | Local output-only; no credential impact |
| `IMA_AUTO_CONSENT` | Auto-approve compliance verification prompts in non-interactive runs | Local behavior-only; no credential impact |
| `IMA_DEBUG` | Enable verbose debug logging | Local logging-only; no credential impact |

## Credential Flow

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares capabilities that imply access to environment secrets, shell execution, network access, and file writes, but it does not define an explicit tool scope such as permissions or allowed-tools. That makes the effective execution boundary ambiguous, increasing the chance that a host agent grants broader access than users expect, especially since the skill also handles an API key and remote media processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description does not clearly warn users that referenced media URLs or uploaded assets may be sent to external services, despite the credential note explicitly stating transmission to api.imastudio.com and imapi.liveme.com. This creates a meaningful transparency and privacy risk because users may unknowingly expose proprietary, personal, or regulated media to third parties.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The optional IMA_AUTO_CONSENT flag enables non-interactive auto-approval of asset compliance verification prompts. Bypassing an explicit consent step is risky because it can cause user media to be verified, uploaded, or transmitted to remote services without an informed, case-by-case user decision.

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
description: Optional stdout mode toggle for event-stream integrations. Supported values are events, mixed, and auto.
      - name: IMA_AUTO_CONSENT
        required: false
        description: Optional non-interactive flag to auto-approve asset compliance verification prompts.
      - name: IMA_DEBUG
        required: false
        description: Optional debug flag that enables verbose logging for troubleshooting.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This manifest includes many highly generic discovery terms such as "video generation," "video generator," "AI video generator," "text to video," and "image to video" without any explicit trigger constraints or exclusion conditions. In a manifest context, such broad activation/discovery phrasing can cause unintended invocation overlap with other general-purpose media or AI skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document is written almost entirely in Chinese and includes model-specific instructions such as "如果你是Kimi/豆包/千问" without any opt-in, alternative language path, or explanation that the skill is intentionally limited to a Chinese-language context. Under the policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The examples and workflow instruct users to supply prompts, media URLs/files, and API keys to external domains, but the nearby user-facing sections do not clearly and prominently warn that this data leaves the local environment. This can lead users to disclose sensitive prompts, private media, or credentials without informed consent, especially because the skill supports uploading reference assets and persistent local logging.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation establishes a strict requirement to stop execution when user-required inputs cannot be honored, but later recommends automatic degradation and retry behavior. In a media-generation skill, this inconsistency can cause the agent to silently alter user-requested parameters or proceed in a way that violates user intent, resulting in unauthorized processing, unexpected charges, or privacy-impacting uploads under changed conditions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code prints the complete task creation payload and full API response, which can expose user prompts, media URLs, metadata, and potentially returned identifiers in logs or console output. In an agent skill context, debug output is often captured by platform logging, making private user content accessible to operators or other log consumers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code constructs and sends a request payload containing the user's generation prompt and referenced media URLs to an external API endpoint. Although there is debug printing, there is no confirmation prompt or explicit user-facing disclosure in this file that user-provided content will be transmitted off-system.

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 · scripts/ima_api_client.py (reported line 376)May include surrounding context.

python
print("=" * 80)

    try:
        resp = requests.post(url, json=payload, headers=headers, timeout=30)
        
        # DEBUG: Print complete response
        print("=" * 80)

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 · scripts/ima_api_client.py (reported line 468)May include surrounding context.

python
print("=" * 80)

    try:
        resp = requests.post(url, json=payload, headers=headers, timeout=30)
        
        # DEBUG: Print complete response
        print("=" * 80)

Tainted flow: 'task_id' from requests.post (line 404, 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 · scripts/ima_api_client.py (reported line 468)May include surrounding context.

python
f"Please check your creation record at {VIDEO_RECORDS_URL}."
            )

        resp = requests.post(url, json={"task_id": task_id},
                             headers=headers, timeout=30)
        
        # Parse JSON response (don't check HTTP status first!)

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · scripts/ima_compliance.py (reported line 32)May include surrounding context.

python
except ImportError:
    # Fallback: no-op implementations
    EVENT_STREAM_ENABLED = False
    def emit_prompt(message, options, default=None, timeout=None): return default or options[0]
    def emit_compliance_check(*args, **kwargs): pass
    def emit_info(*args, **kwargs): pass
    def emit_warning(*args, **kwargs): pass

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

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

python
except ImportError:
    # Fallback: no-op implementations
    EVENT_STREAM_ENABLED = False
    def emit_prompt(message, options, default=None, timeout=None): return default or options[0]
    def emit_compliance_check(*args, **kwargs): pass
    def emit_info(*args, **kwargs): pass
    def emit_warning(*args, **kwargs): pass

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code allows remote asset verification to proceed based solely on the IMA_AUTO_CONSENT environment variable, bypassing the interactive disclosure and consent prompt. In a skill that transmits user-supplied local or remote media to an external verification service, this can cause users' files or URLs to be sent off-platform without explicit session-time consent, especially in background or orchestrated runs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.