Back to skill

Security audit

Edu Video Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent educational-video generator, but it includes unsafe code patterns and setup commands that users should review before installing.

Review this skill before installing. Use it only in an isolated project environment, pin dependency versions and lockfiles, remove disableWebSecurity unless you have a narrow documented need, replace new Function with a strict arithmetic parser, sanitize any SVG before rendering it, and avoid broad kill/network troubleshooting commands unless you have verified the exact target.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:1417
Finding
Arbitrary JavaScript Evaluation Through Content Expressions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1417-1440` **Vulnerability Type**: Dynamic code evaluation of content-controlled expressions **Risk Level**: High ### Vulnerable Code ```tsx function resolveValue(value, vars) { if (typeof value === 'string' && value.startsWith('$')) { return vars[value.slice(1)]; } if (typeof value === 'string' && value.includes('$')) { // 处理表达式如 "π*$R" // 安全替换:先替换变量,再替换数学常量 let expr = value .replace(/\$(\w+)/g, (_, name) => { const val = vars[name]; if (val === undefined) { console.warn(`⚠️ 未知变量: $${name}`); return 0; } return val; }) .replace(/π/g, 'Math.PI'); // 使用 Function 构造函数(比 eval 稍安全) try { const fn = new Function('return ' + expr); return fn(); } catch (e) { console.warn(`⚠️ 表达式解析失败: ${expr}`); return 0; } } return value; } ``` ### Technical Analysis The documented implementation builds JavaScript source code from values originating in `content.json` and evaluates it with the `Function` constructor. Variable substitution does not constrain the rest of the expression to arithmetic syntax. Any JavaScript syntax surrounding a `$variable` reference remains intact and is compiled. The `Function` constructor is not a safe alternative to `eval`; both provide dynamic code execution. The documentation incorrectly labels this implementation as safe, making it likely that generated projects will adopt the vulnerable pattern. The code executes in the Remotion Chromium rendering context. It does not, by itself, demonstrate direct operating-system shell execution, but it can execute arbitrary browser-context JavaScript with the capabilities available to rendered project code. ### Attack Path 1. An attacker supplies or modifies a project’s `scripts/content.json`, such as through a shared video template or imported content package. 2. The attacker places a JavaScript expre ...[truncated 1074 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove all use of `eval`, `new Function`, and equivalent dynamic JavaScript compilation. - Implement a strict arithmetic parser that accepts only: - Numeric literals. - Explicitly declared variable names. - Parentheses. - Approved arithmetic operators such as `+`, `-`, `*`, `/`, and exponentiation if required. - Explicit constants such as `PI`. - Tokenize the input and reject unknown identifiers, property access, brackets, quotes, semicolons, assignments, function calls, and other JavaScript syntax. - Prefer a small, well-maintained expression parser configured with an explicit allowlist. - Validate `content.json` against a schema before rendering. - Treat content and templates received from other users as untrusted. - Add negative tests proving that expressions containing function calls, global-object access, assignments, or statement separators are rejected. - Correct the documentation so that dynamic JavaScript evaluation is never described as safe. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/render.mjs:54
Finding
Chromium Web Security Disabled During Video Rendering<![CDATA[ ## Vulnerability Details **File Location**: `scripts/render.mjs:54-56` **Vulnerability Type**: Unsafe browser security configuration **Risk Level**: Medium ### Vulnerable Code ```js chromiumOptions: { disableWebSecurity: true, }, ``` ### Technical Analysis The renderer explicitly launches Chromium with web security disabled. This weakens browser-enforced origin protections during video rendering. The project does not document a narrowly scoped requirement that justifies disabling this protection. This configuration is especially risky when a composition loads untrusted content, remote media, third-party components, or dynamically evaluated expressions. It increases the consequences of browser-context code execution by weakening cross-origin restrictions that would otherwise limit access. ### Attack Path 1. A user previews or renders a composition using `scripts/render.mjs`. 2. Remotion launches its Chromium rendering environment with web security disabled. 3. Malicious or compromised composition code executes during rendering. 4. That code performs cross-origin operations under weakened browser restrictions. 5. It may access or interact with resources reachable from the rendering environment that would normally be protected by origin controls. This path may be combined with the `new Function` content-expression vulnerability or with a compromised third-party dependency. ### Impact Assessment The vulnerable configuration may permit untrusted browser-context code to: - Make cross-origin requests under weakened browser controls. - Interact with reachable local or remote web services more freely. - Read or manipulate cross-origin resources where other controls allow it. - Increase the exposure of project data and rendering inputs. - Expand the impact of malicious React components or remote assets. The setting does not independently grant operating-system privileges, but it unnecessarily weakens a major browser security boundary. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Remove `disableWebSecurity: true` and use Chromium’s default security configuration. - If remote assets require cross-origin access, configure correct CORS headers on the asset server. - Alternatively, download approved assets before rendering and serve them from the local Remotion bundle. - Allowlist trusted asset origins and reject unexpected external URLs in project content. - Block access from rendered content to loopback, private-network, and cloud-metadata addresses where practical. - Add a regression test confirming that rendering succeeds without disabling browser security. - Document any future Chromium security exception with a precise threat analysis and the narrowest possible scope. ]]>

T08 · Insecure Dependencies

Warning
Location
references/setup.md:6
Finding
Mutable and Unpinned Third-Party Dependencies Are Executed During Setup<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md:6`, `references/setup.md:35-43`, `SKILL.md:341`, `SKILL.md:1835`, `references/troubleshooting.md:170` **Vulnerability Type**: Unsafe dependency acquisition and mutable package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx create-video@latest my-video --template=blank ``` The documented dependency configuration also uses broad version ranges: ```json "dependencies": { "@remotion/bundler": "^4.0.0", "@remotion/cli": "^4.0.0", "@remotion/player": "^4.0.0", "@remotion/renderer": "^4.0.0", "react": "^18.0.0", "react-dom": "^18.0.0", "remotion": "^4.0.0", "typescript": "^5.0.0" } ``` Additional mutable installation commands include: ```bash pnpm install pnpm add mathjax-full npm install remotion @remotion/cli @remotion/player react react-dom ``` ### Technical Analysis `npx create-video@latest` downloads and executes the package version currently identified by the mutable `latest` registry tag. Its effective code can change after the Skill has been reviewed. Package-manager installation can also execute lifecycle scripts using the invoking user’s privileges. The other commands either omit versions or rely on broad caret ranges. Without an enforced lockfile and integrity verification, two users following the same instructions at different times may install materially different code. No evidence was found that the named dependencies are currently malicious. The vulnerability is the unsafe and non-reproducible dependency acquisition process, which exposes users to compromised releases, registry-account takeover, malicious lifecycle scripts, and unexpected breaking changes. ### Attack Path 1. An upstream package release, maintainer account, distribution tag, or transitive dependency is compromised. 2. The malicious release becomes the version selected by `@latest`, an omitted version, or a broad semver range. 3. A user follows the Skill’s setup or tro ...[truncated 942 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `npx create-video@latest` with an exact, reviewed package version. - Pin all direct dependencies to exact versions rather than broad caret ranges. - Commit a package-manager lockfile and require immutable installation: - `npm ci` - `pnpm install --frozen-lockfile` - Verify registry integrity metadata and review lockfile changes before upgrades. - Upgrade dependencies through a controlled review process rather than resolving mutable versions during setup. - Consider disabling lifecycle scripts during initial inspection with `--ignore-scripts`, then explicitly permit only required, reviewed scripts. - Document the expected registry and prevent dependency-name substitution through untrusted registries. - Use automated vulnerability scanning and provenance checks for direct and transitive dependencies. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Ae1

High
Category
analysis-evasion
Content
- [ ] 复制布局组件库 `components/layouts.js` 到 `src/components/`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- [ ] 复制布局组件库 `components/layouts.js` 到 `src/components/`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- [ ] 复制布局组件库 `components/layouts.js` 到 `src/components/`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> - 使用 `config.js` 统一参数管理
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Unvalidated Output Injection

High
Category
Output Handling
Content
opacity: Math.min(1, frame / 10),
      transform: `scale(${0.85 + progress * 0.15})`,
    }}
    dangerouslySetInnerHTML={{ __html: svg }}
  />
);
Confidence
96% confidence
Finding
The example injects SVG/HTML content directly with `dangerouslySetInnerHTML={{ __html: svg }}` after loading formula output from JSON. If an attacker can influence the SVG payload—via formula source, a compromised rendering step, or tampered JSON—they may inject active HTML/SVG constructs, leading to XSS-like script execution in preview UIs or unsafe renderer behavior depending on the environment.

Unvalidated Output Injection

High
Category
Output Handling
Content
}
   );
   
   <div dangerouslySetInnerHTML={{ __html: scaledSvg }} />
   ```

### 支持的 LaTeX 语法
Confidence
95% confidence
Finding
This second example again inserts raw SVG markup via `dangerouslySetInnerHTML`, here after string manipulation of width/height attributes. The transformation does not sanitize the payload, so any malicious markup already present in `scaledSvg` is preserved and rendered, creating the same injection risk in environments that display or process the resulting DOM.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown file contains core instructional content in Chinese, beginning with the main principles section, while the skill description does not state that the skill is region-specific or limited to Chinese-speaking users. Under the language/locale policy, forcing a specific language without user opt-in or justification is a natural-language policy violation.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The documentation explicitly presents a `resolveValue` design that builds an expression string from content values and executes it with `new Function('return ' + expr)`. If `content.json` or other upstream content is attacker-controlled, this becomes arbitrary code execution in the Node.js generation pipeline, and the skill context makes it more dangerous because it encourages automated processing of user-authored video/script content.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This file contains user-visible strings such as "圆的面积" and "圆的面积公式" and sets the font family to "Noto Sans CJK SC", which together force a specific language/locale experience. The policy requires flagging language or locale constraints when they are imposed without user opt-in or documented justification.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This file contains natural-language descriptions in Chinese and repeatedly hard-codes the Chinese-specific font family "Noto Serif CJK SC" across components. Under the policy, forcing a specific language/locale without opt-in can be a violation when no alternative or justification is provided.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This markdown file contains user-facing instructions exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The documentation instructs users to execute `npx create-video@latest`, which pulls and runs remote code at install time and always tracks the newest release rather than a reviewed, fixed version. If the upstream package or its dependency chain is compromised, users following the setup guide could execute attacker-controlled code on their machines.

Rp1

Medium
Category
MCP Rug Pull
Confidence
71% confidence
Finding
The guide suggests `npx remotion studio src/index.ts`, which executes a package via `npx` without pinning an explicit version in the command. Although this is somewhat mitigated if the project already has local dependencies installed, unpinned `npx` usage can still resolve unexpected versions or fetch code from the registry in some environments.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that the skill is region-specific or that users may opt into this locale. Per the policy, forcing a specific language without user choice can be a natural-language policy violation.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill is described as generating educational videos with Remotion/React templates, but this file also provides operational shell commands to kill processes, modify IPv6 loopback configuration, and change executable permissions. Those host-administration capabilities are not justified by the stated purpose of a video-generation skill and extend beyond normal templating guidance.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The troubleshooting guide recommends `pkill -f chrome-headless`, which can terminate processes based on a broad pattern match without warning the user to verify targets first. In operational environments this may kill unrelated browser/rendering jobs, disrupt other users or tasks, and cause loss of unsaved work.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The document advises `kill -9 <PID>` as the default remediation after finding a listening process, but SIGKILL forcefully terminates a process without cleanup and no warning is provided about impact or safer alternatives. This can corrupt temporary state, interrupt legitimate services, and create avoidable data loss or service disruption if the wrong PID is chosen.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The script renders Remotion content with Chromium launched using `disableWebSecurity: true`, which disables important browser protections such as same-origin restrictions. If any composition, asset URL, or embedded page content is influenced by untrusted input, this can enable cross-origin data access or unintended network interactions during rendering. In a video-generation skill, this capability is not clearly necessary and increases risk without a strong justification.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This JavaScript file contains user-facing documentation and console messages entirely in Chinese, such as the usage instructions and error output. The file does not offer an alternative language or indicate that the skill is intentionally limited to a Chinese-speaking or region-specific context, which creates a language-policy concern.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
This JavaScript file contains natural-language instructions and runtime console messages entirely in Chinese, including the usage guide and error/output text. Under the language/locale policy, forcing a specific language without opt-in or documented regional justification is a policy concern.

Natural-Language Policy Violations

Low
Confidence
98% confidence
Finding
This troubleshooting guide forces a specific language for all users and does not indicate that the skill is region-specific or provide an alternative language option. That is a natural-language locale policy concern under the rule for language/locale constraints without user opt-in.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The file contains user-facing natural-language comments entirely in Chinese, such as the configuration guidance and browser/port notes. This imposes a specific language on maintainers or users of the skill without any opt-in or documented locale constraint, which matches the language/locale policy violation criteria.

Static analysis

No suspicious patterns detected.