T08 · Insecure Dependencies
- Location
scripts/jd_review.py:24- Finding
Automatic Installation and Execution of an Unpinned Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Location:
scripts/jd_review.py:24-32
Vulnerability Type: Unpinned dependency installation and immediate execution
Risk Level: MediumVulnerable 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-22and conditionally invoked inSKILL.md:35:bash pip install browser-use browser-use installbash which browser-use || pip install browser-use && browser-use installTechnical Analysis
The Skill installs
browser-usefrom the configured Python package index without specifying an audited version or verifying an integrity hash. It then immediately executes the newly installedbrowser-usecommand with theinstallsubcommand.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.runprevents shell metacharacter injection at this location, but it does not mitigate dependency substitution or upstream package compromise.Attack Path
- An attacker compromises a future
browser-userelease, one of its transitive dependencies, or a package source configured in the user's Python environment. - The user invokes the Skill on a system where
browser-useis unavailable. ensure_browser_use()runspip install browser-use, resolving and installing the current unpinned package and dependency versions.- The script immediately invokes `brow ...[truncated 1121 chars]
- An attacker compromises a future
- Remediation
View remediation
Remediation Suggestions
- Remove automatic dependency installation from the operational script. Fail safely with clear manual setup instructions when the dependency is unavailable.
- Pin
browser-useto a specifically reviewed version rather than resolving the latest release. - Lock all transitive dependencies and require cryptographic hashes, for example through a generated requirements lock file installed with
pip --require-hashes. - Install dependencies in a dedicated virtual environment with no unnecessary access to unrelated project or user resources.
- Treat
browser-use installas a separate, security-sensitive installation step. Require explicit user approval and document what binaries, system packages, and network sources it uses. - Verify downloaded browser artifacts using trusted checksums or signatures where supported.
- Use a trusted package index and explicitly control index configuration to reduce dependency-substitution risks.
- Add dependency vulnerability and provenance checks to the release process, and repeat the audit whenever the pinned package or lock file changes.
- Update
SKILL.md:21-22andSKILL.md:35so the documentation no longer instructs the agent to install and immediately execute an unpinned package.
