Back to skill

Security audit

Audio Transcribe

Security checks for vulnerabilities and agentic risk

Overview

The skill is for local audio transcription, but it can automatically install a third-party package and download models despite offline/privacy framing, so it needs review before use.

Install only if you are comfortable with the skill running local commands, reading the audio file you provide, writing transcript files next to that audio, downloading Whisper models, and potentially installing or upgrading openai-whisper automatically. Prefer preinstalling pinned dependencies in a controlled environment and reviewing the script before first use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/transcribe.py:35
Finding

Automatic Runtime Installation of an Unpinned Third-Party Dependency

Content
View full analysis

Vulnerability Details

File Location: scripts/transcribe.py:35-39
Vulnerability Type: Unpinned dependency installation during normal execution
Risk Level: Medium

Vulnerable Code

python
def install_whisper():
    """Attempt to install whisper via pip."""
    print("Installing whisper...")
    try:
        subprocess.run([sys.executable, '-m', 'pip', 'install', '-U', 'openai-whisper'], 
                      check=True, capture_output=True)
        return True
    except subprocess.CalledProcessError:
        return False

This function is automatically reached from scripts/transcribe.py:129-135:

python
if whisper_type is None:
    print("Whisper not found. Installing...")
    if not install_whisper():
        print("Failed to install whisper. Please run: pip install openai-whisper")
        sys.exit(1)
    whisper_type = 'python'

Technical Analysis

When Whisper is unavailable, an ordinary transcription request automatically invokes pip with install -U openai-whisper. Neither the package nor its transitive dependencies are pinned to reviewed versions or verified with cryptographic hashes. The -U option further allows dependency versions to change between executions.

Python package installation can execute package build and installation logic. Consequently, a compromised package release, transitive dependency, configured package index, or dependency-resolution path could result in arbitrary code execution under the account running the skill.

The package name is consistent throughout the project, and the reviewed code does not specify a suspicious package repository. Therefore, this is an unsafe supply-chain design rather than evidence that the named package is currently malicious.

Attack Path

  1. Whisper is absent from both PATH and the active Python environment.
  2. A user invokes the transcription script.
  3. check_whisper_available() returns None.
  4. main() automatically calls install_whisper().

...[truncated 1031 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic package installation from the transcription runtime.
  2. Treat dependency installation as a separate, explicit setup operation requiring user or administrator approval.
  3. Pin openai-whisper and all transitive dependencies to reviewed versions in a lockfile or requirements file.
  4. Verify downloaded artifacts with hashes, for example:
bash
python3 -m pip install --require-hashes -r requirements.txt
  1. Install dependencies in a dedicated virtual environment with only the permissions required for transcription.
  2. Remove -U from normal execution paths to prevent unexpected upgrades.
  3. Use an explicitly trusted package index and prevent untrusted pip configuration from redirecting dependency resolution.
  4. Fail safely with clear setup instructions when Whisper is unavailable instead of modifying the environment automatically.
  5. Review and update pinned dependencies through a controlled maintenance process that includes vulnerability scanning and integrity verification.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Automatic package installation is an unnecessary privileged capability for a transcription skill and substantially broadens the attack surface. It enables retrieval and execution of third-party code during normal operation, turning a simple media-processing task into a supply-chain execution path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The phrase '默认 small 模型 + 中文' states a default language choice in natural language. The policy requires avoiding forced language or locale defaults unless the skill offers a choice or clearly justifies the locale constraint; while later examples show other languages are possible, this line presents Chinese as the default behavior without an explicit opt-in or rationale.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes a local Python script with a user-supplied file path and implies shell execution plus file read/write behavior, yet it declares no explicit tool scope or permissions. This creates an authorization and review gap: an agent or platform may permit broader execution than intended, making it harder to constrain filesystem and shell access safely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad and generic, increasing the chance the skill activates on loosely related user requests. In a skill that can execute shell commands and read local files, ambiguous activation raises the risk of unintended transcription runs against sensitive local media or surprise execution without clear user intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation says the skill is 'completely offline' but later states that the first run downloads a Whisper model, which is a network action. This mismatch can mislead users and reviewers about data exposure, supply-chain risk, and outbound connectivity requirements, especially in privacy-sensitive environments.

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/transcribe.py (reported line 27)May include surrounding context.

python
def check_whisper_available():
    """Check if whisper is available (CLI or Python package)."""
    # Check CLI first
    if subprocess.run(['which', 'whisper'], capture_output=True).returncode == 0:
        return 'cli'
    
    # Check Python package

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The script automatically runs pip install at runtime, which changes the environment and performs a network-backed package installation without explicit approval. In a skill advertised as local/offline transcription, this creates supply-chain and environment-integrity risk: a package fetch, dependency resolution, or compromised index/mirror could introduce untrusted code execution.

Content

Scanner excerpt · scripts/transcribe.py (reported line 42)May include surrounding context.

python
"""Attempt to install whisper via pip."""
    print("Installing whisper...")
    try:
        subprocess.run([sys.executable, '-m', 'pip', 'install', '-U', 'openai-whisper'], 
                      check=True, capture_output=True)
        return True
    except subprocess.CalledProcessError:

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/transcribe.py (reported line 61)May include surrounding context.

python
elif output_format == 'json':
        cmd.append('--output_format json')
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise RuntimeError(f"Whisper CLI error: {result.stderr}")

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is described as local/offline transcription, yet its runtime behavior can modify the host by auto-installing Whisper when missing. This discrepancy is security-relevant because users may grant the skill trust on the assumption that it performs only local inference, while it may actually reach out to package infrastructure and alter the environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script installs a package automatically without explicit user confirmation or a strong warning about network access and environment modification. Even if the package is legitimate, this violates least surprise and can lead to unintended code execution in environments where package installation is restricted or monitored.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all instructions and troubleshooting content exclusively in Chinese, and it does not mention that the skill or documentation is intended only for a Chinese-speaking audience. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file explains that transcription results are saved in the same directory as the input audio file, which is a user-data-affecting file write. Under the markdown criteria for missing warnings, the documentation should clearly disclose this behavior as a warning or notice so users understand where new files will be created before running the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The usage section is framed specifically around “基本转录(中文音频)” and instructs activation via a Chinese-language utterance, while the document does not state that users may choose their preferred interaction language. This can be a language/locale policy issue when a skill implicitly assumes one language without offering opt-in or alternatives.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
46% confidence
Finding

The file includes an example using zh, but the script also supports arbitrary language codes and auto-detection. This does not clearly force a locale, so the concern is weak; however, if organizational policy requires neutral language handling, examples should avoid implying a preferred locale unless justified.

Content

No source excerpt is available for this finding.