T08 · Insecure Dependencies
Warning
- Location
- scripts/jd_review.py:24
- Finding
- Automatic Installation and Execution of an Unpinned Third-Party Dependency## Vulnerability Details **File Location**: `scripts/jd_review.py:24-32` **Vulnerability Type**: Unpinned dependency installation and immediate execution **Risk Level**: Medium ### Vulnerable Code ```python try: subprocess.run( [sys.executable, "-m", "pip", "install", "browser-use"], check=True, capture_output=True, text=True ) subprocess.run( ["browser-use", "install"], check=True, capture_output=True, text=True, timeout=120 ) ``` The same unsafe installation process is also documented in `SKILL.md:21-22` and conditionally invoked in `SKILL.md:35`: ```bash pip install browser-use browser-use install ``` ```bash which browser-use || pip install browser-use && browser-use install ``` ### Technical Analysis The Skill installs `browser-use` from the configured Python package index without specifying an audited version or verifying an integrity hash. It then immediately executes the newly installed `browser-use` command with the `install` subcommand. Because neither the direct package nor its transitive dependency graph is locked, the effective code executed by the Skill can change after the Skill itself has been audited. This creates a supply-chain trust boundary in which a compromised package release, dependency, package repository, or local package-index configuration could introduce arbitrary code. The use of an argument list in `subprocess.run` prevents shell metacharacter injection at this location, but it does not mitigate dependency substitution or upstream package compromise. ### Attack Path 1. An attacker compromises a future `browser-use` release, one of its transitive dependencies, or a package source configured in the user's Python environment. 2. The user invokes the Skill on a system where `browser-use` is unavailable. 3. `ensure_browser_use()` runs `pip install browser-use`, resolving and installing the current unpinned package and dependency versions. 4. The script immediately invokes `brow ...[truncated 1121 chars]
- Remediation
- ## Remediation Suggestions 1. Remove automatic dependency installation from the operational script. Fail safely with clear manual setup instructions when the dependency is unavailable. 2. Pin `browser-use` to a specifically reviewed version rather than resolving the latest release. 3. Lock all transitive dependencies and require cryptographic hashes, for example through a generated requirements lock file installed with `pip --require-hashes`. 4. Install dependencies in a dedicated virtual environment with no unnecessary access to unrelated project or user resources. 5. Treat `browser-use install` as a separate, security-sensitive installation step. Require explicit user approval and document what binaries, system packages, and network sources it uses. 6. Verify downloaded browser artifacts using trusted checksums or signatures where supported. 7. Use a trusted package index and explicitly control index configuration to reduce dependency-substitution risks. 8. Add dependency vulnerability and provenance checks to the release process, and repeat the audit whenever the pinned package or lock file changes. 9. Update `SKILL.md:21-22` and `SKILL.md:35` so the documentation no longer instructs the agent to install and immediately execute an unpinned package.
