Back to skill

Security audit

code2animation

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent video-rendering purpose, but its dev server exposes high-impact command execution and file-access risks from unsanitized project IDs.

Review this carefully before installing or running. Use it only on a trusted machine and network, avoid sensitive project text or API keys, and fix projectId validation, shell execution, path confinement, iframe isolation, and remote script loading before exposing the dev server or processing untrusted projects.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
vite.config.ts:82
Finding

Unauthenticated Network-Accessible OS Command Injection

Content
View full analysis
{ console.log('[API] Received request:', req.method, req.url); if (req.method !== 'POST') { console.log('[API] Method not allowed:', req.method); res.statusCode = 405; res.end('Method Not Allowed'); return; } let body = ''; req.on('data', chunk => { body += chunk.toString(); }); req.on('end', async () => { try { console.log('[API] Request body:', body); const { projectId } = JSON.parse(body); if (!projectId) { console.log('[API] Missing projectId'); res.statusCode = 400; res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify({ error: 'projectId is required' })); return; } console.log(`[API] Starting audio generation for project: ${projectId}`); const scriptPath = path.resolve(process.cwd(), 'scripts/generate-audio.ts'); const command = `npx tsx "${scriptPath}" ${projectId}`; try { const { stdout, stderr } = await execAsync(command); if (stderr) { console.error('[API] Script stderr:', stderr); } res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify({ success: true, message: `Audio generation completed for ${projectId}`, output: stdout })); } catch (execError: any) { res.statusCode = 500; res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify({ error: 'Audio generation failed', details: execError.message, stderr: execError.stderr })); } } catch (error: any) { res.statusCode = 500; ...[truncated 2252 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/generate-audio.ts:11
Finding

Project Identifier Path Traversal Enables Out-of-Scope File Access

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/components/DeterministicIframe.tsx:20
Finding

Ineffective Iframe Sandbox Grants Same-Origin Script Privileges

Content
View full analysis
{ if (!iframeRef.current || !iframeRef.current.contentWindow) return; try { // Only inject if same-origin (which it should be in this app) const doc = iframeRef.current.contentWindow.document; const scriptEl = doc.createElement('script'); scriptEl.type = 'module'; scriptEl.src = '/scripts/animation/main.js'; doc.head.appendChild(scriptEl); setIsLoaded(true); if (onLoad) { onLoad(); } } catch (e) { console.warn( '[DeterministicIframe] Failed to inject sync script (possible cross-origin):', e ); setIsLoaded(true); } }; ``` ```tsx return ( ); ``` ### Technical Analysis The iframe grants both `allow-scripts` and `allow-same-origin`. Because footage is served from the application origin, scripts in footage documents retain the same origin as the parent application. This allows footage code to interact with same-origin resources and, subject to normal browser behavior, access or manipulate the parent document. The parent component itself relies on this same-origin access to inject another script into the iframe. The combination therefore does not provide a meaningful security boundary for potentially untrusted or generated project footage. Any project HTML is active application-origin code rather than isolated media. ### Attack Path 1. A malicious or compromised project introduces an HTML footage file containing JavaScript. 2. The application loads that file throu ...[truncated 895 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Warning
Location
public/projects/agentSaasPromoVideo/footage/agentsaas_complex_task.html:8
Finding

Unpinned Remote JavaScript Executes in Preview and Rendering Contexts

Content
View full analysis
``` The shared stylesheet also retrieves external font resources: ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&display=swap'); ``` ### Technical Analysis The Tailwind CDN URL points to remotely hosted JavaScript whose effective contents can change after the project has been reviewed. It is not pinned to an immutable version and has no Subresource Integrity constraint. The script executes in footage iframes during browser previews and Puppeteer rendering. Because those iframes currently use `allow-scripts allow-same-origin`, remotely delivered code receives the same privileges as other footage scripts. The external font import is not executable JavaScript, but it creates additional undeclared runtime network access and reduces deterministic, offline rendering. ### Attack Path 1. A user previews or renders the included AgentSaaS project while network access is available. 2. Each footage page requests JavaScript from `cdn.tailwindcss.com`. 3. The browser executes the response without local review or integrity verification. 4. If the CDN, DNS path, delivery account, or upstream content is compromised, substituted JavaScript executes in the footage context. 5. The substituted code can make network requests, alter output, access same-origin resources, or invoke local application APIs. 6. Puppeteer rendering repeats ...[truncated 523 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (55)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The app sends playback control data to every iframe on the page using postMessage with targetOrigin='*', without restricting recipients by origin. Any embedded third-party or attacker-controlled iframe can receive timing and control signals, enabling unintended cross-window data sharing and coordination with untrusted content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

In record mode, the code exposes seekTo, getTotalDuration, getAudioLog, and getCurrentClipIndex on the global window object, making internal playback and timeline controls callable by any script running in the page context. Because record mode is enabled by a URL parameter, this expands attack surface and can be abused by injected or third-party scripts to manipulate state and extract timeline/audio metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The Vite define section embeds process.env.GEMINI_API_KEY into client-side code at build/dev time, which exposes the secret to any browser user and anyone able to inspect bundled assets or runtime values. API keys should be treated as server-side secrets; once shipped to the client they can be stolen and abused for unauthorized API usage, quota exhaustion, and possible access to associated data or billing.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 82)May include surrounding context.

brew install ffmpeg

Linux

sudo apt-get install ffmpeg

text

### Chromium (if needed)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/README.md (reported line 111)May include surrounding context.

brew install ffmpeg

Linux

sudo apt-get install ffmpeg

text

### Chromium (if needed)

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding

The README instructs users to run npx puppeteer without pinning a specific version, which can fetch and execute whatever package version is current at the time of installation. In a setup/instructions context, this creates a supply-chain risk because a compromised or breaking upstream release could be executed on the user's machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This JSON manifest defines the skill's content and name but provides no invocation phrases, activation boundaries, or exclusion conditions. For manifest files, missing trigger specificity can lead to ambiguous or overly broad skill activation because there is no documented guidance on when the skill should or should not run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends clip.speech content to msedge-tts, which relies on an external network service, without any consent check, warning, or data-classification guard. If project content includes sensitive prompts, personal data, or confidential text, running this script can disclose that content to a third party unexpectedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code forcefully removes the existing frames directory with fs.rmSync(..., { recursive: true, force: true }) before recreating it. Although the script prints later output paths, there is no explicit warning or confirmation at the deletion point, and this is a destructive filesystem action in a code file.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill documentation instructs use of npx tsx scripts/generate-audio.ts <projectId> without pinning an exact package version. npx may fetch and execute the latest tsx package from the registry if it is not already installed locally, which creates a supply-chain risk: a compromised, typosquatted, or newly malicious release could run arbitrary code on the host. In this skill's context, that risk is more meaningful because the skill already performs local file access, process spawning, and network-connected operations, so execution of an unexpected package would occur in a relatively capable environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

With no manifest or stated purpose available, this file implements externally controllable behavior driven by URL parameters, including record mode, project selection, and orientation overrides. That is a materially broader capability than ordinary local playback/render UI logic because it allows outside callers to alter execution mode and content selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The code checks for audio existence and may call generateAudio and loadAudioFiles, which likely transmit project speech content or related data to backend services. While there is error handling and console logging, there is no clear user-facing warning before these operations begin about external audio processing or data transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code posts the clip's speech content to '/api/tts' for audio generation, which is a network operation transmitting user-provided text. While the request is logged for debugging elsewhere, there is no confirmation prompt, user-facing disclosure, or explanatory comment/docstring here indicating that clip text will be sent to a server for synthesis.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The server constructs a shell command using untrusted input: const command = \npx tsx "${scriptPath}" ${projectId}`;and executes it viaexecAsync. Because projectIdcomes directly from the POST body and is not validated or escaped, an attacker can inject shell metacharacters and achieve arbitrary command execution; usingnpx tsx` without a pinned/local binary also adds supply-chain and environment-dependent risk.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 16)May include surrounding context.

json
"render": "npx tsx scripts/render.ts"
  },
  "dependencies": {
    "@google/genai": "^1.29.0",
    "@tailwindcss/vite": "^4.1.14",
    "@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 17)May include surrounding context.

json
},
  "dependencies": {
    "@google/genai": "^1.29.0",
    "@tailwindcss/vite": "^4.1.14",
    "@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",
    "dotenv": "^17.2.3",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 18)May include surrounding context.

json
"dependencies": {
    "@google/genai": "^1.29.0",
    "@tailwindcss/vite": "^4.1.14",
    "@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",
    "dotenv": "^17.2.3",
    "express": "^4.21.2",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 19)May include surrounding context.

json
"@google/genai": "^1.29.0",
    "@tailwindcss/vite": "^4.1.14",
    "@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",
    "dotenv": "^17.2.3",
    "express": "^4.21.2",
    "lucide-react": "^0.576.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 20)May include surrounding context.

json
"@tailwindcss/vite": "^4.1.14",
    "@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",
    "dotenv": "^17.2.3",
    "express": "^4.21.2",
    "lucide-react": "^0.576.0",
    "motion": "^12.23.24",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 21)May include surrounding context.

json
"@vitejs/plugin-react": "^5.0.4",
    "better-sqlite3": "^12.4.1",
    "dotenv": "^17.2.3",
    "express": "^4.21.2",
    "lucide-react": "^0.576.0",
    "motion": "^12.23.24",
    "msedge-tts": "^2.0.4",

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/compress.js:64

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/render.ts:98