T08 · Insecure Dependencies
- Location
scripts/create.sh:38- Finding
Unpinned npm Dependencies Allow Non-Reproducible Supply-Chain Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/create.sh, lines 38–41
Vulnerability Type: Unpinned third-party dependencies and unsafe package installation
Risk Level: MediumVulnerable Code
bash npm install --save-exact remotion @remotion/cli @remotion/tailwind > /dev/null 2>&1 # Install dev deps npm install -D typescript @types/react tailwindcss > /dev/null 2>&1Technical Analysis
The script resolves npm packages from mutable registry tags without specifying audited version numbers. Although
--save-exactrecords the versions selected for the first group after installation, it does not constrain which versions are initially downloaded. Every execution can therefore resolve a different package version.The development dependencies are also installed without explicit versions and, by default, are normally saved using semver ranges. No pre-audited lockfile is supplied by the skill before these installations.
npm may execute package lifecycle scripts during installation. Consequently, a compromised new release, compromised maintainer account, malicious transitive dependency, or registry resolution attack could cause attacker-controlled code to execute while
create.shis running. Redirecting all npm output to/dev/nullalso suppresses warnings and information that could help users detect unexpected package behavior.Attack Path
- An attacker compromises a listed npm package, one of its transitive dependencies, or the relevant registry publishing account.
- The attacker publishes a malicious version that satisfies the mutable tag or dependency range resolved by npm.
- A user runs
scripts/create.shafter that version becomes available. - The script downloads the newly resolved package without comparing it against a reviewed lockfile or approved version manifest.
- npm executes any applicable lifecycle script with the privileges of the user running
create.sh. - Th ...[truncated 1022 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every direct dependency to a reviewed version, including development dependencies:
bash npm install --save-exact \ remotion@APPROVED_VERSION \ @remotion/cli@APPROVED_VERSION \ @remotion/tailwind@APPROVED_VERSION \ typescript@APPROVED_VERSION \ @types/react@APPROVED_VERSION \ tailwindcss@APPROVED_VERSION -
Distribute a reviewed
package.jsonandpackage-lock.jsonas part of the skill template, then install with:bash npm ciThis ensures that dependency versions and integrity hashes match the audited lockfile.
-
Regularly scan and review the lockfile with dependency-auditing and software-composition-analysis tooling before updating it.
-
Where package functionality permits, disable lifecycle scripts during installation:
bash npm ci --ignore-scriptsIf specific scripts are required, execute only explicitly reviewed setup steps afterward.
-
Do not suppress all installation output. Preserve logs in CI and present npm errors and security warnings to the user.
-
Run project creation in a non-privileged, isolated environment without unrelated credentials or sensitive environment variables.
-
