T08 · Insecure Dependencies
- Location
SKILL.md:162- Finding
Unpinned Global Installation of an Unrelated npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 162-163
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Mediumbash npm install -g agent-browser agent-browser install --with-depsTechnical Analysis
The skill documentation instructs the agent to install the latest available version of
agent-browserglobally and then install its additional dependencies. The package is not declared in the project dependency manifest, is not pinned to a reviewed version or integrity hash, and is unrelated to the core local diagram-rendering functionality.npm installations can execute package lifecycle scripts such as
preinstall,install, andpostinstall. Consequently, the behavior executed by this instruction can change without any modification to the audited project: a compromised package release, compromised maintainer account, malicious transitive dependency, or future unsafe release could execute arbitrary code during installation. Global installation also expands the affected scope by placing commands and package files in shared system or user-level npm locations.The subsequent
agent-browser install --with-depscommand may retrieve and install further browser components or operating-system dependencies whose versions and integrity are not controlled by this repository.No evidence was found that the currently named package is malicious. The vulnerability is the unsafe, unpinned, globally scoped dependency-installation procedure.
Attack Path
- An attacker compromises the
agent-browserpackage, one of its transitive dependencies, its publishing account, or a future package release. - The agent follows
SKILL.mdand runsnpm install -g agent-browser. - npm retrieves the attacker-controlled version because no exact version or integrity constraint is specified.
- Malicious package code executes through an npm lifecycle script or when the installed CL ...[truncated 1090 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Remove the browser-installation section if browser automation is not essential to generating diagrams.
- Do not direct agents to install packages globally. Use an isolated, least-privileged project environment instead.
- If the dependency is required, declare an exact reviewed version, for example through a project-local
package.jsonand lockfile, rather than installing the latest release. - Commit and verify a lockfile with integrity metadata. Use deterministic installation such as
npm ci. - Disable lifecycle scripts where operationally possible using
npm ci --ignore-scripts, and separately review any required installation scripts before enabling them. - Pin and verify browser binaries and other components retrieved by
agent-browser install --with-deps. - Run browser tooling in a sandbox or container without access to secrets, unrelated user files, privileged sockets, or administrative permissions.
- Document why the dependency is necessary and restrict its allowed network destinations to trusted documentation sites.
- Add automated dependency scanning and periodically review both direct and transitive dependencies for known vulnerabilities and ownership changes.
