Back to skill

Security audit

Video Subtitle Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its subtitle-generation purpose, but its full pipeline can send subtitle text to a remote LLM and incur costs automatically when an API key is already present.

Review before installing. Use an isolated virtual environment, pin dependencies if possible, and do not run the full pipeline with OPENAI_API_KEY set unless you intentionally want subtitle text sent to the configured LLM provider and accept token charges. Prefer running transcription separately for sensitive videos, then explicitly choose whether to translate.

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

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned Third-Party Dependencies Permit Unreviewed Supply-Chain Changes<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-4` **Vulnerability Type**: Unpinned and integrity-unverified dependencies **Risk Level**: Medium ### Vulnerable Code ```text whisperx torch torchaudio openai ``` The documented installation procedure executes: ```bash pip install -r requirements.txt ``` ### Technical Analysis Every direct dependency is specified without an exact version or integrity hash. Consequently, the package versions installed depend on the state of the configured Python package indexes at installation time rather than a previously reviewed and reproducible dependency set. The affected packages also introduce substantial transitive dependency trees. A malicious or compromised upstream release, altered package index, or dependency-resolution change could cause unreviewed code to be downloaded and installed. Python package installation may execute package build backends or other installation logic, while subsequently importing the installed libraries executes their runtime code with the privileges of the user running the application. There is no lock file, hash verification, or index restriction in the project to ensure that users receive the same reviewed artifacts. ### Attack Path 1. An attacker compromises an upstream dependency or one of its transitive dependencies, or causes a malicious release to be selected through the configured package index. 2. A user follows the documented `pip install -r requirements.txt` command. 3. Because no versions or hashes are constrained, pip resolves the affected release. 4. Malicious installation logic may execute during package installation, or malicious runtime code may execute when the scripts import `torch`, `whisperx`, or `openai`. 5. The payload operates with the privileges of the user or automation account performing the installation or running the scripts. This path depends on compromise or manipulation of an upstream package or package-resolution source; the a ...[truncated 709 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed exact version, for example with `package==x.y.z`. 2. Generate a fully resolved lock file that also pins transitive dependencies. 3. Record and enforce cryptographic hashes for downloaded artifacts, such as by using a hash-locked requirements file and: ```bash pip install --require-hashes -r requirements.txt ``` 4. Explicitly use trusted package indexes and prevent unintended fallback to untrusted or privately controlled indexes. 5. Install dependencies inside an isolated virtual environment or container using a non-privileged account. 6. Add automated dependency and vulnerability scanning to the release process. 7. Review and deliberately update dependency pins rather than automatically accepting the newest available release. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run.py:82
Finding
Full Pipeline Does Not Enforce Explicit Consent Before Remote Subtitle Transmission<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/run.py:82-89` - `scripts/translate.py:127-159` - `scripts/translate.py:221-225` - Consent requirement: `SKILL.md:48-54` **Vulnerability Type**: Missing authorization and privacy confirmation before remote processing **Risk Level**: Medium ### Vulnerable Code The full pipeline treats the existence of an API key as sufficient authorization to perform translation: ```python if not os.environ.get("OPENAI_API_KEY"): cprint("OPENAI_API_KEY is not set, skipping translation", YELLOW) print(" To enable translation, set the OPENAI_API_KEY environment variable") print() else: run_cmd([python_cmd, str(script_dir / "translate.py"), output_dir, "-o", translated_dir, "-t", target_lang, "--bilingual", "--target-only"]) ``` The translation implementation inserts subtitle content into prompts and sends it to the configured remote API: ```python prompt = ( f"Translate the following {len(batch_texts)} sentences into natural, " f"fluent {target_lang_name}. Keep one translation per line and preserve the " "original order.\nPreserve technical terminology accurately.\n\n" "Source text:\n" ) for j, text in enumerate(batch_texts, 1): prompt += f"{j}. {text}\n" prompt += ( "\nReturn the translations in this format, with one translation per line:\n" f"1. [{target_lang_name} translation of sentence 1]\n" f"2. [{target_lang_name} translation of sentence 2]\n" "..." ) print(f" Translating batch {i//batch_size + 1}/{(total-1)//batch_size + 1} " f"({i+1}-{min(i+batch_size, total)}/{total})") try: response = api_call_with_retry(lambda: client.chat.completions.create( model=model, messages=[{"role": "user", "content": prompt}], temperature=0.3, ...[truncated 3850 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make the full pipeline transcription-only by default. 2. Require an explicit, operation-specific option before invoking translation, such as: ```bash python3 scripts/run.py --confirm-remote-translation ``` 3. Before accepting confirmation, display: - The effective API provider and complete base URL. - The selected model. - The number and names of files to be transmitted. - A clear statement that subtitle content leaves the local system. - A warning that the operation consumes paid API tokens. 4. Do not treat the presence of `OPENAI_API_KEY` as consent. 5. For noninteractive automation, require a dedicated variable such as `CONFIRM_REMOTE_TRANSLATION=yes` in addition to the API key, and document that it represents explicit approval for the current operation. 6. Consider requiring an allowlisted HTTPS endpoint and rejecting plaintext HTTP URLs. 7. Avoid exposing API keys through command-line arguments where they may appear in process listings; prefer environment variables or a protected credential store. 8. Add a dry-run mode that reports which files, endpoint, and model would be used without transmitting data. 9. Record only non-sensitive consent metadata in logs; never log API keys or full subtitle content. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the actual implementation only operates on existing SRT files while the skill advertises end-to-end video transcription with WhisperX and language auto-detection, users and calling agents may make unsafe assumptions about what will be processed and what dependencies will be installed or invoked. Description/behavior mismatch is dangerous because it can mask real data flows, cause incorrect trust decisions, and bypass user expectations around local processing versus remote API use.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the actual implementation only operates on existing SRT files while the skill advertises end-to-end video transcription with WhisperX and language auto-detection, users and calling agents may make unsafe assumptions about what will be processed and what dependencies will be installed or invoked. Description/behavior mismatch is dangerous because it can mask real data flows, cause incorrect trust decisions, and bypass user expectations around local processing versus remote API use.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Content
# Windows cmd.exe does not support ANSI by default; disable colors there.
if sys.platform == "win32" and "WT_SESSION" not in os.environ:
    try:
        os.system("")  # enable ANSI on Windows 10+
    except Exception:
        GREEN = YELLOW = RED = NC = ""
