Back to skill

Security audit

Tomoviee Tail to Video

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but its documented helper exposes reusable API credentials in command arguments and terminal output.

Review this before installing if you will use real Tomoviee/Wondershare credentials. Avoid the auth-token helper and avoid passing secrets as command-line arguments in shared terminals, CI, logs, or agent transcripts. Use only non-sensitive image URLs and prompts you are comfortable sending to Wondershare/Tomoviee, and be careful with callback URLs and passthrough params.

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

Error
Location
scripts/generate_auth_token.py:34
Finding
Reusable Basic Authentication Credential Exposed Through Command-Line Arguments and Standard Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate_auth_token.py:34-42` **Vulnerability Type**: Credential exposure through process arguments and standard output **Risk Level**: High ### Vulnerable Code ```python 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 token-generation operation at `scripts/generate_auth_token.py:27-29` is: ```python credentials = f"{app_key}:{app_secret}" access_token = base64.b64encode(credentials.encode()).decode() return access_token ``` The insecure invocation is also recommended in `SKILL.md:59-63`: ```bash python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET ``` ### Technical Analysis The helper accepts the application secret as a command-line argument and then prints a reusable Basic authentication credential to standard output. Command-line secrets can be exposed through shell history, process inspection facilities, execution telemetry, CI logs, terminal recordings, and Agent tool-call transcripts. The output introduces another disclosure channel because standard output may be captured by terminals, automation systems, logs, or an Agent and returned to its caller. Base64 provides no confidentiality. The printed value can be decoded directly to recover the original `app_key:app_secret` pair. Consequently, printing the token is effectively equivalent to printing the application secret. This behavior is not necessary for the Skill's declared video-generation functionality. The main client can construct the Authorization header internally and transmit it directly to the fixed HTTPS API endpoint without revealing the credential to the user or Agent output. The hel ...[truncated 1803 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the helper's token-printing behavior. Basic credentials must never be emitted to standard output, logs, exceptions, or Agent responses. 2. Remove or revise the Quick Start command in `SKILL.md` so users are not instructed to place secrets directly in command-line arguments. 3. Read credentials from a protected secret manager or narrowly scoped environment variables. For interactive use, obtain the secret with `getpass.getpass()` so it is not echoed or retained in ordinary shell history. 4. Construct the Authorization header only inside the API client immediately before the request. Do not expose the encoded value through a public helper or CLI output. 5. Prefer `requests.auth.HTTPBasicAuth` or an equivalent standard authentication facility instead of manually retaining a Base64 credential: ```python from requests.auth import HTTPBasicAuth response = requests.post( url, auth=HTTPBasicAuth(app_key, app_secret), headers={"Content-Type": "application/json", "X-App-Key": app_key}, json=payload, timeout=REQUEST_TIMEOUT, ) ``` 6. If environment variables are used, document that they must not be printed, committed, included in diagnostic bundles, or inherited by unnecessary child processes. 7. Redact `Authorization`, `app_secret`, and derived tokens from HTTP debugging, exception reporting, telemetry, and CI logs. 8. Prefer provider-issued short-lived, revocable tokens with minimum required permissions if the API supports them. 9. Rotate any credentials that have already been passed to this helper in logged, shared, CI, or Agent-controlled environments. ]]>
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 (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
There is a clear description-behavior mismatch. The declared purpose centers on image-to-video generation using a specific API, but the actual code chunk is only a helper utility for encoding credentials into a Basic auth token. Authentication token generation is a supporting implementation detail, not the described primary function. Because the code does not accept image inputs, invoke any remote API, or produce video output, it materially differs from the declared skill behavior.

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 full authentication token and Authorization header to stdout. In this context, the token represents base64(app_key:app_secret), so anyone who sees or captures the output can recover the original credentials and use the API account, making this more dangerous than a temporary bearer token leak.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill describes network access to external API endpoints but does not explicitly declare tool scope or permissions. In agent environments, missing scope declarations can allow undeclared outbound network behavior, reducing reviewability and increasing the chance that credentials or user data are sent externally without clear operator approval.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The documentation explicitly states that user-provided image URLs and optional callback data are sent to third-party endpoints, but it does not include a clear user-facing warning about external data transfer, privacy implications, retention, or callback-related exposure. This can lead users or integrators to unknowingly transmit sensitive images or metadata to external services, increasing privacy and compliance risk.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script prints the generated Basic authentication token directly to stdout. Because the token is just base64-encoded credentials, exposing it in terminal history, logs, CI output, screenshots, or shell capture can disclose the underlying app key and app secret and enable unauthorized API use.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code sends user-supplied prompt and image references to an external API service via requests.post, but the method and its surrounding comments/docstrings do not warn that user content is transmitted off-system. Although the CLI prints task progress, it does not disclose the outbound data-sharing behavior itself.

Tainted flow: 'task_id' from requests.post (line 57, 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
91% confidence
Finding
This markdown file includes usage examples whose prompt strings are exclusively in Chinese. Because the document does not state that the skill is region-specific or that users may choose their preferred language, the examples can be read as prescribing a specific language without opt-in.

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
93% confidence
Finding
The dependency is only constrained to a major-version range and not pinned to a specific patched release, so builds are not reproducible and may resolve to a vulnerable Requests version depending on install time and environment. In a skill that makes outbound API calls and may handle credentials, using an unpinned HTTP client increases exposure to known Requests issues such as credential leakage or TLS/verification-related flaws if an affected version is installed.

Missing User Warnings

Low
Confidence
76% confidence
Finding
The get_result method performs a network call that transmits the task_id to an external endpoint, but there is no explicit warning in the method documentation or comments that remote status polling occurs. This is a user-relevant network operation and should be disclosed somewhere visible.

Static analysis

No suspicious patterns detected.