T08 · Insecure Dependencies
- Location
SKILL.md:122- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 122–126
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code:
bash ## 依赖安装 如果 agent-browser 未安装: ```bash npm install -g agent-browser agent-browser installtext ### Technical Analysis The installation procedure installs `agent-browser` from the npm registry without specifying an exact version or verifying package integrity. As a result, the package content installed by users can differ from the version reviewed when this skill was published. The `-g` option installs the package globally. Depending on the local npm configuration, this may require or inherit elevated permissions and exposes a broader environment than a project-local installation. npm package installation can also execute package lifecycle scripts. The subsequent `agent-browser install` command may download and install additional browser components whose versions and integrity are not constrained by this skill. This is a supply-chain weakness rather than evidence that the current package is malicious. Exploitation requires compromise or malicious replacement of the package, one of its dependencies, or components fetched by its installer. ### Attack Path 1. An attacker compromises the `agent-browser` npm package, a transitive dependency, its publisher account, or an external component source used by `agent-browser install`. 2. The attacker publishes a malicious release or substitutes a downloaded component. 3. A user follows the skill instructions and runs `npm install -g agent-browser` without an exact version or integrity constraint. 4. npm retrieves the attacker-controlled release and may execute its lifecycle scripts during installation. 5. The user runs `agent-browser install`, potentially retrieving or executing further compromised components. 6. Malicious code executes with the privileges of the installing u ...[truncated 589 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
agent-browserto a reviewed exact version, for exampleagent-browser@X.Y.Z, rather than resolving the latest release. - Record and verify the package integrity hash and maintain a lockfile where the installation workflow supports one.
- Prefer a project-local installation with
npm ciand a committed lockfile instead of a global installation. - Verify the package name, official publisher, registry source, and release provenance before installation.
- Disable npm lifecycle scripts during initial installation when compatible with the package, then explicitly run only reviewed setup steps.
- Pin and verify browser binaries or other components downloaded by
agent-browser install. - Do not perform installation with administrative privileges unless strictly required.
- Document the expected package version, publisher identity, component sources, and checksums so users can validate them before execution.
- Pin
