T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:48
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 48–49 **Vulnerability Type**: Unpinned global third-party dependency installation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - Requires: `npm install -g capture-website-cli` - Default timeout: 60 seconds ``` The same installation requirement also appears in the metadata at line 4: ```yaml description: Capture website screenshots from the command line. Use when user wants to take screenshots of any URL (Twitter, news sites, webpages) and send them via Discord/Feishu. Requires capture-website-cli to be installed (npm install -g capture-website-cli). ``` ### Technical Analysis The skill instructs users to install `capture-website-cli` globally from npm without specifying an exact, reviewed version, lockfile, integrity hash, or verified package source. Consequently, the installed artifact depends on mutable npm registry state at installation time. npm packages and their transitive dependencies may execute lifecycle scripts during installation. If the named package, its maintainer account, or a transitive dependency is compromised, following this instruction could execute attacker-controlled code with the privileges of the user running npm. The global installation scope also makes the command available system-wide for that user and increases exposure compared with a project-local, isolated installation. The reviewed file does not itself contain a malicious payload, and there is no evidence that the referenced package is currently malicious. The weakness is the unsafe, unpinned dependency installation process. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or one of its transitive dependencies and publishes a malicious release. 2. A user follows the skill's documented command: ```bash npm install -g capture-website-cli ``` 3. npm resolves the mutable package version available at that time rather than a previously reviewed exact versi ...[truncated 837 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `capture-website-cli` to an exact, reviewed version rather than resolving the latest release: ```bash npm install --save-exact capture-website-cli@<reviewed-version> ``` 2. Prefer project-local installation over `npm install -g`, and invoke the locally installed binary through a package script or an equivalent controlled mechanism. 3. Commit and enforce a lockfile so transitive dependency versions are reproducible. 4. Verify package provenance, registry origin, maintainer identity, and published integrity metadata before installation. 5. Review dependency and lifecycle-script changes before upgrading. 6. Install and execute the screenshot utility in a sandbox or container with minimal filesystem and network permissions. 7. Avoid elevated installation privileges and document that users must not run the installation command with `sudo` or an administrator account.
