T08 · Insecure Dependencies
- Location
references/mcp.md:28- Finding
Unpinned MCP Packages Are Downloaded and Executed Through npx
- Content
View full analysis
- Remediation
View remediation
", "/Users/me/projects" ] } } ``` 2. Replace `@playwright/mcp@latest` with an exact version. Do not use `latest`, caret ranges, tilde ranges, or other mutable version selectors for automatically executed tools. 3. Prefer installing MCP packages during a controlled build step rather than resolving them dynamically when the agent starts. Commit the relevant lockfile and verify package integrity. 4. Use a private or allowlisted package registry where appropriate, with provenance, signature, and integrity verification enabled. 5. Run each MCP server in an isolated container or restricted subprocess with: - A dedicated low-privilege operating-system identity. - Read-only mounts wherever possible. - Access only to the specific required project subtree. - An explicit outbound-network allowlist. - CPU, memory, process, and execution-time limits. 6. Pass only the credentials required by that MCP server. Avoid inheriting the complete parent environment. 7. Scope `GITHUB_TOKEN` to the minimum repositories and operations required, use short-lived tokens, and rotate the token if package compromise is suspected. 8. Avoid broad MCP wildcard approval where possible. Allow only specific reviewed operations instead of `mcp__server__*`. 9. Document an explicit package-review and update procedure so upgrades are tested and approved before the pinned version is changed. ]]>
