T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Global Installation and Execution of an External npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 17-19 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` ### Technical Analysis The Skill instructs users or agents to install `agent-browser` globally without specifying an exact version or verifying an integrity hash. It then immediately executes the installed program to retrieve browser components and, through `--with-deps`, potentially install operating-system dependencies. Because the audited project contains only documentation and metadata, the npm package implementation and the additional components it downloads are outside the reviewed artifact. The effective executable content can therefore change after this Skill has been reviewed. Global npm installation may also execute package lifecycle scripts, including installation hooks, with the permissions of the invoking user. This creates a supply-chain trust boundary in which compromise of the npm package, its publisher account, its transitive dependencies, or its downstream download infrastructure could introduce arbitrary code. ### Attack Path 1. An attacker compromises the `agent-browser` npm package, its publishing account, a transitive dependency, or a download endpoint used by its installer. 2. The attacker publishes or serves a malicious package or component under the expected package name. 3. A user or agent follows the Skill instructions and runs `npm install -g agent-browser`. 4. npm retrieves the mutable package release and may execute its lifecycle scripts. 5. The user subsequently runs `agent-browser install` or `agent-browser install --with-deps`. 6. The malicious package or downloaded component executes with the invoking user's permissions. If the dependency installation is run through an elevated workflow, the resulting scope may extend to system-level modific ...[truncated 722 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the package to a reviewed, exact version rather than resolving the current registry release: ```bash npm install -g agent-browser@<audited-version> ``` 2. Publish and verify the expected npm integrity digest and package provenance before installation. 3. Prefer a project-local dependency governed by a committed lockfile instead of a global installation. 4. Audit the pinned package, transitive dependencies, lifecycle scripts, and any URLs used to download browser binaries or other components. 5. Avoid invoking `--with-deps` automatically. Clearly identify the operating-system changes it can make and require explicit user approval before privileged installation. 6. Run installation and browser automation in a sandbox or container with minimal filesystem, credential, and network access. 7. Document a verified upgrade procedure so version changes trigger a new security review rather than silently changing the executable payload. ]]>
