T08 · Insecure Dependencies
Error
- Location
- scripts/doctor.mjs:105
- Finding
- Unpinned npm Package Is Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: - `SKILL.md:11-16` - `SKILL.md:38-40` - `USAGE.md:45-55` - `scripts/doctor.mjs:105-110` - `scripts/install-host.mjs:13-15` - `scripts/install-host.mjs:92-97` - `scripts/install-host.mjs:182-187` - `scripts/print-stdio.mjs:6-11` - `scripts/print-hermes-yaml.mjs:6-11` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code `SKILL.md:11-16`: ```yaml metadata: openclaw: {"install":[{"kind":"node","package":"fsb-mcp-server","bins":["fsb-mcp-server"],"label":"Install FSB MCP server (npm)"}]} hermes: mcp_servers: fsb: command: "npx" args: ["-y", "fsb-mcp-server"] ``` `SKILL.md:38-40`: ```markdown ## Doctor-first protocol If anything looks off (no page response, unexpected errors, stale state, missing tab) run `node scripts/doctor.mjs` (which wraps `npx -y fsb-mcp-server doctor`) BEFORE retrying the same call. ``` `USAGE.md:45-55`: ```markdown To discover other supported hosts on the machine (Claude Desktop, Cursor, etc.), run: ``` npx -y fsb-mcp-server install --list ``` Then run the host-specific installer, for example: ``` npx -y fsb-mcp-server install --claude-desktop ``` Notes: - What these commands do: each invocation spawns the `fsb-mcp-server` Node package via npx. `install --list` only prints detected MCP hosts and exits. `install --<host>` writes the FSB stdio block into that host's MCP config file and nothing else. Run only the host installers you actually want configured; decline prompts otherwise. - By default, `npx -y fsb-mcp-server` resolves to the latest published bridge so security fixes ship without re-running the installer. ``` `scripts/doctor.mjs:105-110`: ```js const child = spawn('npx', ['-y', 'fsb-mcp-server', 'doctor'], { stdio: ['ignore', 'pipe', 'pipe'], shell: false, }); ``` `scripts/install-host.mjs:13-15`: ```js const NPX = 'npx'; const PKG = 'fsb-mcp-server'; const MARKERS = ['de ...[truncated 4044 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. **Pin an exact audited version everywhere.** Replace mutable package references with an exact release, for example: ```yaml args: ["-y", "fsb-mcp-server@0.9.90"] ``` Apply the same exact version in: - `SKILL.md` metadata. - `scripts/doctor.mjs`. - `scripts/install-host.mjs`. - `scripts/print-stdio.mjs`. - `scripts/print-hermes-yaml.mjs`. - Every installation and recovery command in `USAGE.md`. - Any generated MCP host configuration. 2. **Do not use ranges or distribution tags.** Avoid `latest`, omitted versions, caret ranges, tilde ranges, and broad semver ranges. These still allow the executable payload to change without another Skill review. 3. **Verify package integrity.** Publish and document the expected npm integrity digest for the approved package tarball. Where practical, download the package through a locked dependency installation and verify it using a lockfile or an independently published checksum before execution. 4. **Use a reviewed local installation.** Prefer installing the approved dependency from a lockfile and executing its local binary rather than allowing `npx` to resolve from the network on every invocation: ```text node_modules/.bin/fsb-mcp-server ``` 5. **Remove automatic confirmation suppression where feasible.** Avoid `-y` for first-time installation or upgrades. Require an explicit user decision after displaying the exact version, source registry, and expected integrity value. 6. **Separate upgrades from normal operation.** Diagnostic commands and routine MCP host startup should never implicitly upgrade executable code. Provide a dedicated update command that: - Shows the installed and proposed versions. - Links to release notes. - Verifies integrity. - Requires explicit confirmation. - Supports rollback to the previously approved version. 7. **Constrain npm resolution.** Document the required registry an ...[truncated 516 chars]
