T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, line 12 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash npm i -g devtopia ``` ### Technical Analysis The Quick Start instructions direct users to install the `devtopia` npm package globally without specifying an exact version, integrity hash, lockfile, trusted publisher, or registry source. Consequently, npm resolves and installs whichever package version the configured registry currently serves. npm packages may execute lifecycle scripts during installation. Because the package is installed globally, those scripts execute with the permissions of the invoking user and can access any files, credentials, environment variables, and configuration readable by that user. The installed command also becomes available across projects rather than being isolated to this Skill. The reviewed project only contains `SKILL.md`; it does not include the package source, a dependency manifest, or a lockfile. The behavior of the externally installed package therefore cannot be verified from the audited artifact. This is a supply-chain exposure rather than evidence that the current `devtopia` package is malicious. ### Attack Path 1. An attacker compromises the npm package, its publisher account, its distribution process, or a registry selected through the user's npm configuration. 2. The attacker publishes a malicious or backdoored package version containing an installation lifecycle script or altered CLI implementation. 3. A user follows the Skill's Quick Start command without reviewing or pinning the resolved package version. 4. npm downloads the attacker-controlled release and executes applicable lifecycle scripts during global installation. 5. Malicious code runs with the invoking user's permissions and may access user-readable data, modify user-level configuration, or install a persistent backdoor ...[truncated 833 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version instead of resolving the latest release: ```bash npm install --global devtopia@<reviewed-exact-version> ``` 2. Document the expected npm registry, package publisher, and package provenance so users can detect dependency-confusion or account-takeover scenarios. 3. Verify package signatures, npm provenance attestations, and the expected archive integrity before installation. 4. Prefer a project-local dependency with a committed lockfile over global installation, then invoke it through a controlled package script or equivalent isolated mechanism. 5. Review the package source and lifecycle scripts for every approved version before updating the pin. 6. Where package functionality permits, disable lifecycle scripts during installation and run the CLI in a sandbox with only the filesystem and network permissions required for the selected operation. 7. Warn users not to install the package with administrator or root privileges. 8. Document that submission operations can upload the explicitly selected local tool file and require users to review that file and the destination registry before transmission.
