Back to skill

Security audit

video-content-watcher

Security checks for vulnerabilities and agentic risk

Overview

This video-analysis skill is review-worthy because its scripts run unreviewed code from a hard-coded local project path and may send video or transcript content to third-party APIs.

Install only if you trust the separate local video-reader project at the hard-coded workspace path, because this skill does not bundle the implementation it imports. Avoid using it on private, regulated, or confidential videos unless you have confirmed local transcription mode and understand what transcript or text content is sent to MiniMax or OpenAI.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/video_reader.py:8
Finding

External Python Module Import Enables Local Tool Hijacking

Content
View full analysis

Vulnerability Details

File Location: scripts/video_reader.py:8-13
Vulnerability Type: Untrusted external module loading through Python path manipulation
Risk Level: High

Vulnerable Code

python
# MCP project location
# scripts/video_reader.py → parents[4] = /home/ykl/.openclaw/
SKILL_ROOT = Path(__file__).resolve().parents[4]  # /home/ykl/.openclaw/
MCP_PATH = SKILL_ROOT / "workspace-code-dev" / "video-reader"
sys.path.insert(0, str(MCP_PATH / "src"))  # add video-reader/src so video_reader_mcp can be found

from video_reader_mcp import VideoReaderMCP

The same insecure pattern also appears in scripts/analyze_text.py:7-11:

python
# MCP project location
SKILL_ROOT = Path(__file__).resolve().parents[4]  # /home/ykl/.openclaw/
MCP_PATH = SKILL_ROOT / "workspace-code-dev" / "video-reader"
sys.path.insert(0, str(MCP_PATH / "src"))

from video_reader_mcp import VideoReaderMCP

Technical Analysis

Both CLI entry points prepend a hardcoded external workspace directory to sys.path and then import video_reader_mcp from it. Because index zero has import precedence, Python will execute a matching module or package found in that external directory before considering normally installed packages.

The imported implementation is not bundled with the audited project and has no version pin, integrity check, ownership validation, or permission validation. Therefore, the effective executable behavior of both scripts can be replaced by anyone who can create or modify the expected external module.

The use of Path(__file__).resolve().parents[4] is also installation-layout dependent. Moving the Skill or running it from a different hierarchy can cause the calculated trust root to point somewhere unintended. The audit could not verify the external implementation's handling of videos, transcripts, temporary files, API credentials, or network requests because that source code is absent from the artifact.

Attack Path

  1. An attacker ob ...[truncated 1524 chars]
Remediation
View remediation

Remediation Suggestions

  1. Bundle video_reader_mcp within the Skill so that the reviewed package contains all executable code.
  2. Remove the hardcoded parents[4] path calculation and sys.path.insert(0, ...) manipulation.
  3. Import the implementation through a normal package dependency with an exact version and cryptographic hash pin.
  4. If an external checkout is operationally unavoidable:
    • Require its path through explicit trusted configuration rather than deriving it from the Skill's location.
    • Resolve and validate the canonical path.
    • Reject directories writable by untrusted users.
    • Validate expected ownership and restrictive permissions.
    • Pin the external source to a reviewed commit.
    • Verify file or package hashes before loading it.
  5. Execute media processing with least privilege and provide only the credentials required for the selected operation.
  6. Apply the same correction to scripts/analyze_text.py:7-11, which contains the identical vulnerable import design.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description centers on analyzing video content from YouTube, Bilibili, or local video files. The supplied code chunk does not process videos, URLs, or audio; it takes arbitrary text input directly and analyzes that text. The module docstring even states it 'skip[s] video/audio processing.' While this may be related to the broader skill implementation, this specific code chunk's primary purpose is materially different from the declared video-analysis purpose, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/api_details.md (reported line 18)May include surrounding context.

md
│   │   └── llm_analyzer.py     # MiniMax / OpenAI LLM analysis
│   └── output/
│       └── report_generator.py # Markdown report generation
├── .env                     # Env vars (gitignored, no real keys)
├── .env.example             # Template for collaborators
├── requirements.txt
└── temp/                    # Audio extraction temp files

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill triggers when a user asks to "summarize, analyze, extract key points from a video, or assess video value," but it does not define exact trigger phrases, constraints, or exclusions. Phrases like "summarize" and "analyze" are broad and could overlap with many ordinary requests unless the system reliably infers the video context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill handles potentially sensitive video content and transcripts but does not clearly disclose that data may be sent to external transcription and LLM providers. This can lead to unintentional data exposure, privacy violations, or compliance issues when users process private local files or non-public videos.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill is explicitly configured to send content to an external MiniMax endpoint, and possibly to Whisper API, which creates a real data exfiltration surface for transcripts or source-derived content. In a video-analysis skill this behavior is expected, but it is still security-relevant because local/private video contents may be transmitted off-system.

Content

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

md
| `MINIMAX_API_KEY` | Yes | — | MiniMax API key |
| `WHISPER_MODE` | No | `api` | `api` or `local` |
| `WHISPER_API_KEY` | If mode=api | — | OpenAI API key for Whisper |
| `LLM_BASE_URL` | No | `https://api.minimaxi.com/v1` | MiniMax endpoint |
| `LLM_MODEL` | No | `MiniMax-M2.7` | Model name |

## Supported Sources

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation explicitly describes optional transmission of extracted/transcribed video content to third-party APIs for transcription and analysis, but it does not warn users about privacy, consent, or data-sharing implications. In a video-analysis skill, transcripts may contain sensitive personal, proprietary, or copyrighted material, so omission of a clear disclosure can lead to unintentional exfiltration of user data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api_details.md (reported line 28)May include surrounding context.

md
### MiniMax LLM (used for analysis)

- **Endpoint**: `https://api.minimaxi.com/v1` (or custom `LLM_BASE_URL`)
- **Model**: `MiniMax-M2.7` (default), `MiniMax-Text-01` also supported
- **Auth**: Bearer token via `MINIMAX_API_KEY`

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill for extracting and analyzing content from YouTube, Bilibili, or local video files. This script explicitly 'skip[s] video/audio processing' and accepts raw text from the command line for direct analysis, which broadens the skill beyond video-content handling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The docstring frames the script as direct text analysis without video/audio handling, yet the implementation relies on VideoReaderMCP, a component named and scoped around video reading. This creates an intent/documentation mismatch about what subsystem is actually being used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code accepts HTTP(S) URLs and passes them to a processing function, which implies a network operation against user-supplied remote content. The script provides usage text but no explicit warning, confirmation, or descriptive notice that a remote URL will be fetched and processed.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.