Back to skill

Security audit

manim expert

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for making Manim animations, but it tells the agent to automatically run newly generated Python/Manim code without a clear approval or sandbox step.

Review this skill before installing if your agent is allowed to run local commands. Use it only in a dedicated workspace or sandbox without secrets, inspect the full generated Python file, and approve the exact Manim command before rendering. Consider disabling automatic execution or narrowing triggers so the skill only runs when you explicitly ask for Manim code rendering.

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

Automatic Execution of AI-Generated, User-Influenced Python Code

Content
View full analysis

Vulnerability Details

File Location: skill.md, lines 34 and 48–64
Vulnerability Type: Automatic execution of untrusted generated code
Risk Level: High

Vulnerable Code Snippet

text
### Step 2: Generate Manim Code

Based on the prompt obtained in Step 1, generate the corresponding Manim Community Edition code, provide instructions for running it locally, and place all generated code in the `annimations` folder under the workspace directory.

### Step 4: Run the Code

Requirements:
1. After generating the code, enter its directory and execute the Manim command to produce a low-quality MP4 animation.
2. After generating the video, send it to the user so the user can view it.

## Workflow

1. Receive user input: Wait for the user to provide a simple description of the Manim animation.
2. Generate a detailed prompt: Create a comprehensive animation description according to Step 1.
3. Generate code: Write complete Manim Community Edition code based on the prompt.
4. Provide execution instructions: Explain how to run the code locally.
5. Check the code: Check the generated code for syntax and logic errors.
6. Run the code: Enter the directory containing the generated code and run it to produce a low-quality MP4 video.
7. Return the video: Send the generated video to the user.

Technical Analysis

The skill directs the agent to translate user-controlled animation requirements into Python source code and then execute that code through Manim. Manim scene files are ordinary Python modules; importing or rendering them can execute arbitrary top-level statements, imported modules, subprocess operations, filesystem access, and network operations.

The documented validation step only mentions LaTeX formatting, undefined variables, and general syntax issues. It does not require a security review of imports or dangerous APIs, prohibit shell and subprocess execution, constrain filesystem or network access, require human approval, or mandate sandbo ...[truncated 1845 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic execution from the default workflow. Generate the source and display it for review without rendering it automatically.
  2. Require explicit user or operator approval after showing the complete generated file and the exact Manim command.
  3. Perform security-focused validation before execution:
    • Allow only expected Manim and standard mathematical imports.
    • Reject dynamic execution mechanisms such as eval, exec, and dynamic imports.
    • Reject process-launching APIs such as subprocess, os.system, and equivalent calls.
    • Reject network, credential, environment-variable, and unrestricted filesystem access.
    • Reject top-level behavior unrelated to defining approved Manim scenes.
  4. Execute approved scenes in an isolated container or sandbox using an unprivileged dedicated account.
  5. Mount source inputs read-only and expose only a dedicated writable output directory.
  6. Remove secrets and host credentials from the execution environment.
  7. Disable outbound network access unless it is explicitly required and narrowly allowlisted.
  8. Apply strict CPU, memory, process, file-size, storage, and execution-time limits.
  9. Invoke Manim with a fixed executable and validated argument array rather than constructing a shell command from user-controlled values.
  10. Preserve execution logs and generated-source hashes to support review and incident investigation.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose describes a higher-level generation tool that takes simple Manim animation descriptions, expands them into detailed LaTeX prompts, and outputs runnable Manim CE code. The actual code chunk contains only a hardcoded example scene showing "Hello Manim!" with basic animation effects. There is no input handling, no LaTeX processing, no prompt generation, and no evidence of transforming descriptions into code. This is a material mismatch in primary purpose and supported capabilities, not just an incomplete implementation detail.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README states that the skill 'will automatically trigger' whenever creating a Manim animation is needed, but it does not define narrow, explicit activation boundaries. Overly broad triggers can cause the skill to activate in unintended contexts, leading the agent to generate or transform code when the user did not clearly request this workflow, which increases the chance of prompt injection, scope creep, or unsafe code-generation behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest’s natural-language description and trigger phrases are entirely in Chinese, which implies the skill is intended to operate only for Chinese-language inputs. The file does not offer any language choice or explain a justified region-specific constraint, so this creates a language/locale policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to match many ordinary educational or documentation requests, which can cause the skill to activate outside a narrowly intended scope. Over-broad activation increases the chance that users are funneled into code-generation and local execution flows they did not explicitly request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs generating code, entering a directory, running Manim commands, creating files, and returning a produced video, but provides no user-facing warning or consent step for local command execution and file creation. This is dangerous because rendered code may include harmful or unexpected behavior, and automatic execution expands the impact from content generation into system-side actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document title and all instructional content are presented in Chinese, which can constitute a language/locale policy issue when a skill implicitly forces a specific language without offering user choice. No nearby text indicates that the language is optional, user-selected, or justified by a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The inline comment is written in Chinese ('示例:创建一个简单的文本动画') with no indication that the skill supports multiple languages or that Chinese is required for a documented regional context. This creates a natural-language locale policy concern because the file imposes a specific language choice without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that the language choice is optional or justified by a region-specific purpose. That can violate language/locale policy when users are not given an opt-in or alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file contains user-facing natural-language strings entirely in Chinese, including the docstring and all printed interaction examples. Because the file does not indicate that the skill is region-specific or provide any user opt-in for language preference, it may violate a language/locale policy requiring choice or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description and instructions are written entirely in Chinese and direct the assistant to respond with “好的” and continue the workflow in that language, without indicating that other languages are supported. This creates a language/locale constraint without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.