T08 · Insecure Dependencies
Error
- Location
- SKILL.md:33
- Finding
- Unverified Global npm Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:33-38` **Vulnerability Type**: Untrusted third-party installation with npm lifecycle execution **Risk Level**: High ### Vulnerable Code ```markdown If it is not installed, find the project folder and install it: ```bash npm install -g . ``` ``` ### Technical Analysis The skill directs the agent to find an unspecified project directory and install its contents globally with npm. The audited package does not include the referenced CLI implementation or a `package.json`, and it does not identify a trusted repository, pinned release, integrity hash, or signature for the project to be installed. Consequently, the effective code executed by this instruction cannot be verified from the reviewed artifact. By default, npm installation can execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. If the selected directory contains an attacker-controlled npm package, `npm install -g .` can execute those scripts with the privileges of the invoking process. The global installation option also places package binaries and files in the configured global npm prefix, increasing the scope beyond a task-local workspace. ### Attack Path 1. An attacker creates or modifies a directory containing a malicious npm package. 2. The package defines a malicious lifecycle script or attacker-controlled command-line binary. 3. The agent fails to find `agent-launchpad` and follows the instruction to “find the project folder.” 4. The agent selects the attacker-controlled or otherwise unverified directory. 5. The agent executes `npm install -g .` from that directory. 6. npm runs the malicious lifecycle script during installation and installs attacker-controlled binaries into the global npm prefix. 7. The malicious code executes with the permissions of the user running npm and may also affect subsequent command invocations through the installed binary. ### Impact Assessment Successful exploitatio ...[truncated 579 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the instruction to “find the project folder” with an explicit, verified official package or repository source. 2. Pin the CLI to an exact version and verify its registry integrity hash, signature, or release checksum before installation. 3. Include the CLI source and dependency lockfile in the auditable distribution when possible. 4. Prefer a task-local installation over `npm install -g` to limit filesystem and command-resolution impact. 5. Disable lifecycle scripts with `--ignore-scripts` when they are not strictly required. 6. If lifecycle scripts are required, review them and all transitive dependencies before execution. 7. Require explicit user confirmation before installing software or executing package lifecycle code. 8. Run installation in a sandbox or least-privileged environment without unnecessary credentials, sensitive mounts, or administrative permissions. ]]>
