T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:148
- Finding
- Unpinned Third-Party Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 148 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npx remotion render src/index.tsx ppt-video out/video.mp4 --overwrite --concurrency=1 ``` ### Technical Analysis The skill directs the agent to execute `remotion` through `npx` without specifying an exact reviewed version. The project contains no package manifest or lockfile that constrains dependency resolution and no documented integrity or provenance verification. If a trusted local installation is unavailable, `npx` may download and execute a package obtained from the configured package registry. The effective code can therefore change after the skill has been reviewed. This creates a supply-chain risk because an unexpectedly changed or compromised package release could execute code with the permissions of the user running the skill. The command is not evidence that the skill is intentionally malicious. The issue is the unsafe and mutable dependency-resolution mechanism documented by the skill. ### Attack Path 1. A user asks the agent to convert a PowerPoint presentation into a video. 2. The agent follows the rendering instructions in `SKILL.md`. 3. The environment does not contain a trusted, locally pinned `remotion` executable. 4. `npx` resolves the package through the configured external package registry. 5. A compromised, replaced, or otherwise unreviewed package version is downloaded and executed. 6. Package installation hooks or runtime code execute with the privileges of the agent process. 7. The dependency may read or modify accessible project files, tamper with generated media, access credentials available to the process, or initiate network connections. Successful exploitation depends on control or compromise of the resolved package, registry, registry configuration, or dependency-resolution path. ### Impact Assessment Malicious dependency code wo ...[truncated 486 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Add a `package.json` that declares an exact, reviewed Remotion version rather than using a floating dependency range. 2. Generate and commit the package-manager lockfile so all transitive dependencies resolve deterministically. 3. Install dependencies with a lockfile-enforcing command such as `npm ci`. 4. Invoke the verified local executable, for example: ```bash ./node_modules/.bin/remotion render src/index.tsx ppt-video out/video.mp4 --overwrite --concurrency=1 ``` 5. Where compatible with the dependency, disable installation lifecycle scripts using `npm ci --ignore-scripts`. 6. Verify package provenance and lockfile integrity, use an approved registry, and reject unexpected registry overrides. 7. Run rendering in a sandbox or container with minimal filesystem access, no unnecessary credentials, restricted outbound networking, and a non-privileged user. 8. Regularly scan the pinned direct and transitive dependencies for known vulnerabilities before approving version updates. ]]>
