T08 · Insecure Dependencies
Error
- Location
- scripts/setup_chrome_mcp.py:39
- Finding
- Unpinned Remote npm Package Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup_chrome_mcp.py:39`, `scripts/setup_chrome_mcp.py:70-77`, `scripts/setup_chrome_mcp.py:131-136`; `SKILL.md:34-38`, `SKILL.md:42-52`, `SKILL.md:56-64` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code Snippets `scripts/setup_chrome_mcp.py:39`: ```python code, out, err = run("npx -y chrome-devtools-mcp@latest --help", timeout=60) ``` `scripts/setup_chrome_mcp.py:70-77`: ```python config = { "mcp": { "servers": { "chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest", "--headless", "--no-usage-statistics"] } } } } ``` `scripts/setup_chrome_mcp.py:131-136`: ```python proc = subprocess.Popen( ["npx", "-y", "chrome-devtools-mcp@latest", "--headless", "--no-usage-statistics"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True ) ``` `SKILL.md:34-38`: ```bash npx -y chrome-devtools-mcp@latest --help ``` `SKILL.md:42-52`: ```bash # Standard (launches Chrome automatically) npx -y chrome-devtools-mcp@latest # Headless mode (for servers) npx -y chrome-devtools-mcp@latest --headless # Connect to existing Chrome (must be started with --remote-debugging-port=9222) npx -y chrome-devtools-mcp@latest --browser-url=http://127.0.0.1:9222 # Disable telemetry npx -y chrome-devtools-mcp@latest --no-usage-statistics --no-performance-crux ``` `SKILL.md:56-64`: ```json { "mcp": { "servers": { "chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest", "--headless", "--no-usage-statistics"] } } } } ``` ### Technical Analysis The setup script, test command, documentation, and generated MCP configuration all invoke `chrome-devtools-mcp@latest`. The `latest` npm tag is mutable and therefore does not identify the exact package version that was reviewed. The `-y` option ...[truncated 2470 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace every use of `chrome-devtools-mcp@latest` with an exact, reviewed version, for example: ```python CHROME_DEVTOOLS_MCP_VERSION = "X.Y.Z" package = f"chrome-devtools-mcp@{CHROME_DEVTOOLS_MCP_VERSION}" ``` The same exact version must be used in setup, testing, documentation, and generated OpenClaw configuration. 2. Do not use version ranges, mutable tags, or automatically advancing aliases. Upgrade only through an explicit review process. 3. Maintain a lockfile where the deployment model supports it, commit it to the reviewed package, and use deterministic installation such as `npm ci`. 4. Verify package integrity against a trusted, reviewed lockfile or expected registry integrity hash before execution. Treat integrity changes as requiring security review. 5. Separate dependency acquisition from runtime execution. Install the reviewed version during a controlled setup phase and configure OpenClaw to invoke the locally installed, verified executable rather than causing `npx` to resolve a remote package on every launch. 6. Run the MCP server with least privilege in an isolated account or container. Restrict filesystem access, inherited environment variables, network access, and access to sensitive browser profiles. 7. Add automated checks that reject `@latest`, wildcard versions, and other unpinned executable dependencies in scripts, documentation, and generated configurations. 8. Document a controlled upgrade procedure that includes source review, provenance and integrity validation, functional testing, and rollback to the previously approved version. ]]>
