Back to skill

Security audit

Hilight Video Generate

Security checks for vulnerabilities and agentic risk

Overview

This skill is for generating and downloading marketing videos, but its download flow asks the agent to run local shell commands on a remote-provided URL without enough guardrails.

Review before installing. The core video-generation workflow is coherent, but only use this skill if you trust the configured MCP service and are comfortable with the agent saving remote video files locally. Safer behavior would require a scoped download tool, strict URL and filename validation, and an explicit confirmation before writing to disk.

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:132
Finding

Shell Command Injection Through Unvalidated Task IDs and Download URLs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 132-141
Vulnerability Type: Shell command injection and unsafe external resource handling
Risk Level: High

Vulnerable Code

markdown
1. Obtain the download URL through MCP
2. Use `exec curl` to download it locally

```bash
exec curl -L -o ~/Downloads/video_task_abc123.mp4 "VIDEO_DOWNLOAD_URL"
  1. Confirm the file size
bash
exec ls -lh ~/Downloads/video_task_abc123.mp4
text

### Technical Analysis

The documented workflow instructs the Agent to build and execute shell commands using a task identifier supplied by the user and a download URL returned by the MCP server. It does not require either value to be validated before interpolation.

The destination path is not quoted. If an Agent replaces the example task identifier with user-controlled text, shell metacharacters such as command separators, redirection operators, or command substitutions can alter the command. Quoting the URL does not provide a reliable security boundary when the Agent constructs the complete command text before passing it to a shell. A malicious MCP response could insert shell syntax into the generated command or direct `curl` to an unintended resource.

The command also uses `curl -L`, which automatically follows redirects without requiring validation of the final destination. There is no HTTPS requirement, hostname allowlist, protocol restriction, content-type validation, maximum file-size limit, or safe handling of a filename beginning with an option-like prefix.

### Attack Path

1. An attacker supplies a crafted task ID containing shell metacharacters, or compromises/spoofs the local MCP service and returns a malicious download URL.
2. The Agent follows the Skill instructions and substitutes the attacker-controlled value into the documented `exec curl` or `exec ls` command.
3. The resulting command string is passed to a shell.
4. The shell interprets 
...[truncated 1096 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace shell-based downloading with a structured HTTP client or download tool that accepts the URL and destination as separate arguments without invoking a command shell.
  2. Validate task IDs against a strict allowlist, such as ^[A-Za-z0-9_-]{1,128}$, before using them in filenames.
  3. Generate the local filename independently rather than deriving it directly from untrusted input.
  4. If process execution is unavoidable, use an argument-array API with shell interpretation disabled. Do not build a single command string.
  5. Require HTTPS and allowlist the expected video-content hostnames.
  6. Validate every redirect target and reject redirects to non-allowlisted hosts, loopback addresses, link-local addresses, private network ranges, and unsupported protocols.
  7. Apply download size, timeout, and content-type limits before saving the response.
  8. Save files into a dedicated directory using restrictive permissions and a securely generated filename. Prevent overwriting existing files unless the user explicitly approves it.
  9. Verify file metadata through filesystem APIs rather than invoking ls.
  10. If curl must be retained, invoke it without a shell, include an explicit -- option terminator where applicable, restrict protocols, and validate the URL before execution.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

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 · clawhub.json (reported line 14)May include surrounding context.

json
"label": "视频生成平台 API Key(Bearer Token)",
        "hint": "从平台控制台获取,例如 sk-xxxxxxxx",
        "secret": true,
        "writeEnvFile": ".env"
      }
    ]
  }

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language description, triggers, and output templates are written entirely in Chinese and present the workflow as if responses will occur in Chinese by default. There is no indication that the user can choose another language or that the Chinese-only behavior is required for a justified regional context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are broad enough to match many common video-related requests, increasing the chance that the skill activates when the user did not specifically intend to use this remote video-generation and local-download workflow. In context, unintended activation matters because the skill can create remote tasks and later write files locally, so over-triggering expands the opportunity for unwanted side effects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation claims download is supported via MCP tools, but the actual workflow bypasses that trust boundary and performs the download with local shell commands instead. This mismatch is dangerous because it misleads reviewers and users about the skill's true capabilities, hiding a broader local-execution surface than the advertised MCP-only design.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill expands from MCP-mediated video generation into direct local shell execution by instructing use of exec curl and exec ls. This is dangerous because the download URL originates from a remote service and is then acted on locally, creating an unnecessary command-execution and local file-write path that could be abused or normalized for broader unsafe shell use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs downloading a remote file directly into ~/Downloads without an explicit warning or consent flow for local file writes. This is dangerous because it can surprise users with persistent local changes and, when combined with remote-controlled URLs, creates risk around unwanted files, misleading filenames, or unsafe content being placed on the system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup label and hint are written only in Chinese, which imposes a specific language choice on users without offering an alternative or opt-in. The policy specifically calls for flagging language or locale constraints when the skill does not provide user choice or clearly justify the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description is written entirely in Chinese and gives no indication that the skill supports user language choice or locale opt-in. Under the policy rule, forcing a specific language without offering a choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.