Back to skill

Security audit

Na He

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent video-analysis purpose, but its instructions encourage running downloader shell commands on user-provided URLs without safe argument handling.

Review before installing. Use this skill only with trusted video URLs or after adding URL validation and shell-free downloader invocation. Be aware that analysis results are intended to be sent to Feishu and that videos and extracted frames may be stored locally during processing.

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

Error
Location
SKILL.md:18
Finding
Command Injection Through Unquoted User-Controlled Video URLs## Vulnerability Details **File Location**: `SKILL.md`, lines 18–25 **Vulnerability Type**: OS command injection caused by unsafe shell command construction **Risk Level**: High ### Vulnerable Code ```bash you-get -o ./video https://www.bilibili.com/video/BVxxx # or yt-dlp https://www.bilibili.com/video/BVxxx -o ./video ``` ```bash you-get -o ./video https://www.douyin.com/video/xxx ``` ### Technical Analysis The Skill accepts video URLs from users and instructs the Agent to substitute those values into shell commands. The affected examples pass the URL as an unquoted shell argument. If the Agent interpolates an attacker-controlled value verbatim, shell metacharacters such as `;`, `&&`, `|`, redirection operators, or command substitutions may be interpreted as shell syntax rather than as part of the URL. For example, a malicious value shaped like a supported URL followed by `; attacker-command` could cause the downloader to run first and then execute the injected command. Merely adding quotes is not a complete defense in every construction scenario; the safer approach is to avoid invoking a shell and pass the validated URL as a discrete argument through a process-execution API. The issue applies to the unquoted Bilibili and Douyin examples. The generic-platform example elsewhere in the file quotes its URL but does not eliminate the need for strict validation and shell-free process invocation. ### Attack Path 1. An attacker provides a purported Bilibili or Douyin video URL containing shell-control syntax. 2. The Skill selects the corresponding documented download command. 3. The Agent replaces the example URL with the attacker-controlled value without validation or argument-safe escaping. 4. The command is submitted to a shell. 5. The shell parses the injected metacharacters and executes additional attacker-selected commands. 6. Those commands run with the operating-system privileges and accessible environmen ...[truncated 693 chars]
Remediation
## Remediation Suggestions 1. Do not construct shell command strings by concatenating or interpolating user-provided URLs. 2. Invoke `you-get` and `yt-dlp` through a process API that accepts an executable and argument array, with shell execution disabled. Treat the entire URL as one argument. 3. Parse the URL before execution and allow only expected schemes such as `https`. 4. Apply a hostname allowlist for platform-specific branches, such as the exact approved Bilibili and Douyin domains, while accounting for explicitly supported subdomains. 5. Reject malformed URLs, embedded credentials, control characters, line breaks, and unexpected schemes. 6. Use a fixed, application-controlled output directory and filename rather than accepting path components from users. 7. Run download and media-processing tools in a sandbox with minimal filesystem permissions, restricted network access, execution timeouts, and resource limits. 8. If a shell is unavoidable, use a platform-appropriate escaping routine for every untrusted argument. Quoting alone should not replace URL validation or shell-free invocation. 9. Update every command example consistently so Agents are not encouraged to copy an unsafe invocation pattern.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly states that analysis results will be sent via Feishu, but it does not clearly disclose to users that video-derived information may be transmitted to an external messaging service. This creates a privacy and data-handling risk, especially if the analyzed content contains sensitive personal, biometric, or behavioral information inferred from the video.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The manifest description is entirely in Chinese and does not indicate that other languages are supported or that Chinese is required for a region-specific reason. Under the language/locale policy, forcing a specific language without user opt-in can be a policy violation.

Missing User Warnings

Low
Confidence
82% confidence
Finding
The skill instructs downloading remote videos from user-provided URLs using external tools, but it does not warn that this will cause outbound network access and create local files. This can surprise users, create privacy and storage risks, and in some environments may facilitate access to untrusted remote content without adequate disclosure or validation.

Static analysis

No suspicious patterns detected.