T08 · Insecure Dependencies
- Location
SKILL.md:61- Finding
Non-Reproducible npm Installation Permits Mutable Transitive Dependencies and Lifecycle Scripts
- Content
View full analysis
/dev/null && echo "已安装" || echo "需要安装" ``` If not installed, execute: ```bash cd byted-ai-mediakit-videoedit/template && npm install ``` `template/package.json:8-19`: ```json "dependencies": { "@remotion/bundler": "4.0.0", "@remotion/renderer": "4.0.0", "react": "18.2.0", "react-dom": "18.2.0", "remotion": "4.0.0" }, "devDependencies": { "@remotion/cli": "4.0.0", "@types/react": "18.2.64", "@types/react-dom": "18.2.25" } ``` No `package-lock.json` or other dependency lockfile is present in the audited project. ### Technical Analysis The direct dependencies are pinned to exact versions, which reduces direct version drift. However, the absence of a committed lockfile means that `npm install` must resolve the complete transitive dependency graph at installation time. Transitive dependencies may use version ranges and can therefore resolve to artifacts that were not included in, or verified during, this audit. npm installation can also execute dependency lifecycle scripts such as `preinstall`, `install`, and `postinstall`. If a resolved package or its registry artifact is compromised, such a script can execute arbitrary code with the privileges of the user running the Skill setup. The installation is consequently not deterministic: two users installing the same audited project at different times may receive different transitive code. ### Attack Path 1. A transitive dependency permitted by the dependency graph is compromised, republished, or resolves to a newly introduced malicious version. 2. A user follows the Skill instructions because `node_modules` is absent. 3. The user runs `npm install` without a reviewed loc ...[truncated 1189 chars]- Remediation
View remediation
