Back to skill

Security audit

yt-whisper-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its YouTube transcription purpose, but its runner can silently delete unrelated MP4 files in the selected output directory.

Review before installing. The main risk is data loss: do not run this skill with --output-dir pointing at a folder that contains MP4 files you care about until the recursive MP4 deletion is removed or constrained to a per-run temp directory. The installer also creates a venv and user-level command copies, which is normal for this skill but should be expected.

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/yt-transcribe.sh:571
Finding

Unscoped Recursive Deletion of Existing MP4 Files

Content
View full analysis

Vulnerability Details

File Location: scripts/yt-transcribe.sh:571
Vulnerability Type: Unintended recursive file deletion
Risk Level: Medium

Technical Analysis

After successfully creating a transcript, the script recursively deletes every MP4 file beneath the configured output directory:

bash
rm -f "$TEMP_AUDIO" "$RAW_TEXT" "${TEMP_AUDIO%.*}.json"
find "$OUTPUT_DIR" -type f -name "*.mp4" -delete

OUTPUT_DIR defaults to ~/Transcriptions, but the command-line parser allows the caller to replace it with an arbitrary output directory through --output-dir:

bash
--output-dir|-o)
    OUTPUT_DIR_ARG="$2"
    shift 2
    ;;

The cleanup operation is not restricted to the per-run temporary directory or to files created by the current execution. It recursively traverses the complete output tree and deletes pre-existing MP4 files, including files in nested directories. There is no confirmation, dry-run, ownership check, or manifest of files generated by the Skill.

This expands authorization to write a transcript into authorization to delete unrelated media beneath the selected directory.

Attack Path

  1. The Skill is invoked with a transcription URL and an output directory that already contains MP4 files, either directly or in nested directories.
  2. The video download and Whisper transcription complete successfully.
  3. The Skill writes the resulting transcript.
  4. Line 571 recursively searches the entire configured output directory.
  5. Every file whose name ends in .mp4 is deleted, regardless of whether the Skill created it.

For example, selecting a shared media directory as --output-dir causes all MP4 files under that directory to be removed after a successful transcription.

Impact Assessment

The issue can cause irreversible loss of unrelated user media within the configured output directory and all descendant directories. It does not grant additional operating-system privileges, but it exceeds the file-operatio ...[truncated 286 chars]

Remediation
View remediation

Remediation Suggestions

Remove the recursive output-directory cleanup:

bash
find "$OUTPUT_DIR" -type f -name "*.mp4" -delete

Delete only exact temporary files created during the current invocation. Prefer keeping all downloaded media inside the unique per-run temporary directory and removing that directory after processing:

bash
rm -rf -- "$TEMP_DIR"

For stronger hardening:

  1. Maintain an explicit list of files created by the current run and delete only those paths.
  2. Verify cleanup targets are descendants of the expected per-run temporary directory before deletion.
  3. Use -- before path arguments where supported to prevent option interpretation.
  4. If broad media cleanup is intentionally required, expose it as a separate explicit flag, display the exact scope, and require confirmation before deletion.
  5. Add a regression test that places unrelated MP4 files in both the output root and a nested directory and verifies that transcription leaves them intact.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description describes an end-user skill that transcribes YouTube videos and generates summaries/research plans. The supplied code chunk does not perform those functions; it only installs dependencies and places a wrapper script in expected locations. While installation is a supporting detail for such a skill, this chunk by itself materially differs from the declared behavior because none of the core advertised capabilities are implemented in the provided code. Therefore the description does not accurately represent what this specific code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implemented shell script substantially matches the transcription portion of the description: it normalizes YouTube inputs, downloads audio, handles t/start/end timestamp parameters, chooses a Whisper model automatically unless overridden, uses CUDA, infers categories from titles, writes transcriptions into category subfolders, and cleans temp artifacts. However, the description also asserts additional capabilities that are not present in this code chunk: generating structured AI summary markdown files, generating AI research-plan markdown files, and operating on any input file rather than just YouTube URLs or IDs. Those are material declared capabilities absent from the supplied code, so the description does not accurately represent the full behavior of this chunk.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 12)May include surrounding context.

md
Transcribes YouTube videos with the local `scripts/yt-transcribe.sh` and a self-contained Whisper

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Deleting all .mp4 files under $OUTPUT_DIR is unjustified for a transcription tool and creates a direct arbitrary file-destruction risk within any chosen output directory. Since the script accepts --output-dir, a user or calling agent could point it at a broader directory tree, causing silent loss of unrelated video files on every successful run.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill directs the agent to run shell commands, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where an agent may execute shell actions without a narrowly bounded contract, increasing the chance of command execution beyond the user's intended task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file states 'Language: write the report in the user's language (default Italian),' which imposes Italian when the user's language is not explicitly known. This is a locale/language policy issue because it sets a specific default language rather than requiring user choice or clear opt-in.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

md
### Rules

- Do NOT overwrite an existing `_AISUMMARY.md` without asking; if one exists, ask first or write a dated variant.
- Back up any file before overwriting it (`cp -a file file.bak-YYYYMMDD-HHMMSS`).
- The summary is a separate artifact: never modify or truncate the original `.txt` transcript.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 189)May include surrounding context.

md
### Rules

- Do NOT overwrite an existing `_AISUMMARY.md` without asking; if one exists, ask first or write a dated variant.
- Back up any file before overwriting it (`cp -a file file.bak-YYYYMMDD-HHMMSS`).
- The summary is a separate artifact: never modify or truncate the original `.txt` transcript.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/install.sh (reported line 12)May include surrounding context.

sh
check_dep() {
    if ! command -v "$1" &> /dev/null; then
        echo "Error: $1 is not installed"
        echo "Install with: sudo apt install $2"
        exit 1
    fi
}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This shell script upgrades pip, installs Python packages, creates directories, and copies executable scripts into locations under the user's home directory. Although it prints status messages after the fact, it does not warn beforehand or ask for confirmation before making these persistent changes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script performs find "$OUTPUT_DIR" -type f -name "*.mp4" -delete, which deletes every MP4 anywhere under the configured output tree, not just temporary artifacts associated with the current transcription job. Because --output-dir is user-controllable and the skill's stated purpose is transcription/archive, this broad destructive action can remove unrelated user media and exceeds the minimally necessary scope of cleanup.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.