Back to skill

Security audit

动画视频制作skill

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real motion-video tool, but it has safety gaps that can let crafted project content write outside the project or run script in generated previews.

Review before installing, especially if you may open movie.json projects from other people. Use trusted project files only, avoid placing secrets in projects or chat, prefer a trusted npm registry, and treat TTS/export commands as local file-writing operations.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/render_preview.js:94
Finding

Executable JavaScript Injection in Generated Preview Documents

Content
View full analysis
const MOVIE = ${JSON.stringify(movie)}; const TIMELINE = ${JSON.stringify(timeline)}; const STAGE_WIDTH = ${PREVIEW_WIDTH}; const STAGE_HEIGHT = ${PREVIEW_HEIGHT}; const DEFAULT_FONT_DISPLAY = ${JSON.stringify(theme.fontDisplay)}; const DEFAULT_FONT_BODY = ${JSON.stringify(theme.fontBody)}; ``` The generated document is subsequently loaded and executed by Playwright: ```javascript writeText(previewPath, buildPreviewHtml(movie, moviePath)); const browser = await chromium.launch({ headless: true }); const page = await browser.newPage({ viewport: { width: 1440, height: 980 }, deviceScaleFactor: 1 }); await page.goto(pathToFileURL(previewPath).href); await page.waitForFunction(() => window.__MOVIE_READY === true); ``` ### Technical Analysis The movie model and timeline are serialized directly into an executable inline `` sequence, which the HTML parser interprets as the end of the enclosing script regardless of its JavaScript string context. For example, a movie text field containing a payload structurally equivalent to: ```html ``` can terminate the intended script and introduce a new executable script element. The movie schema validates field types but does not sanitize this HTML parser boundary. The issue affects both manually opened `preview.html` files and the automated export path in `scripts/export_video.js`, where Playwright navigates to the generated local HTML file and executes its scripts. ### Attack Path 1. An attack ...[truncated 1294 chars]
Remediation
View remediation
` as `\u003e` - `&` as `\u0026` - U+2028 as `\u2028` - U+2029 as `\u2029` 3. Prefer placing the serialized model in a non-executable element: ```html ``` Then parse it with: ```javascript const MOVIE = JSON.parse(document.getElementById("movie-data").textContent); ``` The JSON must still escape `<` to prevent an injected closing `` sequence. 4. Add a restrictive Content Security Policy that blocks unexpected script and network execution. Where practical, move preview logic into a fixed external script and avoid `unsafe-inline`. 5. Add regression tests using fields containing ``, HTML tags, quotes, U+2028, and U+2029. 6. Treat all movie content as untrusted even when generated through an Agent workflow. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/synthesize_voice.js:108
Finding

Project Escape and Arbitrary File Overwrite Through Audio Track Paths

Content
View full analysis
{ const nextFile = replaceTrackExtension(track.file, extension); const absoluteFile = path.join(projectDir, nextFile); ensureDir(path.dirname(absoluteFile)); if (process.platform === "darwin") { synthesizeWithMacSay(track, absoluteFile, sayRate, sayVoice); } else if (process.platform === "win32") { synthesizeWithWindowsSpeech(track, absoluteFile, movie.audio.speed, sayVoice); } else { throw new Error(`System TTS fallback is currently supported on macOS and Windows only. Current platform: ${process.platform}`); } ``` MiniMax output path: ```javascript const absoluteFile = path.join(projectDir, track.file.replace(/\.(aiff|wav|mp3)$/i, `.${format}`)); ensureDir(path.dirname(absoluteFile)); fs.writeFileSync(absoluteFile, Buffer.from(hexAudio, "hex")); nextTracks.push({ ...track, file: path.relative(projectDir, absoluteFile), status: "ready" }); ``` The corresponding validation only verifies that the path is a non-empty string: ```javascript if (typeof track.file !== "string" || !track.file) { errors.push(`audio.tracks[${index}].file must be a non-empty string`); } ``` ### Technical Analysis `audio.tracks[].file` is read from `movie.json` and combined with `projectDir` without checking whether the normalized result remains inside the project or its designated audio directory. A value containing traversal components, such as `../../target.mp3`, causes `path.join()` to construct a path outside the project. An absolute path may also override the intended base-path behavior depending on platform and path form. The code then creates parent directories and writes synthesized a ...[truncated 1738 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package-lock.json:16
Finding

Dependency Lockfile Uses a Non-Default Third-Party Registry Mirror

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/synthesize_voice.js:48
Finding

Windows TTS Leaves Sensitive Narration in Persistent Temporary Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (64)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises text/Markdown-to-video generation, web preview, and export controls, while the actual capability appears to include JSON/project validation instead. Even if validation itself is benign, a materially inaccurate description is a security concern because it prevents correct risk assessment of what the skill truly does and does not do.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

md
- `scripts/export_video.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

md
- `scripts/export_video.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 98)May include surrounding context.

md
- `scripts/build_project.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 147)May include surrounding context.

md
- `scripts/build_project.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 148)May include surrounding context.

md
- `scripts/build_project.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
- `scripts/configure_tts.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 140)May include surrounding context.

md
- `scripts/configure_tts.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 106)May include surrounding context.

md
- `scripts/synthesize_voice.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 143)May include surrounding context.

md
- `scripts/synthesize_voice.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 141)May include surrounding context.

md
node scripts/list_tts_voices.js minimax

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/secrets.js (reported line 6)May include surrounding context.

js
const path = require("path");

const SECRETS_DIR = path.join(os.homedir(), ".codex", "motion-video-skill");
const SECRETS_PATH = path.join(SECRETS_DIR, "secrets.json");

function ensureSecretsDir() {
  fs.mkdirSync(SECRETS_DIR, { recursive: true });

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares executable setup and usage that involve network access and environment-dependent behavior (e.g. npm install, Playwright browser download, cloud TTS/API-key use), but it does not define any explicit tool scope or permission boundaries. This is dangerous because consumers cannot tell up front that the skill may access the network, read environment variables, or invoke local binaries, which increases the chance of over-broad execution in a privileged agent environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The primary skill description is written entirely in Chinese and does not indicate that the user may choose another language or locale. Under the stated policy, language constraints should be opt-in or clearly justified as region-specific; neither is documented here.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding

The install instructions invoke 'npx playwright' without pinning a specific version. Unpinned transient package execution creates a supply-chain risk because different versions may be fetched over time, including compromised or breaking releases, and then executed locally.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/synthesize_voice.js:44