T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:23
- Finding
- Unpinned Global Installation of a Third-Party Browser Automation Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:23-27`; also documented in `README.md:19-23` **Vulnerability Type**: Uncontrolled third-party dependency installation **Risk Level**: Medium ### Vulnerable Code From `SKILL.md`: ```bash npm install -g agent-browser agent-browser install ``` The same installation process appears in `README.md`: ```bash # 1. Install the skill through clawhub clawhub install douyin-scraper # 2. Install dependencies npm install -g agent-browser agent-browser install ``` ### Technical Analysis The installation instructions retrieve the latest available version of `agent-browser` from the npm registry without pinning a reviewed version or verifying package integrity. The package is installed globally, expanding the effect of any malicious lifecycle script or compromised package content beyond an isolated project environment. The subsequent `agent-browser install` command may download additional browser components. The project does not specify expected versions, download sources, checksums, package-lock data, or integrity metadata for either installation stage. This does not prove that the current upstream package is malicious. It creates a supply-chain vulnerability in which the code ultimately installed and executed can change after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the upstream npm package, its publisher account, or a later package release. 2. The attacker publishes a malicious version under the expected package name. 3. A user follows the documented `npm install -g agent-browser` instruction without a version constraint. 4. npm retrieves the attacker-controlled version. 5. Malicious package code or lifecycle scripts execute with the privileges of the user performing the installation. 6. The globally installed command remains available to this Skill and other processes using that account. ### Impact Assessment A successful supply-chain compromise could execute arbitra ...[truncated 367 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `agent-browser` to an explicitly reviewed version: ```bash npm install --save-exact agent-browser@<reviewed-version> ``` 2. Install it as a project-local dependency rather than globally. 3. Commit and enforce a lockfile containing npm integrity hashes. 4. Use `npm ci` in automated environments to prevent unreviewed dependency resolution changes. 5. Verify and document the package publisher, registry, expected browser component source, and component checksums. 6. Review lifecycle scripts before installation and consider initially installing with: ```bash npm ci --ignore-scripts ``` 7. Execute the browser tooling in a sandbox or container with access limited to the files and network destinations required for Douyin searches. ]]>