Confidence
85% confidence
Finding
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| Dependency | macOS | Linux | Windows |
|-----------|-------|-------|---------|
| Python 3.9+ | `brew install python` | `apt install python3` | [python.org](https://www.python.org/downloads/) |
| ffmpeg | `brew install ffmpeg` | `sudo apt install ffmpeg` | `choco install ffmpeg` or `scoop install ffmpeg` |

## Resource Requirements
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| Dependency | macOS | Linux | Windows |
|-----------|-------|-------|---------|
| Python 3.9+ | `brew install python` | `apt install python3` | [python.org](https://www.python.org/downloads/) |
| ffmpeg | `brew install ffmpeg` | `sudo apt install ffmpeg` | `choco install ffmpeg` or `scoop install ffmpeg` |

## Resource Requirements
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The documentation states 'Translate subtitles to Chinese (default)' and later reinforces that the default target language is `zh`. This imposes a specific language/locale preference by default rather than requiring an explicit user choice or clearly justifying the locale constraint.

Lp3

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding
The skill documentation describes operations that require shell execution, environment-variable access, and reading/writing files, but it does not declare any explicit tool scope or allowed-tools boundary. This creates an authorization ambiguity where an agent may invoke broader capabilities than users expect, increasing the chance of unsafe execution or privilege creep.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The documentation states 'Translate to Chinese (default)' and defines the default target language as `zh`, which effectively biases output to a specific locale unless the user overrides it. The file does not explain a region-specific requirement or present this default as an explicit user choice.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def run_cmd(args):
    result = subprocess.run(args)
    if result.returncode != 0:
        sys.exit(result.returncode)
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends subtitle text to a third-party LLM service for translation, but it does not provide an explicit warning, consent flow, or privacy notice about transmitting potentially sensitive video content off-box. In this skill context, subtitle files may contain confidential meetings, personal information, or proprietary content, so silent exfiltration to an external API creates a real privacy and compliance risk.

Ssd 1

Medium
Confidence
92% confidence
Finding
Untrusted subtitle text is embedded directly into the user prompt, so adversarial subtitle content can inject instructions such as asking the model to ignore translation directions, alter output format, or include extra text. While this does not lead to code execution in the script, it can corrupt translations, break downstream parsing assumptions, and in some cases cause unintended disclosure or unreliable outputs.

Ssd 1

Medium
Confidence
95% confidence
Finding
The batch prompt combines multiple untrusted subtitle lines into a single instruction context, which amplifies prompt-injection risk because one malicious subtitle can influence the model's handling of the entire batch. In this subtitle-generation context, that can cause widespread mistranslation, formatting drift, or batch parsing failure affecting many output entries at once.

Unpinned Dependencies

Low
Category
Supply Chain
Content
whisperx
torch
torchaudio
openai
Confidence
96% confidence
Finding
The dependency `whisperx` is unpinned, so installs may pull different versions over time, reducing build reproducibility and increasing supply-chain risk if a newly released version introduces a vulnerability or breaking behavior. In a skill that processes media and relies on ML packages, uncontrolled upgrades can unexpectedly expose the environment to insecure transitive dependencies.

Unpinned Dependencies

Low
Category
Supply Chain
Content
whisperx
torch
torchaudio
openai
Confidence
99% confidence
Finding
The dependency `torch` is unpinned, which is especially risky because PyTorch is a large native-code ML framework with a history of security advisories. Without version pinning, deployments may silently install a vulnerable release or change behavior across environments, increasing supply-chain and exposure risk.

Unverifiable Dependency: torch has 16 known advisory(ies) (CVE-2025-2953 (PyTorch susceptible to local Denial of Service); CVE-2022-45907 (PyTorch vulnerable to arbitrary code execution); CVE-2025-32434 (PyTorch: `torch.load` with `weights_only=True` leads to remote code execution) +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
98% confidence
Finding
`torch` has multiple known advisories, and because the manifest does not pin a version, there is no way to verify whether the deployed environment avoids affected releases. This is more concerning in this skill because it processes attacker-controlled media inputs and depends on a complex native ML stack, so any vulnerable PyTorch version could increase the chance of code execution or denial-of-service paths being reachable.

Unpinned Dependencies

Low
Category
Supply Chain
Content
whisperx
torch
torchaudio
openai
Confidence
95% confidence
Finding
The dependency `torchaudio` is unpinned, so the installed version can vary between environments and over time. This weakens reproducibility and may introduce vulnerable or incompatible transitive components, particularly in a media-processing workflow that handles untrusted audio/video inputs.

Unpinned Dependencies

Low
Category
Supply Chain
Content
whisperx
torch
torchaudio
openai
Confidence
95% confidence
Finding
The dependency `openai` is unpinned, allowing uncontrolled upgrades that may introduce security issues, API-breaking changes, or altered default behaviors. Although this is less severe than a native ML library issue, it still creates avoidable supply-chain risk.

Static analysis

No suspicious patterns detected.