T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Global npm Installation Creates a Supply-Chain Execution Risk## Vulnerability Details **File Locations**: `SKILL.md:20-22`; `CONTRIBUTING.md:23-25` **Vulnerability Type**: Unpinned and mutable third-party dependency installation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:20-22`: ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` `CONTRIBUTING.md:23-25`: ```bash npm install -g agent-browser@latest ``` ### Technical Analysis The installation instructions retrieve and globally install `agent-browser` without pinning an exact reviewed version. The troubleshooting instructions explicitly select `@latest`, making the installed artifact dependent on the package registry state at execution time. npm installation can execute package lifecycle scripts with the privileges of the invoking user. A global installation also places executable files into shared user-level or system-level npm locations. Furthermore, `agent-browser install --with-deps` may retrieve and install additional mutable components without documented versions, checksums, or integrity-validation procedures. The audited project does not itself contain a malicious payload, and the evidence does not establish that the current upstream package is malicious. The vulnerability is the absence of controls that ensure users receive the same reviewed dependency release over time. ### Attack Path 1. An attacker compromises the upstream npm package, a maintainer account, or another component in the dependency publication chain. 2. The attacker publishes a malicious release under the expected package name. 3. A user or AI agent follows the documented `npm install -g agent-browser`, `npm install -g agent-browser@latest`, or dependency-installation instructions. 4. npm resolves the mutable package reference to the attacker-controlled release. 5. Malicious lifecycle code executes during installation, or a compromised globally installed executable runs when subsequent d ...[truncated 999 chars]
- Remediation
- ## Remediation Suggestions 1. Replace mutable package references with an exact version that has been reviewed: ```bash npm install --save-exact agent-browser@<reviewed-version> ``` 2. Remove the recommendation to install `@latest`. Document a controlled upgrade and security-review process instead. 3. Prefer a project-local dependency over a global installation, and commit a lockfile so transitive versions are reproducible. 4. Verify downloaded artifacts using registry integrity metadata, checksums, or signed provenance before execution. 5. Document the exact components and versions installed by `agent-browser install` and `agent-browser install --with-deps`. 6. Run installation without administrative privileges and in an isolated environment where practical. 7. Consider disabling npm lifecycle scripts during initial acquisition and reviewing the package before enabling any required installation scripts. 8. Periodically audit the pinned package and its transitive dependencies, then update pins only after review.
