Back to skill

Security audit

Tomoviee Image to Video

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to do the advertised Tomoviee image-to-video API work, but its documented command-line credential flow can expose reusable API secrets.

Review this before installing if you will use real Tomoviee credentials. Avoid the auth helper and command-line examples with live secrets, do not submit sensitive images or private URLs unless third-party processing is approved, and rotate any credentials previously used through logged terminals, CI, or agent transcripts.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_auth_token.py:27
Finding
Reusable API Credentials Exposed Through Command-Line Arguments and Standard Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate_auth_token.py:27-42` **Additional Locations**: `SKILL.md:43`; `scripts/tomoviee_img2video_client.py:143-148` **Vulnerability Type**: Reversible credential disclosure through process arguments and stdout **Risk Level**: Medium ### Vulnerable Code ```python credentials = f"{app_key}:{app_secret}" access_token = base64.b64encode(credentials.encode()).decode() return access_token if __name__ == "__main__": if len(sys.argv) != 3: print("Usage: python generate_auth_token.py <app_key> <app_secret>") sys.exit(1) app_key = sys.argv[1] app_secret = sys.argv[2] token = generate_access_token(app_key, app_secret) print(f"Access Token: {token}") print(f"\nUse in Authorization header as: Basic {token}") ``` The documented invocation in `SKILL.md:43` is: ```bash python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET ``` The main client has the same command-line secret exposure pattern at `scripts/tomoviee_img2video_client.py:143-148`: ```python print( "Usage: python scripts/tomoviee_img2video_client.py " "<app_key> <app_secret> <prompt> <image_url> [resolution] [aspect_ratio]" ) sys.exit(1) app_key = sys.argv[1] app_secret = sys.argv[2] ``` ### Technical Analysis Base64 is reversible encoding rather than encryption. The generated token contains the application key and secret in the form `base64(app_key:app_secret)`. Any party able to read the helper's stdout can decode the value and recover both credentials. The helper also requires the secret as a command-line argument. Depending on the execution environment, command-line arguments may be exposed through: - Shell history - Process listings and process inspection interfaces - Job-runner or orchestration metadata - Debug and audit logs - Agent execution transcripts Printing the complete Basic authorization value is unnecessary for the Skill's declared image-to-video oper ...[truncated 1608 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove credential output** - Do not print the generated Basic authorization value. - If confirmation is needed, print only a non-sensitive success message. - Never include the token in exceptions, debug logs, or Agent responses. 2. **Stop accepting secrets through command-line arguments** - Read credentials from a protected secret manager or runtime credential provider. - Alternatively, use environment variables supplied through a secure execution mechanism. - For interactive local use, obtain the secret with `getpass.getpass()` so it is not echoed. - Avoid placing secrets directly in shell commands, because environment variables may also leak when assigned inline or logged. 3. **Keep authorization material short-lived** - Construct the authorization header in memory immediately before making the request. - Avoid retaining the encoded credential as a public or long-lived instance attribute where practical. - Do not write either the raw secret or encoded token to disk. 4. **Update the documentation and CLI** - Replace the insecure Quick Start command in `SKILL.md`. - Remove `<app_secret>` from the command-line interface in both scripts. - Document supported secure credential-loading methods and warn that Base64 does not protect secrets. 5. **Apply operational controls** - Rotate any credentials previously used with the helper in logged or Agent-mediated environments. - Restrict access to historical process, CI, orchestration, and Agent logs. - Redact authorization headers and known credential fields at logging boundaries. ]]>
Vulnerability Patterns
  • 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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared purpose centers on animating still images by invoking the Tomoviee image-to-video service through Wondershare's gateway. The actual code does not submit images, prompts, motion guidance, or any API requests at all. Its sole function is to encode supplied credentials into a Basic auth token. While authentication can be a supporting implementation detail, this code chunk by itself materially differs from the declared primary purpose and lacks the core video-generation behavior, so it should be flagged as a mismatch.

Credential Access

High
Category
Privilege Escalation
Content
def generate_access_token(app_key: str, app_secret: str) -> str:
    """
    Generate access token for Tomoviee API authentication.
    
    Args:
        app_key: Application key from Tomoviee console
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
app_secret = sys.argv[2]
    
    token = generate_access_token(app_key, app_secret)
    print(f"Access Token: {token}")
    print(f"\nUse in Authorization header as: Basic {token}")
Confidence
98% confidence
Finding
The script prints the generated Basic authentication value directly to stdout, which can leak reusable credentials into terminal scrollback, shell capture, CI logs, remote session transcripts, and monitoring systems. Because the output is effectively just base64-encoded 'app_key:app_secret', anyone who sees it can recover and reuse the underlying credentials.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill declares network-relevant behavior and external API usage but does not specify any explicit tool scope such as permissions or allowed-tools. This creates an avoidable trust and governance gap: a host may permit broader network access than necessary, making it harder to constrain or audit outbound communication.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill handles user-supplied image URLs and prompts and sends them to an external third-party API, but the description does not clearly warn users about that data transfer. This can lead to unintentional disclosure of sensitive images, internal URLs, or confidential prompt content to an outside service, undermining user consent and privacy expectations.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script instructs users to pass the application secret on the command line, which exposes credentials through shell history, process listings, audit logs, and CI job metadata. Even though the script is a simple utility, this is an unsafe secret-handling pattern that can lead to credential disclosure in multi-user systems or logged environments.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill sends user-provided prompts and image references, along with application credentials, to a third-party external service. In the context of an agent skill, this creates a real privacy and data-governance risk because users may not realize their content is being transmitted off-platform, and prompts/images can contain sensitive or proprietary information.

Tainted flow: 'task_id' from requests.post (line 55, network input) → requests.post (network output)

Medium
Category
Data Flow
Content
return self._make_request(payload)

    def get_result(self, task_id: str) -> Dict[str, Any]:
        response = requests.post(
            self.RESULT_ENDPOINT,
            headers=self._get_headers(),
            json={"task_id": task_id},
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.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
This markdown reference includes usage examples whose prompt strings are written only in Chinese. For a general reference file, that can imply a language preference or default without any opt-in, which conflicts with the language/locale policy guidance for natural-language content.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding
The dependency is only constrained to a broad version range and not pinned to a specific known-safe release, so the actual installed version may vary across environments and could include a version affected by one of the listed Requests advisories. In a network-facing skill that calls an external API gateway, using an unpinned HTTP client increases supply-chain and runtime risk because vulnerable resolver outcomes or environment drift can expose credential leakage, TLS, redirect, or request-handling issues depending on the deployed version.

Static analysis

No suspicious patterns detected.