T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:40
- Finding
- Unpinned Third-Party npm Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 40–45 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ```bash Install tooling outside the repo unless the project already depends on it: ```bash mkdir -p /tmp/cdp-tools npm --prefix /tmp/cdp-tools i chrome-remote-interface NODE_PATH=/tmp/cdp-tools/node_modules node /tmp/cdp-debug.cjs ``` ``` ### Technical Analysis The documented command installs `chrome-remote-interface` without an exact version or a lockfile containing integrity hashes. Consequently, npm resolves whichever package release and transitive dependency versions are current when the command is executed. The reviewed skill therefore does not fully define or constrain the code users will install. Package installation may also execute npm lifecycle scripts with the privileges of the invoking user. Installing the dependency under `/tmp` isolates its location from the project but does not prevent malicious package code or installation scripts from accessing resources available to that user. This creates a supply-chain exposure if the package, a transitive dependency, a maintainer account, or the configured npm registry is compromised. The audit did not find evidence that the named package is currently malicious; the risk arises from the mutable and unverified installation process. ### Attack Path 1. An attacker compromises the named package, one of its transitive dependencies, a package maintainer account, or the package source used by the victim's npm configuration. 2. The attacker publishes a malicious version or modifies a dependency selected by npm's unconstrained resolution. 3. A user follows the instructions and runs: `npm --prefix /tmp/cdp-tools i chrome-remote-interface`. 4. npm retrieves the attacker-controlled release and may execute its lifecycle scripts during installation. 5. Malicious code runs with the invoking user's privileges. It may also execute later when `/tmp/cdp-debu ...[truncated 511 chars]
- Remediation
- ## Remediation Suggestions - Pin `chrome-remote-interface` to a reviewed exact version rather than relying on the latest registry release. - Maintain a lockfile with integrity hashes and use `npm ci` for reproducible installation. - Commit or otherwise distribute the reviewed lockfile with the debugging tooling. - Use `--ignore-scripts` if the selected package and its dependencies do not require lifecycle scripts. - Configure npm to use an approved registry and verify package provenance where supported. - Periodically audit both the direct package and its transitive dependency tree. - Prefer an existing, locked, and audited project dependency when one is already available. - Run the debugging tooling under a least-privileged account without unnecessary access to secrets.
