Back to skill

Security audit

Remotion Best Practices

Security checks for vulnerabilities and agentic risk

Overview

This is mostly Remotion guidance, but it tells the agent to ask for a raw ElevenLabs API key and includes many unpinned package commands, so it should be reviewed before installation.

Before installing, confirm you are comfortable with a Remotion helper that may suggest dependency installs and external media/API integrations. Do not paste ElevenLabs or other API keys into chat; configure them locally as environment variables or secrets and only confirm that they are set. Prefer pinned package versions or a project-local locked CLI when running the suggested npx/bunx commands.

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

Warning
Location
rules/voiceover.md:14
Finding
Skill Instructs the Agent to Request a Raw API Credential## Vulnerability Details **File Location**: `rules/voiceover.md:14-18` **Vulnerability Type**: Sensitive credential solicitation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown By default this guide uses **ElevenLabs** as the TTS provider (`ELEVENLABS_API_KEY` environment variable). Users may substitute any TTS service that can produce an audio file. If the user has not specified a TTS provider, recommend ElevenLabs and ask for their API key. Ensure the environment variable is available when running the generation script: ``` ### Technical Analysis The Skill explicitly instructs the agent to ask the user for an ElevenLabs API key. A raw API credential should not be entered into an agent conversation because conversation content may be stored in chat history, observability systems, application logs, or retained context. Soliciting the credential through chat is not required for the declared voiceover functionality. The generation code already obtains the credential from `process.env.ELEVENLABS_API_KEY`, so the agent only needs to instruct the user to configure the environment variable locally. The credential is legitimately transmitted to the declared ElevenLabs endpoint by the example at `rules/voiceover.md:31-37`; the issue is the preceding instruction to disclose it to the agent. ### Attack Path 1. A user requests AI-generated voiceover assistance. 2. The agent loads `rules/voiceover.md`. 3. Following the Skill instruction, the agent asks the user to provide an ElevenLabs API key. 4. The user pastes the raw credential into the conversation. 5. The credential becomes available to any chat-history, logging, tracing, retention, or support system that records the conversation. 6. A party with unauthorized access to those records could reuse the key against the ElevenLabs API until it is revoked or expires. ### Impact Assessment Exposure may permit unauthorized use of the affected ElevenLabs accoun ...[truncated 444 chars]
Remediation
## Remediation Suggestions 1. Replace the instruction to “ask for their API key” with an instruction never to request, display, or store the raw key in conversation. 2. Direct users to configure `ELEVENLABS_API_KEY` locally through an environment file excluded from version control, a CI/CD secret store, or an operating-system secret manager. 3. Ask only for confirmation that the environment variable is configured, not for its value. 4. Add explicit guidance not to commit `.env` files and to redact credentials from logs and error output. 5. Validate that the variable exists before making the request, without printing it: ```ts const apiKey = process.env.ELEVENLABS_API_KEY; if (!apiKey) { throw new Error( "ELEVENLABS_API_KEY is not configured. Set it locally without sharing its value.", ); } ``` 6. Use a restricted key with the minimum provider permissions and spending limits required for text-to-speech. 7. If a key has already been shared through chat, revoke and rotate it, then review provider usage records for unauthorized activity.
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (39)

Credential Access

High
Category
Privilege Escalation
Content
pnpm i mapbox-gl @turf/turf @types/mapbox-gl
```

The user needs to create a free Mapbox account and create an access token by visiting https://console.mapbox.com/account/access-tokens/.

The mapbox token needs to be added to the `.env` file:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
The mapbox token needs to be added to the `.env` file:

```txt title=".env"
REMOTION_MAPBOX_TOKEN==pk.your-mapbox-access-token
```
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Hidden Instructions

High
Category
Prompt Injection
Content
center: [6.5615, 46.0598],
      pitch: 65,
      bearing: 0,
      style: "⁠mapbox://styles/mapbox/standard",
      interactive: false,
      fadeDuration: 0,
    });
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The activation guidance is overly broad: 'Use this skills whenever you are dealing with Remotion code' can trigger the skill in many loosely related contexts rather than only when its specialized guidance is needed. This is not directly malicious, but broad invocation increases the chance the agent loads unnecessary rule files or applies domain-specific instructions inappropriately, which can lead to prompt-scope confusion or reduced reliability.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The documentation instructs users to run `npx remotion add @remotion/media-utils` without pinning the `remotion` package version. `npx` will fetch the latest CLI at execution time, which creates a supply-chain risk: a compromised or malicious upstream release could execute arbitrary code on the user's machine during installation or scaffolding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The documentation instructs users to run `npx remotion add @remotion/media` without pinning a specific Remotion version. This can cause users to execute whatever package version is current at install time, which weakens supply-chain integrity and could expose them to malicious or compromised upstream releases.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The documentation instructs users to run `npx remotion add @remotion/paths` without pinning a specific version of the CLI or package. Because `npx` fetches the latest published package at execution time, users may unknowingly execute changed or compromised code, creating a supply-chain risk. In a best-practices skill, this is more dangerous because the command is presented as trusted setup guidance likely to be copied verbatim.

External Transmission

Medium
Category
Data Exfiltration
Content
const calculateMetadata: CalculateMetadataFunction<
  MyCompositionProps
> = async ({ props, abortSignal }) => {
  const data = await fetch(`https://api.example.com/video/${props.videoId}`, {
    signal: abortSignal,
  }).then((res) => res.json());
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The documentation instructs users to run `npx remotion add @remotion/captions` without pinning a specific package version. This can cause different code to be fetched and executed over time, including a compromised or malicious latest release, which is a supply-chain risk because `npx` may download and run package code immediately.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The documentation instructs users to run `npx remotion add @remotion/google-fonts` without pinning a specific package version. This can lead to non-reproducible installs and exposure to a compromised or unexpected latest package version or transitive dependency at execution time, especially because `npx` fetches packages dynamically.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This command again uses `npx remotion add @remotion/fonts` without a pinned version, which means users may execute whatever version is current at the time of invocation. In supply-chain threat scenarios, an attacker who compromises the package or a dependency could cause arbitrary code execution during install or produce inconsistent environments.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
Control what happens when the animation finishes:

```tsx
// Loop indefinitely (default)
<AnimatedImage src={staticFile("animation.gif")} width={500} height={500} loopBehavior="loop" />

// Play once, show final frame
Confidence
75% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
This is a duplicate instance of the same unpinned `npx remotion` reference on line 10. Unpinned `npx` usage can result in downloading and executing unintended code from the package registry, which is a real supply-chain risk even when the author likely intended only normal developer convenience.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The prerequisite command `npx remotion add @remotion/light-leaks` invokes an unpinned CLI, which may execute whatever version is currently resolved from the registry. Because this is a copy-pasteable installation command in documentation, the skill context increases practical risk: users are likely to run it directly while setting up dependencies.

Static analysis

No suspicious patterns detected.