Back to skill

Security audit

ClawCut

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its video-generation purpose, but it exposes an unauthenticated paid cloud-generation UI on all network interfaces and under-discloses the cost and privacy impact.

Review before installing. Only run this on a locked-down local machine or behind authentication, change the Gradio bind address to localhost, add quotas and upload limits, use a least-privilege Google Cloud service account with budget controls, and avoid sensitive media unless you are comfortable sending it to Vertex AI. Pin and verify dependencies before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/app.py:107
Finding
Unauthenticated Paid Generation Service Exposed on All Network Interfaces## Vulnerability Details **File Location**: `scripts/app.py:107-108` **Vulnerability Type**: Unauthenticated network exposure and unrestricted resource consumption **Risk Level**: High **Vulnerable Code**: ```python if __name__ == "__main__": app = build_ui() app.launch(server_name="0.0.0.0", server_port=7860) ``` ## Technical Analysis The Gradio application listens on `0.0.0.0`, making it accessible through every available network interface. No authentication, authorization, rate limiting, request quota, or application-level concurrency restriction is configured. This exposure is especially significant because the application operates using the server's Google Cloud credentials and provides actions that invoke paid Vertex AI models. A single request can initiate script generation, image generation, and nine concurrent video-generation operations. The public binding also conflicts with the documentation in `SKILL.md`, which describes the interface as being available at `http://localhost:7860`. Reference media is also loaded entirely into memory before submission to Vertex AI. For example: ```python with open(reference_video_path, "rb") as f: video_bytes = f.read() ``` Consequently, unrestricted uploads can consume server memory in addition to paid cloud-model quota. ### Attack Path 1. The operator starts the application on a host reachable by other systems. 2. Gradio binds to all interfaces on TCP port 7860. 3. An unauthenticated attacker discovers or directly accesses that port. 4. The attacker submits topics, images, or reference videos through the exposed interface. 5. Each accepted request invokes `generate_video_pipeline()`. 6. The pipeline uses the server's service-account identity to call paid Vertex AI models and starts up to nine concurrent Veo operations. 7. The attacker repeats requests or uploads large media files, consuming cloud quota, processing capacity, memory, storage, an ...[truncated 926 chars]
Remediation
## Remediation Suggestions 1. Bind to the loopback interface by default: ```python app.launch(server_name="127.0.0.1", server_port=7860) ``` 2. If remote access is required, place the application behind an authenticated HTTPS reverse proxy or enable a supported Gradio authentication mechanism. 3. Enforce authorization so only approved users can invoke cloud-generation operations. 4. Add per-user and global rate limits, request quotas, and cost controls. 5. Restrict the number of queued and concurrent jobs instead of allowing unbounded requests to each create nine generation tasks. 6. Configure maximum upload sizes and validate media duration, dimensions, MIME type, and decoded format before reading files into memory. 7. Stream or stage large uploads rather than loading complete videos into process memory. 8. Apply Google Cloud budget alerts, quota limits, and a least-privilege service account dedicated to this application. 9. Restrict inbound network access to port 7860 using host and cloud firewalls. 10. Avoid returning detailed internal exception messages to remote users; record details in protected server logs and return sanitized errors.

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:4
Finding
Non-Reproducible Dependency Resolution Through a Third-Party Package Index## Vulnerability Details **File Location**: `scripts/requirements.txt:4`; related installation instruction at `SKILL.md:71` **Vulnerability Type**: Dependency supply-chain exposure **Risk Level**: Medium **Vulnerable Dependency Declaration**: ```text gradio==6.6.0 google-genai==1.63.0 google-auth==2.48.0 python-dotenv>=1.0 Pillow==12.1.1 requests==2.32.5 ``` **Related Installation Instruction**: ```bash pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ## Technical Analysis The `python-dotenv>=1.0` constraint permits pip to install any available future version rather than a specifically reviewed release. This makes installations non-reproducible and allows the effective dependency code to change without any modification to the skill package. The documented installation command additionally replaces the default package index with a third-party mirror. This extends the package supply-chain trust boundary to that mirror. No package hashes or lock file are supplied, so pip cannot cryptographically verify that downloaded distributions match artifacts reviewed by the project maintainers. No currently malicious package was identified in the reviewed requirements. The issue is the unsafe resolution and installation policy, which could allow a compromised mirror, compromised upstream release, or unreviewed future version to introduce executable code. ### Attack Path 1. A user follows the setup instructions in `SKILL.md`. 2. Pip resolves dependencies using the specified third-party index. 3. The broad `python-dotenv>=1.0` requirement allows selection of a future version that was not reviewed with this project. 4. If the mirror or an allowed future release is compromised, pip downloads the attacker-controlled distribution. 5. Package build or installation hooks may execute during installation, and malicious package code may execute again when imported at runtime. 6. That code runs ...[truncated 777 chars]
Remediation
## Remediation Suggestions 1. Pin `python-dotenv` to an exact reviewed version, consistent with the other direct dependencies: ```text python-dotenv==<reviewed-version> ``` 2. Generate and maintain a reviewed lock file containing exact direct and transitive dependency versions. 3. Record SHA-256 hashes for every permitted distribution and install with hash verification: ```bash pip install --require-hashes -r requirements.txt ``` 4. Prefer the official PyPI index unless organizational policy requires a controlled internal mirror. 5. If a mirror is required, use an authenticated, monitored, organization-controlled repository that proxies and caches approved artifacts. 6. Review dependency updates before changing pins, and use automated vulnerability and integrity scanning in CI. 7. Install dependencies inside an isolated virtual environment under an unprivileged account. 8. Prohibit dependency installation as root and separate build-time credentials from runtime Google Cloud credentials.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (23)

