Back to skill

Security audit

Kre Video Translator|视频翻译 Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed video-translation integration that uploads media to Kre's API and uses local tools for processing, with sensitive steps such as API-key storage and tool installation documented and user-gated.

Before installing, confirm you are comfortable sending source media, filenames, language settings, prompts, and optional subtitle references to https://kretrans.com/api. Use the local API-key setup flow instead of pasting keys into chat. Treat --allow-install-tools as a separate approval for local package installation, especially if it may invoke sudo or a system package manager.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to translate media, but it also launches visible terminals and uses OS-specific console mechanisms for interactive auth setup. Spawning external terminal sessions materially expands the attack surface because it can surprise users, enable command execution paths outside the expected workflow, and blur the boundary between translation logic and system-level actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to translate media, but it also launches visible terminals and uses OS-specific console mechanisms for interactive auth setup. Spawning external terminal sessions materially expands the attack surface because it can surprise users, enable command execution paths outside the expected workflow, and blur the boundary between translation logic and system-level actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to translate media, but it also launches visible terminals and uses OS-specific console mechanisms for interactive auth setup. Spawning external terminal sessions materially expands the attack surface because it can surprise users, enable command execution paths outside the expected workflow, and blur the boundary between translation logic and system-level actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill exposes broad capabilities including shell, network, file read/write, and environment access, but it does not declare any tool scope or permissions boundaries. In an agent ecosystem, this increases the chance that the skill can perform sensitive actions beyond a user's reasonable expectation, especially when handling local files, credentials, and external downloads.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

normalize_locale collapses any non-empty locale other than 'zh' to 'en', which enforces an English locale by default rather than preserving user choice. This is a natural-language policy concern because it forces a specific language unless the user explicitly provides Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The message 'Pass --locale zh for Chinese or --locale en for other conversations' explicitly limits conversations to Chinese or English. The file does not present this as an optional preference or justified region-specific constraint, so it appears to force a language policy without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The write_key function persists an API key to disk, which is a safety-relevant file write involving sensitive credentials. In this file there is no confirmation prompt, user-visible logging/print, or explanatory comment/docstring near the operation to disclose that the secret will be written to a local file path.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file adds a terminal-launching capability specifically for hidden API-key input, which is not obviously necessary for a video translation skill and expands the agent's ability to open interactive user-facing processes. In agent environments, such out-of-band UI can bypass expected consent and auditing flows, making phishing, secret collection, or unexpected local execution more dangerous even if the implementation is not overtly malicious.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/terminal.py (reported line 36)May include surrounding context.

python
return False
    try:
        if os.name == "nt":
            subprocess.Popen(argv, creationflags=subprocess.CREATE_NEW_CONSOLE)
            return True
        if sys.platform == "darwin":
            command = command_text(argv).replace("\\", "\\\\").replace('"', '\\"')

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
73% confidence
Finding

On macOS, the code builds an AppleScript string that tells Terminal to execute a command assembled from argv. Although it performs some escaping, this is still string-based command construction across multiple quoting layers, which is brittle and can permit command/script injection or unintended execution if any argv element is attacker-influenced.

Content

Scanner excerpt · scripts/terminal.py (reported line 40)May include surrounding context.

