T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:12-17`; additional occurrence at `CONTRIBUTING.md:18-22` **Vulnerability Type**: Unpinned and mutable third-party dependency installation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:12-17`: ```bash ### npm recommended ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` `CONTRIBUTING.md:18-22`: ```bash 1. Install the latest version ```bash npm install -g agent-browser@latest ``` ``` ### Technical Analysis The installation instructions direct users to install `agent-browser` globally without pinning an exact reviewed version. The contributing guide explicitly requests the mutable `@latest` release. Consequently, the code users install can differ from the version that existed when this Skill was audited. npm packages may execute lifecycle scripts during installation. A global installation also places package executables and files into shared user-level or system-level npm locations. In addition, the subsequent `agent-browser install --with-deps` command may download browser components and install operating-system dependencies, expanding the supply-chain and host-modification surface. The repository provides no lockfile, package integrity hash, release signature, provenance verification procedure, or exact version constraint. This does not prove that the current upstream package is malicious, but it creates an unsafe dependency acquisition path in which an upstream account compromise, registry compromise, or malicious future release could result in local code execution. ### Attack Path 1. An attacker compromises the upstream npm publisher account, release process, or package distribution channel. 2. The attacker publishes a malicious release under the legitimate `agent-browser` package name and assigns it the `latest` tag. 3. A user follows the documented `npm install -g agent-browser` or `npm install -g agent-browser@latest` ins ...[truncated 1128 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact version that has been reviewed, for example: ```bash npm install -g agent-browser@X.Y.Z ``` 2. Remove instructions that use `@latest` or otherwise resolve a mutable version. 3. Publish the expected npm package integrity digest and document how users can verify package provenance before installation. 4. Prefer a project-local installation with a committed lockfile over global installation: ```bash npm install --save-exact agent-browser@X.Y.Z npx agent-browser install ``` 5. Use npm provenance attestations or signed release artifacts where available, and verify that the package publisher and repository match the expected upstream project. 6. Review package lifecycle scripts and consider installation with lifecycle scripts disabled when compatible: ```bash npm install --ignore-scripts --save-exact agent-browser@X.Y.Z ``` 7. Treat `--with-deps` as a privileged host-modification operation. Document the exact system packages it installs, require explicit user approval, and recommend running it only in a disposable container or isolated environment. 8. Establish a controlled dependency-update process in which new versions are reviewed and tested before the pinned version in the documentation is changed. ]]>
