Back to skill

Security audit

Yq Story Video Generator

Security checks for vulnerabilities and agentic risk

Overview

This video-generation skill mostly matches its stated purpose, but it tells the agent to install FFmpeg with system-level package commands automatically.

Review before installing. Use it in a sandbox or with FFmpeg already installed, and do not let the agent run sudo or package-manager commands unless you explicitly approve the exact command and understand it will change the host. Expect generated JSON, images, audio, intermediate files, and final MP4 files under output/.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:87
Finding

Automatic Privileged System Package Installation Without Explicit Consent

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 87–99
Vulnerability Type: Unauthorized privilege escalation and host modification
Risk Level: Medium

Vulnerable Code

bash
# Check FFmpeg
if ! command -v ffmpeg &> /dev/null; then
  # Install according to the operating system
  if [[ "$OSTYPE" == "darwin"* ]]; then
    brew install ffmpeg
  elif [[ -f /etc/debian_version ]]; then
    sudo apt-get update && sudo apt-get install -y ffmpeg
  elif [[ -f /etc/redhat-release ]]; then
    sudo yum install -y ffmpeg
  fi
fi

Technical Analysis

The Skill instructs the agent to install FFmpeg automatically when the executable is unavailable. On Debian- and Red Hat-based systems, this includes invoking sudo, updating package metadata, and making system-wide package changes.

FFmpeg is relevant to the video-processing workflow, but automatically crossing the privilege boundary is not necessary. A least-privilege implementation should detect the missing dependency, stop safely, and request explicit authorization before changing the host. Package installation also executes package-manager and repository-controlled installation logic with elevated privileges.

No evidence indicates credential theft, persistence, malicious package sources, or arbitrary remote payload retrieval. The issue is limited to unnecessary privileged host modification directed by the Skill.

Attack Path

  1. A user invokes the video-generation Skill.
  2. The agent performs the prescribed environment check.
  3. The host does not have ffmpeg available in PATH.
  4. The Skill directs the agent to run sudo apt-get update followed by sudo apt-get install -y ffmpeg, or sudo yum install -y ffmpeg.
  5. If the execution environment grants non-interactive or approved sudo access, the package manager runs with root privileges.
  6. The host's package metadata and installed software are modified without ...[truncated 674 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic sudo, package installation, and package-index update commands from the execution workflow.
  2. Detect FFmpeg with command -v ffmpeg and terminate with a clear dependency error if it is unavailable.
  3. Ask for explicit user approval before any system modification, identifying the exact command, required privileges, affected package, and expected side effects.
  4. Prefer an existing unprivileged executable, a prebuilt sandbox or container image, or installation into a user-controlled environment.
  5. If automated installation is essential, restrict it to an isolated disposable environment and use trusted, pinned package sources.
  6. Separate dependency documentation from executable agent instructions so loading the Skill cannot implicitly authorize privileged changes.
  7. Record and surface installation results and failures rather than suppressing prompts or performing unattended host modification.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Chaining Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

Chaining apt-get update with a privileged install command encourages immediate system mutation as part of normal execution flow, reducing opportunities for validation or approval. In an agent setting, such chained privileged actions make unsafe host changes easier to execute automatically.

Content

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

md
if [[ "$OSTYPE" == "darwin"* ]]; then
    brew install ffmpeg
  elif [[ -f /etc/debian_version ]]; then
    sudo apt-get update && sudo apt-get install -y ffmpeg
  elif [[ -f /etc/redhat-release ]]; then
    sudo yum install -y ffmpeg
  fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

步骤3: 创建拼接列表

bash
rm -f output/merged/filelist.txt
for i in $(seq -w 1 $segment_count); do
  echo "file 'scaled_${i}.mp4'" >> output/merged/filelist.txt
done

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest presents the skill as a content-generation tool, but the workflow adds host environment inspection and package installation behavior. This hidden expansion of capability is dangerous because users and orchestrators may permit the skill expecting media generation, not system modification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to install FFmpeg on the host using brew/apt/yum, including privileged package-manager operations. That exceeds the stated scope of video generation and can modify the host environment unexpectedly, creating persistence and supply-chain risk if package sources or execution context are compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Automatic installation via privileged package-manager commands changes the local system without an explicit warning or consent checkpoint. In an agent context, this increases the chance of unauthorized host modification and makes accidental or policy-violating execution more likely.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

The use of sudo apt-get update && sudo apt-get install -y ffmpeg invokes privileged execution from within the skill instructions. If an agent follows this on a real host, it can alter system packages and trust boundaries well beyond the needs of ordinary content generation.

Content

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

md
if [[ "$OSTYPE" == "darwin"* ]]; then
    brew install ffmpeg
  elif [[ -f /etc/debian_version ]]; then
    sudo apt-get update && sudo apt-get install -y ffmpeg
  elif [[ -f /etc/redhat-release ]]; then
    sudo yum install -y ffmpeg
  fi

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

The sudo yum install -y ffmpeg instruction similarly requests root-level package installation on supported systems. Root-level package management is a sensitive operation and should not be embedded in an otherwise application-level media workflow.

Content

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

elif [[ -f /etc/debian_version ]]; then sudo apt-get update && sudo apt-get install -y ffmpeg elif [[ -f /etc/redhat-release ]]; then sudo yum install -y ffmpeg fi fi

text

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill repeatedly states that video resolution is uniformly 768P for generated segments and overall workflow consistency. In Step 5, the FFmpeg merge process explicitly rescales every segment to 1280x720, which contradicts the earlier documented invariant rather than merely omitting detail.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill states it will automatically complete all steps after input confirmation and throughout the workflow repeatedly saves generated artifacts such as JSON, PNG, MP3, and MP4 files under output/. While file creation is central to the skill's purpose, the markdown does not explicitly warn users that existing files in those paths may be created or overwritten, especially where commands use overwrite flags like ffmpeg -y.

Content

No source excerpt is available for this finding.