T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Global npm Installation Exposes Users to Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:18-21`; `CONTRIBUTING.md:23-26` **Vulnerability Type**: Unpinned and mutable third-party dependency installation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:18-21`: ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` `CONTRIBUTING.md:23-26`: ```bash npm install -g agent-browser@latest ``` ### Technical Analysis The documented installation process globally installs `agent-browser` without pinning an audited version. The contributing instructions explicitly select the mutable `latest` release. Consequently, the package and its transitive dependencies resolved when a user runs these commands may differ from those reviewed when this skill was published. npm installations can execute package lifecycle scripts with the permissions of the invoking user. After installation, the documented `agent-browser install` and `agent-browser install --with-deps` commands can also retrieve browser binaries or system components. Their implementations and downloaded artifacts are not included in this documentation-only project and therefore could not be verified during this audit. This does not prove that the current upstream package is malicious. The risk arises if the package publisher, registry account, upstream release process, transitive dependency, or installer download channel is compromised. ### Attack Path 1. An attacker compromises the upstream npm package, a transitive dependency, publisher credentials, or an artifact downloaded by the installer. 2. The attacker publishes a malicious release that becomes the unversioned default or the `latest` release. 3. A user or agent follows the documented command and globally installs the mutable package. 4. Malicious npm lifecycle code executes during installation, or malicious code executes when `agent-browser install` is subsequently invoked. 5. The payload performs actions available to the invoking acc ...[truncated 1101 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `agent-browser` to a specific, audited version rather than using an unversioned package or `@latest`, for example: ```bash npm install -g agent-browser@<audited-version> ``` 2. Publish and verify the expected npm integrity hash and package provenance or signature where supported. 3. Prefer a project-local installation over a global installation to reduce the scope of package modification: ```bash npm install --save-exact agent-browser@<audited-version> ``` 4. Commit and enforce a lockfile for source-based installation, and use a frozen or clean installation mode such as `npm ci` or the corresponding pnpm option. 5. Review package lifecycle scripts and transitive dependencies before approving a release. Consider disabling lifecycle scripts during initial retrieval when operationally possible. 6. Pin source installation instructions to an audited commit or release tag instead of the repository's mutable default branch. 7. Document every artifact downloaded by `agent-browser install`, including its source, version, checksum, signature, destination, and required privileges. 8. Avoid running npm or the installer as root or through `sudo`. If operating-system dependencies require elevation, isolate those steps and use an explicit, reviewed package list. 9. Establish an update process that reviews and tests new versions before changing the documented pinned version. ]]>
