T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned and Unauditable Executable npm Dependency## Vulnerability Details **File Location**: `SKILL.md:9-17`, `SKILL.md:31-35`, and `README.md:21-32` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code `SKILL.md:9-17`: ```yaml requires: bins: - "node" - "npm" - "curl" env: - "DESHELL_API_KEY" - "DESHELL_PROXY_URL" ``` `SKILL.md:14-17`: ```yaml install: - kind: node package: "@deshell/mcp" bins: [deshell] ``` `SKILL.md:31-35`: ```bash npm install @deshell/mcp ``` `README.md:21-32`: ```markdown ## Installation ### Via NPM ```bash npm install -g @deshell/mcp ``` **Security Note:** Before installing, verify the package provenance: - Check the package details: `npm view @deshell/mcp` - Visit the package page: https://www.npmjs.com/package/@deshell/mcp - Ensure you're installing from the official source ``` ### Technical Analysis The project does not contain the executable implementation of the `deshell` command. Instead, it directs users or an agent environment to install `@deshell/mcp` without specifying an exact version or an integrity hash. Consequently, the code audited in this repository does not determine the behavior ultimately executed. A later package release could differ from the version reviewed by a user. npm installation may also execute package lifecycle scripts, allowing package-controlled code to run during installation rather than only when the `deshell` command is invoked. The README recommends manually reviewing npm package metadata, but this does not provide reproducible integrity verification and does not prevent a compromised or malicious future release from being installed. The installed command is expected to access sensitive configuration, including `DESHELL_API_KEY`, and perform network requests, increasing the consequences of a supply-chain compromise. ### Attack Path 1. An attacker compromises ...[truncated 1699 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@deshell/mcp` to an exact, audited version rather than relying on npm's latest compatible release. 2. Commit a lockfile containing npm integrity metadata and use a reproducible installation command such as `npm ci`. 3. Verify the package tarball against a separately published checksum or cryptographic signature. 4. Publish or vendor the relevant CLI source so reviewers can inspect the code that handles credentials, headers, URLs, and network requests. 5. Disable npm lifecycle scripts during installation where functionality permits, for example with `--ignore-scripts`. 6. Install and execute the CLI under a minimally privileged account with access only to the required API key and network destinations. 7. Restrict `DESHELL_PROXY_URL` to trusted HTTPS endpoints and avoid placing unrelated secrets in `DESHELL_EXTRA_HEADERS`. 8. Document the exact package version, expected publisher identity, source repository, and verification procedure. 9. Add dependency monitoring and promptly revoke or rotate `DESHELL_API_KEY` credentials if package compromise is suspected.
