T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:32
- Finding
- Unpinned Global npm Package Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:32-34` **Additional Location**: `references/commands.md:63-65` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Complete Code Snippet From `SKILL.md:32-34`: ```markdown - `agentbrowse` must be available on `PATH`. If it is missing or outdated, run `npm i -g @mercuryo-ai/agentbrowse-cli@latest`, then verify with `agentbrowse --version`. ``` The instruction is repeated in `references/commands.md:63-65`: ```markdown If the command is missing or outdated, run `npm i -g @mercuryo-ai/agentbrowse-cli@latest`, then rerun `agentbrowse --version`. ``` ### Technical Analysis The installation command resolves the mutable npm tag `latest` rather than a reviewed, exact package version. Consequently, the artifact installed when the skill is used may differ from the artifact that existed when the skill was audited. The `-g` option installs the package globally and exposes its executable through the system-wide command lookup path. Depending on the local npm configuration, package lifecycle scripts may also execute during installation. An upstream package compromise, publisher-account takeover, or malicious future release could therefore introduce arbitrary code without requiring any modification to this repository. The package name is consistent across the project and there is no evidence that it is intentionally typosquatted. The risk arises from mutable version resolution, absence of integrity verification, and global installation rather than from confirmed malicious behavior in the named package. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, or package distribution channel for `@mercuryo-ai/agentbrowse-cli`. 2. The attacker publishes a malicious release and assigns it to the `latest` distribution tag. 3. A user or agent follows the documented command: `npm i -g @mercuryo-ai/agentbrowse-cli@latest ...[truncated 1091 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed version, for example: ```bash npm install --global @mercuryo-ai/agentbrowse-cli@X.Y.Z ``` 2. Update the pinned version only after reviewing its source, release provenance, and dependency changes. 3. Prefer a project-local installation governed by a committed lockfile rather than a global installation. 4. Use npm integrity and provenance controls where supported, and install only from an explicitly trusted registry. 5. Consider disabling package lifecycle scripts during installation when they are not required: ```bash npm install --ignore-scripts --save-exact @mercuryo-ai/agentbrowse-cli@X.Y.Z ``` 6. Document a minimum supported version separately rather than instructing agents to install whatever release currently owns the `latest` tag. 7. Apply the same hardened installation instruction consistently in both `SKILL.md` and `references/commands.md`. ]]>
