T08 · Insecure Dependencies
Warning
- Location
- references/agent-browser-overview.md:8
- Finding
- Unverified Third-Party Package and Runtime Installation## Vulnerability Details **File Location**: `references/agent-browser-overview.md`, lines 8-14 **Additional Location**: `references/agent-browser-troubleshooting.md`, lines 4-5 **Vulnerability Type**: Supply-chain risk from externally retrieved packages and executable components **Risk Level**: Medium ### Vulnerable Code Snippet From `references/agent-browser-overview.md`, lines 8-14: ```sh # Pin the version you trust: npm install -g agent-browser@<version> # Prefer a dedicated environment or container for installs. # Avoid running with elevated OS privileges. # Install browser runtime: agent-browser install # Linux dependencies (if needed): agent-browser install --with-deps ``` A related alternative appears in the same section: ```sh npx playwright install-deps chromium ``` From `references/agent-browser-troubleshooting.md`, lines 4-5: ```sh agent-browser install agent-browser install --with-deps ``` ### Technical Analysis The documentation instructs users to install and execute externally sourced npm, Playwright, browser-runtime, and operating-system dependency components. Although it recommends pinning a trusted version, the command contains the placeholder `@<version>` rather than a concrete, reviewed, immutable version. It also provides no package-integrity, signature, checksum, lockfile, or trusted-registry validation procedure. `npm install -g` can execute package lifecycle scripts and modifies the global Node.js environment. An `npx` invocation may resolve and execute a package obtained from a configured external registry when the required package is not already installed locally. The runtime installation commands can also retrieve executable browser components. Consequently, the effective code executed during setup is not fully represented by the audited skill files and may change based on package resolution, registry state, selected version, or upstream compromise. The p ...[truncated 1929 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@<version>` with an exact, reviewed version and document the approved version explicitly. Do not use version ranges, `latest`, or floating tags. 2. Prefer a project-local, lockfile-backed installation using `package-lock.json` and `npm ci` rather than a global npm installation. 3. Use an explicitly configured trusted registry and verify package provenance, signatures, and published integrity metadata before installation. 4. Avoid implicit `npx` downloads. Use `npx --no-install` with a previously verified local dependency, or invoke the pinned local binary directly. 5. Pin the Playwright and browser-runtime versions and document the expected checksums or official signature-verification procedure. 6. Perform installation in a dedicated, unprivileged container or sandbox with restricted filesystem and network access. 7. Disable npm lifecycle scripts during acquisition where feasible, review required scripts separately, and enable them only after verification. 8. Preserve the existing warning against elevated privileges and make it an explicit requirement. 9. Add upgrade procedures requiring security review and integrity validation before changing any pinned version.