Vague Triggers

High
Confidence
95% confidence
Finding
The trigger section is extremely broad, with many generic English and Chinese phrases plus catch-all language covering nearly any automated video request. This can cause unintended activation in contexts where the user did not intend to run a workflow that uploads content, uses paid APIs, or processes local files.

Ae1

High
Category
analysis-evasion
Content
mkdir -p clawcut && cp scripts/*.py scripts/requirements.txt clawcut/
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
```bash
# Create project from skill scripts
mkdir -p clawcut && cp scripts/*.py scripts/requirements.txt clawcut/
cp assets/.env.example clawcut/.env
cd clawcut

# Create venv and install deps
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
# Create project from skill scripts
mkdir -p clawcut && cp scripts/*.py scripts/requirements.txt clawcut/
cp assets/.env.example clawcut/.env
cd clawcut

# Create venv and install deps
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Known Vulnerable Dependency: gradio==6.6.0 — 7 advisory(ies): CVE-2026-28414 (Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+); CVE-2026-10783 (Gradio: Audio cache key ignores metadata when saving numpy audio outputs); CVE-2026-48545 (Gradio contains a cookie injection vulnerability) +4 more

High
Category
Supply Chain
Confidence
98% confidence
Finding
`gradio==6.6.0` is flagged with multiple known advisories, including path traversal and cookie-related issues. Because this skill likely exposes a user-facing web UI for automated video generation, a vulnerable Gradio version is especially concerning since it may be directly reachable by untrusted users and could enable file disclosure, session abuse, or other server-side compromise paths.

Known Vulnerable Dependency: Pillow==12.1.1 — 16 advisory(ies): CVE-2026-55379 (Pillow `BdfFontFile`: `Image.new()` called without `_decompression_bomb_check()`); CVE-2026-55798 (Pillow: WindowsViewer.get_command() OS command injection via unescaped shell pat); CVE-2026-54060 (Pillow: `FontFile.compile()`: `Image.new()` called without `_decompression_bomb_) +13 more

High
Category
Supply Chain
Confidence
97% confidence
Finding
`Pillow==12.1.1` is reported with numerous known advisories, including cases involving decompression bomb protections and command execution on Windows viewer paths. This skill's video/image generation workflow likely processes user-supplied or model-generated images, which increases exposure because image parsing libraries are commonly attacked through crafted media files.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill describes behavior that requires powerful capabilities including environment variable access, file writes, network access, and shell execution, but it does not declare any explicit tool scope or permission boundary. This increases the risk of accidental or overly permissive invocation because reviewers and runtime policy layers cannot clearly constrain what the skill is allowed to do.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The pipeline description specifies "Chinese narration + English visual descriptions" and "native Chinese speech" as fixed behavior, with no indication that the user can choose language or opt in to this locale constraint. This is a language-policy issue because the skill appears to force a specific output language by default.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The usage and setup documentation instruct users to configure cloud credentials and use Vertex AI/video generation services, but it does not clearly warn that prompts, uploaded images, reference videos, and metadata may be transmitted to third-party cloud services. Users may unknowingly expose sensitive media, account data, or incur charges without informed consent.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code passes user-provided topic, image paths, and reference video data into an external generation pipeline, and the same file also includes a Vertex AI connectivity test, making remote processing plausible. There is no explicit user-facing warning in this file that uploaded media or prompts may be transmitted to external AI services.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The system prompt explicitly requires narration output in Chinese, which forces a specific language choice in natural-language behavior. The file does not provide any user opt-in, fallback, or documented justification for this locale constraint.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This prompt requires scene narration to be returned as transcribed Chinese text, again imposing a specific language on output. Because the code offers no language parameter or user choice, it violates the language/locale policy criteria.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# Extract audio
    audio_path = video_path + ".audio.mp3"
    cmd = [FFMPEG_BIN, "-y", "-i", video_path, "-vn", "-acodec", "libmp3lame", "-q:a", "4", audio_path]
    subprocess.run(cmd, capture_output=True, timeout=120, check=True)

    client = _gemini_client()
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The prompt instructs the model to return transcribed Chinese text for each segment, which enforces a specific language regardless of user preference. No opt-in or documented rationale for Chinese-only behavior is present in this file.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"-f", "null", "-"
    ]
    logger.info(f"Detecting silence in {input_path}...")
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
    stderr = result.stderr

    silence_starts = [float(m) for m in re.findall(r"silence_start: ([\d.]+)", stderr)]
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
output_path,
    ]
    logger.info(f"Trimming: {speech_start:.1f}s - {speech_end:.1f}s (of {total_dur:.1f}s)")
    subprocess.run(trim_cmd, capture_output=True, timeout=120, check=True)

    if os.path.exists(output_path) and os.path.getsize(output_path) > 1000:
        return output_path
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"-frames:v", "1", "-q:v", "2",
        output_path,
    ]
    subprocess.run(cmd, capture_output=True, timeout=30, check=True)
    if os.path.exists(output_path) and os.path.getsize(output_path) > 100:
        return output_path
    return ""
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The code constructs a natural-language prompt that requires the narrator to speak in Chinese, creating a fixed locale requirement. Since the function accepts no language option and gives no policy justification, this is a natural-language policy violation.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"-movflags", "+faststart",
        final_output,
    ]
    subprocess.run(concat_cmd, capture_output=True, timeout=300, check=True)

    if os.path.exists(final_output) and os.path.getsize(final_output) > 10000:
        logger.info(f"Pipeline complete! {final_output}")
Confidence
71% confidence
Finding
The concat step writes absolute file paths into an ffmpeg concat manifest without escaping special characters such as single quotes or newlines. If an attacker can influence output_dir or clip paths, they may inject extra concat entries or break parsing, causing unintended file inclusion or processing of attacker-chosen files; in a content-automation skill that handles filesystem paths, that context makes this more plausible than the earlier subprocess findings.

Known Vulnerable Dependency: requests==2.32.5 — 2 advisory(ies): CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func); CVE-2026-25645 (Requests is a HTTP library. Prior to version 2.33.0, the `requests.utils.extract)

Medium
Category
Supply Chain
Confidence
94% confidence
Finding
`requests==2.32.5` is flagged with a known advisory affecting `extract_zipped_paths()`, which can create insecure temporary-file handling conditions. While many applications do not invoke this utility directly, the pinned version is still known-vulnerable, and a media automation pipeline that downloads or processes remote content may increase the chance of unsafe archive-related helper usage somewhere in the code path or future extensions.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The placeholder text says 'Enter your video topic (Chinese or English)...', which implies a language restriction in the natural-language interface. The file does not provide an explicit opt-in, selectable language setting, or justification for limiting user input to those languages.

Unpinned Dependencies

Low
Category
Supply Chain
Content
gradio==6.6.0
google-genai==1.63.0
google-auth==2.48.0
python-dotenv>=1.0
Pillow==12.1.1
requests==2.32.5
Confidence
96% confidence
Finding
The dependency specification `python-dotenv>=1.0` is unpinned, so different environments may install different releases over time, including vulnerable or behaviorally incompatible versions. In a content-generation skill that may be deployed repeatedly or in automation pipelines, this weakens build reproducibility and can silently introduce supply-chain risk.

Unverifiable Dependency: python-dotenv has 2 known advisory(ies) (CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding
Because `python-dotenv` is not version-pinned, the manifest cannot establish whether the installed release includes known vulnerabilities. This is a real dependency hygiene problem: if deployment resolves to an affected version, issues such as unsafe `.env` file handling could lead to arbitrary file overwrite or environment manipulation in setups that use these helper functions.