T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:18- Finding
Mutable Remote npm Package Is Executed with API-Key Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:18-36,SKILL.md:89-90,references/usage-patterns.md:6-15,references/usage-patterns.md:92-94,scripts/validate.sh:43-45,scripts/validate.sh:55-57, andscripts/validate.sh:76-78
Vulnerability Type: Remote execution of an unpinned third-party dependency with sensitive environment access
Risk Level: HighVulnerable Code
SKILL.md:18-36:markdown - Network access for first-time `@covalenthq/goldrush-mcp-server` package fetch. - A GoldRush API key is available. ## Core Workflow Endpoint candidate inputs before finalizing: - Raw package form from docs: `npx @covalenthq/goldrush-mcp-server@latest` - Reliable non-interactive form: `npx -y @covalenthq/goldrush-mcp-server@latest` - This skill defaults to: - `npx -y @covalenthq/goldrush-mcp-server@latest` 1. Verify protocol/path from official source and probe: - Official source: `https://goldrush.dev/docs/goldrush-mcp-server` - probe candidate endpoint with: - `uxc --inject-env GOLDRUSH_API_KEY=$GOLDRUSH_API_KEY "npx -y @covalenthq/goldrush-mcp-server@latest" -h` 2. Configure credential for repeatable auth: - `uxc auth credential set goldrush-mcp --auth-type bearer --secret-env GOLDRUSH_API_KEY` - `uxc auth credential set goldrush-mcp --auth-type bearer --secret-op op://Engineering/goldrush/api-key` 3. Use fixed link command by default: - `command -v goldrush-mcp-cli` - If missing, create it: - `uxc link goldrush-mcp-cli "npx -y @covalenthq/goldrush-mcp-server@latest" --credential goldrush-mcp --inject-env GOLDRUSH_API_KEY={{secret}}`references/usage-patterns.md:6-15:bash uxc auth credential set goldrush-mcp --auth-type bearer --secret-env GOLDRUSH_API_KEY command -v goldrush-mcp-cli uxc link goldrush-mcp-cli "npx -y @covalenthq/goldrush-mcp-server@latest" --credential goldrush-mcp --inject-env GOLDRUSH_API_KEY={{secret}} goldrus ...[truncated 3301 chars]- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version, such as@covalenthq/goldrush-mcp-server@X.Y.Z. - Install the dependency through a committed lockfile and enforce package integrity hashes rather than resolving it afresh during each invocation.
- Remove
npx -y ...@latestfrom normal execution. Prefer a separately installed, verified executable or a reproducibly built artifact. - Change
scripts/validate.shto reject@latestand require the approved exact version in both documentation and link commands. - Establish a controlled dependency-update process that reviews release changes and lockfile differences before changing the pinned version.
- Run the MCP server in a sandbox with minimal filesystem access, no unnecessary inherited environment variables, and outbound network access restricted to required GoldRush endpoints where practical.
- Inject a narrowly scoped API key only for actual API operations. Avoid exposing it during package installation or unauthenticated help/schema discovery if the server supports those operations without credentials.
- Apply service-side restrictions such as minimum API scopes, usage limits, monitoring, rotation, and rapid revocation procedures.
- Replace
