Back to skill

Security audit

Tomoviee Video Background Music

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Tomoviee video-scoring helper, but it should be reviewed because it exposes API credentials in unsafe ways and its documentation expands beyond the advertised purpose.

Review this before installing. Use it only with Tomoviee credentials you are prepared to expose to this workflow, avoid the token generator command as written, do not submit private or regulated videos unless you understand Tomoviee/Wondershare data handling, and treat the broader reference docs as outside the narrow video-scoring skill purpose.

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
API Credentials Exposed Through Command-Line Arguments and Standard Output## Vulnerability Details **File Location**: `scripts/generate_auth_token.py`, lines 27-28 and 38-42 **Vulnerability Type**: Sensitive credential exposure **Risk Level**: Medium ### Vulnerable Code ```python credentials = f"{app_key}:{app_secret}" access_token = base64.b64encode(credentials.encode()).decode() return access_token ``` ```python 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 insecure invocation is also explicitly recommended in `SKILL.md`, line 19: ```bash python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET ``` ### Technical Analysis The script accepts an API secret through a command-line argument. Depending on the execution environment, command-line arguments may be exposed through shell history, process inspection, command auditing, Agent transcripts, or CI/CD logs. It then combines the application key and secret as `app_key:app_secret`, applies Base64 encoding, and prints the resulting HTTP Basic credential to standard output. Base64 provides no confidentiality and can be trivially decoded. Anyone who obtains the printed token can recover the original credentials or directly reuse the token. In an Agent environment, standard output may be returned to the caller and retained in conversation or execution logs. Printing the credential is not required for the Skill’s declared video-scoring functionality because the API client can construct and use the Authorization header internally. The related logic in `scripts/tomoviee_video_scoring_client.py`, lines 17-25, is not independently classified as a vulnerability: constructing an HTTP Basic credential in memory and sending it over HTTPS to the fixed API endpoint is necessary for the declared API operation, and that client does not print the token. ### Attack Path 1. A user follows the documented command and supplies a real appli ...[truncated 1140 chars]
Remediation
## Remediation Suggestions 1. Remove all printing of authentication tokens and raw credentials: ```python print(f"Access Token: {token}") print(f"\nUse in Authorization header as: Basic {token}") ``` 2. Do not accept secrets through command-line arguments. Read the secret through a non-echoing prompt: ```python from getpass import getpass app_key = input("Application key: ") app_secret = getpass("Application secret: ") ``` 3. For automated environments, retrieve credentials from an approved secret manager or protected environment variables. Ensure environment access and log redaction policies are configured appropriately. 4. Construct the Authorization header only in memory and send it directly over verified HTTPS. Avoid returning or displaying the encoded token outside the API client. 5. Redact credentials and Authorization headers from exceptions, debug output, Agent traces, telemetry, and HTTP logging. 6. Update `SKILL.md` so it no longer instructs users to place secrets on the command line. Document secure credential provisioning instead. 7. Rotate any credentials previously used with this script if its stdout, command history, or Agent execution logs may have been retained or accessed by unauthorized parties.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
There is a clear mismatch between the declared purpose and the actual code behavior. The description claims the skill generates music for video content, but the code only encodes provided API credentials into a Basic authentication token. It does not analyze video, generate audio, create soundtracks, or perform any media-related processing. Its primary purpose is authentication support, which is materially different from the declared music-generation functionality.

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
90% confidence
Finding
The script prints the generated Basic authentication token directly to stdout. Because stdout is often captured by shell history, CI logs, terminal recording, or process monitoring, this can expose reusable credentials and enable unauthorized API access.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill documents network-dependent behavior and references external API usage, but it does not declare any tool scope or allowed-tools boundary. This creates a transparency and governance gap: an agent may invoke networked behavior without explicit permission scoping, making review and least-privilege enforcement harder.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs users to provide a video URL to an external service but gives no warning that video content and related metadata may be transmitted to a third party. In a media-processing context, videos can contain sensitive personal, commercial, or copyrighted material, so omission of a privacy notice can lead to unintended data disclosure.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill manifest says this skill is for generating music tailored to video content, specifically video soundtrack operations. However, this file documents four APIs including text-to-music, sound effects, and text-to-speech, which materially broaden the advertised behavior beyond video scoring.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The documented sound-effect API generates custom effects, foley, game audio, and UI sounds, which goes beyond generating music tailored to video content. These are separate audio-production functions rather than direct implementation details of video scoring.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest positions the skill as generating music tailored to video content, but these lines document converting arbitrary text to speech for voiceovers, narration, dialogue, and accessibility. Text-to-speech is a distinct capability and not an obvious implementation detail of video soundtrack generation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation explains that the API analyzes user-supplied video URLs remotely, but it does not warn that submitted video content and any accessible URL resource are sent to a third-party service for inspection and processing. This can lead users or downstream agents to transmit sensitive or private video assets without informed consent, especially in enterprise or internal-content contexts.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The callback feature sends task status, result URLs, and passthrough parameters to user-specified external endpoints, yet the documentation omits an explicit warning about exfiltration and SSRF-like risks from misconfigured or attacker-controlled callback destinations. In agent settings, this can cause sensitive metadata or generated asset locations to be disclosed to third parties without sufficient operator awareness.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
This section promotes use of the skill for game ambience, UI click sounds, and NPC voices. Those capabilities are not justified by a stated purpose limited to generating music tailored to video content and represent unrelated audio-production contexts.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is declared as a single-purpose video-soundtrack capability, but the embedded guide instructs on a much broader set of image, video, audio, and speech APIs. In an agent setting, this scope expansion can mislead orchestration or downstream prompt construction into invoking unintended capabilities, increasing the attack surface and enabling unauthorized or policy-bypassing use beyond the stated skill boundary.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
This code sends API authentication data via headers in outbound network requests, but there is no confirmation prompt, logging, comment, or docstring warning that credentials and request payloads will be transmitted to an external service. For code files, outbound network operations involving user or system data should include some visible disclosure unless the warning is documented elsewhere.

Natural-Language Policy Violations

Low
Confidence
76% confidence
Finding
The heading presents the skill primarily in Chinese (with an English gloss) and does not indicate that language selection is optional or user-controlled. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy violation.

Description-Behavior Mismatch

Low
Confidence
88% confidence
Finding
The manifest narrows the skill to video soundtrack operations, but these lines document general-purpose text-to-music generation for podcasts, presentations, and standalone content. General music generation is adjacent, but still broader than the declared video-tailored purpose.

Intent-Code Divergence

Low
Confidence
88% confidence
Finding
Claiming the guide covers 'all Tomoviee AI APIs' directly conflicts with the skill's declared narrow purpose and can encourage an agent to treat the skill as a general Tomoviee interface. While this is primarily a design and trust-boundary issue rather than direct code execution, it weakens least-privilege assumptions and can contribute to inappropriate tool usage.

Static analysis

No suspicious patterns detected.