python
return True
        if sys.platform == "darwin":
            command = command_text(argv).replace("\\", "\\\\").replace('"', '\\"')
            subprocess.run(
                ["osascript", "-e", f'tell application "Terminal"\nactivate\ndo script "{command}"\nend tell'],
                check=True, capture_output=True, timeout=15,
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/terminal.py (reported line 49)May include surrounding context.

python
return False
        for name, separator in (("gnome-terminal", "--"), ("konsole", "-e"), ("xfce4-terminal", "-x"), ("x-terminal-emulator", "-e"), ("xterm", "-e")):
            if executable := shutil.which(name):
                subprocess.Popen([executable, separator, *argv])
                return True
    except (OSError, subprocess.SubprocessError):
        return False

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The script can install Python packages at runtime via pip when --allow-install-tools is set. That behavior executes external code from package indexes inside the agent environment, which creates a supply-chain and arbitrary code execution risk if an attacker can influence package resolution, package source, or induce the agent to approve installation. In an agent skill, auto-installation is especially sensitive because it crosses from data processing into system modification and code execution.

Content

Scanner excerpt · scripts/translate.py (reported line 113)May include surrounding context.

python
install_command=f'"{sys.executable}" -m pip install {package}',
        )
    print(f"Installing missing Python package: {package}", file=sys.stderr)
    completed = subprocess.run(
        [sys.executable, "-m", "pip", "install", package],
        check=False,
        stdout=subprocess.PIPE,

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

The generated install command includes sudo when FFmpeg is missing, encouraging privileged package installation from within an agent workflow. In skill context, prompting or enabling root-level system modification materially increases the consequences of misuse or social engineering, especially when triggered by ordinary task execution.

Content

Scanner excerpt · scripts/translate.py (reported line 554)May include surrounding context.

python
return "brew install ffmpeg"
    if sys.platform.startswith("linux"):
        if shutil.which("apt-get"):
            prefix = "" if os.geteuid() == 0 else "sudo "
            return f"{prefix}apt-get update && {prefix}apt-get install -y ffmpeg"
        if shutil.which("dnf"):
            prefix = "" if os.geteuid() == 0 else "sudo "

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

This line similarly constructs a sudo-based dnf installation command. Even though it is presented as a suggested command string rather than directly executed at this site, the skill is normalizing privileged package management as part of routine operation, which is unsafe in an automated agent setting.

Content

Scanner excerpt · scripts/translate.py (reported line 557)May include surrounding context.

python
prefix = "" if os.geteuid() == 0 else "sudo "
            return f"{prefix}apt-get update && {prefix}apt-get install -y ffmpeg"
        if shutil.which("dnf"):
            prefix = "" if os.geteuid() == 0 else "sudo "
            return f"{prefix}dnf install -y ffmpeg"
    if os.name == "nt":
        if shutil.which("winget"):

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The script can automatically install FFmpeg by invoking system package managers, including commands that may require elevated privileges. This changes the host system state and executes large amounts of third-party installation logic, creating a substantial supply-chain and privilege-escalation-adjacent risk in an agent environment. Even with the allow_install flag, this is still dangerous functionality rather than a harmless helper.

Content

Scanner excerpt · scripts/translate.py (reported line 594)May include surrounding context.

python
raise ParamError("FFmpeg is required but no supported package manager was found. Install FFmpeg and retry.")
    for command in commands:
        print(f"Installing FFmpeg with {command[0]}", file=sys.stderr)
        completed = subprocess.run(command, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
        if completed.returncode != 0:
            detail = (completed.stderr or completed.stdout or "").strip()[-800:]
            raise ParamError(f"Unable to install FFmpeg: {detail}")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/translate.py (reported line 619)May include surrounding context.

python
def _ffmpeg_has_filter(ffmpeg: str, filter_name: str) -> bool:
    try:
        completed = subprocess.run(
            [ffmpeg, "-hide_banner", "-filters"],
            check=False,
            stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/translate.py (reported line 641)May include surrounding context.

python
return ffmpeg

    if sys.platform == "darwin" and shutil.which("brew"):
        prefix = subprocess.run(
            ["brew", "--prefix", "ffmpeg-full"],
            check=False,
            stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This path installs ffmpeg-full via Homebrew at runtime when allowed. Like other auto-install paths, it executes third-party package-manager logic and modifies the host, exposing the agent environment to supply-chain compromise and unsafe privilege expansion. The fact that it is conditional does not remove the security risk.

Content

Scanner excerpt · scripts/translate.py (reported line 650)May include surrounding context.

python
).stdout.strip()
        full_ffmpeg = Path(prefix) / "bin" / "ffmpeg" if prefix else Path()
        if not full_ffmpeg.is_file() and allow_install:
            installed = subprocess.run(
                ["brew", "install", "ffmpeg-full"],
                check=False,
                stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/translate.py (reported line 658)May include surrounding context.

python
text=True,
            )
            if installed.returncode == 0:
                prefix = subprocess.run(
                    ["brew", "--prefix", "ffmpeg-full"],
                    check=False,
                    stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

This helper executes arbitrary command arrays supplied by callers, and in this file it is used for media processing and URL downloads. While there is no shell injection primitive here, the function centralizes external process execution and is fed with user-influenced inputs such as media paths and remote URLs, increasing the blast radius of any unsafe caller behavior. In an agent skill, broad subprocess capability is a meaningful security boundary crossing.

Content

Scanner excerpt · scripts/translate.py (reported line 705)May include surrounding context.

python
cwd: Path | None = None,
) -> subprocess.CompletedProcess[str]:
    try:
        completed = subprocess.run(
            command,
            check=False,
            stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The skill invokes yt-dlp on arbitrary user-supplied URLs. Although subprocess is called with an argument list rather than a shell, this still lets untrusted remote input drive a powerful downloader/parser that may access attacker-controlled content, trigger risky protocol handling, or fetch from internal network locations depending on yt-dlp capabilities and environment. In this skill context, URL ingestion makes the attack surface materially larger than a local-file-only workflow.

Content

Scanner excerpt · scripts/translate.py (reported line 746)May include surrounding context.

python
cache_dir = _source_cache_dir()
    download_dir = cache_dir / uuid.uuid4().hex
    download_dir.mkdir(parents=True, exist_ok=True)
    inspect = subprocess.run(
        [sys.executable, "-m", "yt_dlp", "--no-playlist", "--dump-single-json", "--skip-download", url],
        check=False,
        stdout=subprocess.PIPE,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The help text states 'zh for Chinese conversations; en otherwise,' which hard-codes the interaction language based on the locale flag rather than presenting a user choice. This is a natural-language locale policy concern because the file contains language that prescribes a specific language mode instead of offering opt-in wording.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The docstring states 'no UI side effects,' yet the guidance function constructs localized registration instructions, URLs, and reply prompts such as 'When finished, reply "Created".' That is not merely incomplete documentation; it actively describes the module as having no UI-facing behavior while including user-onboarding messaging.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest describes translating media, tracking progress, reviewing subtitles, and exporting outputs, but this file implements credential discovery, onboarding guidance, and writing API keys to local storage. While credential handling may support the service integration, persistent secret management is broader than the user-facing capability described in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

resolve_key reads API credentials from environment variables and from local files, both of which are sensitive sources. The code does not include any visible user-facing notice, logging, or nearby documentation explaining that credential material will be loaded from those locations.

Content

No source excerpt is available for this finding.