T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:34
- Finding
- Unpinned npm packages and mutable CLI dependencies are downloaded and executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 34–37 **Vulnerability Type**: Supply-chain exposure through unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm create vite@latest . -- --template react --force npm install npm install -D tailwindcss@3 postcss autoprefixer && npx tailwindcss init -p npm install react-router-dom framer-motion lucide-react ``` ### Technical Analysis The setup procedure downloads and executes mutable npm packages. In particular, `npm create vite@latest` explicitly selects the latest available release, while the other installation commands use broad or unspecified versions. The `npx tailwindcss` command also executes a package-provided CLI. npm installation can run package lifecycle scripts under the permissions of the user or agent performing the setup. Because the Skill does not provide a reviewed lockfile, exact versions, package-integrity expectations, or lifecycle-script restrictions, future executions may install code that differs from the code available when the Skill was audited. No dependency in the audited artifact was confirmed to be malicious. The risk arises from the mutable and insufficiently controlled dependency acquisition process. ### Attack Path 1. An upstream npm package, transitive dependency, maintainer account, or package release is compromised. 2. A user or agent follows the setup commands in `SKILL.md`. 3. npm resolves the unpinned dependency to the compromised release. 4. Package installation or `npx` invokes attacker-controlled lifecycle or CLI code. 5. That code executes with the filesystem, network, and process permissions of the user running npm. ### Impact Assessment Successful exploitation could allow arbitrary code execution under the invoking account. Depending on that account's permissions, the malicious package could read or modify accessible project files, environment variables, developer credentials, SSH configuration, or other ...[truncated 210 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency and CLI tool to an exact, reviewed version rather than using `@latest`, major-version ranges, or unspecified versions. 2. Include a reviewed `package-lock.json` and use `npm ci` to reproduce the locked dependency graph. 3. Review lockfile changes before updating dependencies and use automated vulnerability and provenance checks. 4. Where operationally practical, install dependencies with lifecycle scripts disabled and explicitly permit only packages that require reviewed installation scripts. 5. Execute scaffolding and builds in an isolated, least-privileged environment without unrelated credentials. 6. Configure npm to use an approved registry and verify package names, publishers, integrity metadata, and provenance before upgrades. ]]>
