T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party Package Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:17-19` - `CONTRIBUTING.md:15-17` **Vulnerability Type**: Mutable third-party dependency installation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:17-19`: ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` `CONTRIBUTING.md:15-17`: ```bash npm install -g agent-browser@latest ``` ### Technical Analysis The installation instructions retrieve and execute an unpinned npm package. Both the versionless package reference and the explicit `@latest` tag resolve to a release that can change after this Skill has been reviewed. The project does not include a lockfile, integrity hash, provenance requirement, or vendored implementation that constrains which package contents are installed. The package is installed globally and its installer is subsequently executed. The `agent-browser install --with-deps` command may also install or modify browser and operating-system dependencies. Consequently, the effective code executed by users is controlled by the package version available from the external registry at installation time rather than by the audited project contents. This is a supply-chain weakness. The reviewed files do not establish that the current upstream package is malicious; the risk arises because a compromised maintainer account, registry release, mutable distribution tag, or unexpectedly changed upstream version could cause unaudited code to execute. ### Attack Path 1. An attacker compromises the upstream npm package, its publisher account, or the release process. 2. The attacker publishes a malicious package version and assigns it to the version selected by the unversioned or `@latest` installation command. 3. A user follows the documented installation procedure. 4. npm downloads and installs the attacker-controlled release globally. 5. Package lifecycle scripts or the subsequent `agent-browser install` command execute the compromised co ...[truncated 1011 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `agent-browser` to an exact, reviewed version rather than using an unversioned package or `@latest`, for example: ```bash npm install -g agent-browser@<reviewed-exact-version> ``` 2. Prefer a project-local dependency managed through a committed lockfile instead of a global installation: ```bash npm install --save-exact agent-browser@<reviewed-exact-version> ``` 3. Commit and enforce a lockfile with npm integrity metadata, and use deterministic installation commands such as `npm ci`. 4. Document the expected package publisher, registry, release provenance, and integrity information. Where practical, verify package signatures, attestations, or published checksums before execution. 5. Remove the recommendation to install `@latest`. Upgrade only after reviewing and testing the new exact version. 6. Separate browser installation from operating-system dependency installation. Clearly identify operations that may require elevated privileges and require explicit user review before running `--with-deps`. 7. Execute installation in a least-privileged environment, such as an isolated container or dedicated user account, particularly when evaluating a new upstream release. ]]>
