T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party Package Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-29` and `SKILL.md:37-42` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```json Add to `.mcp.json` in your project or `~/.claude/mcp.json`: { "mcpServers": { "canvas": { "command": "npx", "args": ["-y", "canvas-parent-mcp"], "env": { "CANVAS_BASE_URL": "https://cms.instructure.com" } } } } ``` The alternative installation method is also unpinned: ```bash git clone https://github.com/chrischall/canvas-parent-mcp cd canvas-parent-mcp npm install && npm run build ``` ### Technical Analysis The recommended configuration invokes `npx -y canvas-parent-mcp` without specifying an exact package version or integrity value. Consequently, the package version resolved when the MCP server starts may differ from the version that was originally reviewed. The `-y` option automatically accepts package installation, reducing the opportunity for the user to inspect the resolved package before execution. The source-based installation method similarly clones the current repository head rather than a reviewed commit or signed release. Running `npm install` also introduces transitive npm dependencies whose security and integrity cannot be evaluated from this project because the audited artifact contains only `SKILL.md`. This is a supply-chain weakness rather than evidence that the current upstream package is malicious. The external package's implementation was not included in the audit and therefore could not be independently verified. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the source repository, or a transitive dependency. 2. The attacker publishes a modified package version or changes the repository head. 3. A user starts the configured MCP server or performs the documented source installation. 4. `npx` downloads the currently resolved package, or the user clo ...[truncated 948 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `canvas-parent-mcp` to an exact, reviewed version rather than resolving the latest release: ```json "args": ["-y", "canvas-parent-mcp@<reviewed-version>"] ``` 2. Record and verify package integrity and provenance where supported. 3. For source installation, check out a specific reviewed commit or signed release tag instead of the repository head. 4. Commit and enforce a dependency lockfile for source builds, and use deterministic installation such as `npm ci`. 5. Review package and transitive-dependency updates before deployment rather than updating automatically. 6. Remove automatic acceptance with `-y` where practical so package resolution remains visible to the user. 7. Run the MCP server in a sandbox with restricted filesystem, environment, and network permissions. 8. Expose only the secrets required by the selected authentication mode to the MCP process. ]]>
