Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const server = new McpServer({ | ||
| name: "sentry-code-mode-experiment", | ||
| version: "0.1.0", | ||
| }); |
There was a problem hiding this comment.
High severity vulnerability may affect your project—review required:
Line 117 lists a dependency (@modelcontextprotocol/server) with a known High severity vulnerability.
ℹ️ Why this matters
Affected versions of @modelcontextprotocol/sdk and @modelcontextprotocol/server are vulnerable to Allocation of Resources Without Limits or Throttling. McpServer places no limit on how many array elements and object keys it validates in tool-call arguments. A single unauthenticated HTTP request within the default 4 MiB body limit can exhaust the Node.js heap during validation and crash the server process (denial of service). After upgrading, also set the opt-in maxToolInputElements McpServer option and lower maxRequestBodySize.
References: GHSA
To resolve this comment:
Check if you expose the McpServer over an HTTP transport (Streamable HTTP, SSE, or createMcpHandler) rather than stdio only and it registers tools that accept input, especially arrays or records.
- If you're affected, upgrade this dependency to at least version 2.3.0 at pnpm-lock.yaml.
- If you're not affected, comment
/fp we don't use this [condition]
💬 Ignore this finding
To ignore this, reply with:
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
You can view more details on this finding in the Semgrep AppSec Platform here.
| const server = new ModernMcpServer(serverInfo, { | ||
| maxToolInputElements: MAX_MCP_TOOL_INPUT_ELEMENTS, | ||
| }); |
There was a problem hiding this comment.
High severity vulnerability may affect your project—review required:
Line 161 lists a dependency (@modelcontextprotocol/server) with a known High severity vulnerability.
ℹ️ Why this matters
Affected versions of @modelcontextprotocol/sdk and @modelcontextprotocol/server are vulnerable to Allocation of Resources Without Limits or Throttling. McpServer places no limit on how many array elements and object keys it validates in tool-call arguments. A single unauthenticated HTTP request within the default 4 MiB body limit can exhaust the Node.js heap during validation and crash the server process (denial of service). After upgrading, also set the opt-in maxToolInputElements McpServer option and lower maxRequestBodySize.
References: GHSA
To resolve this comment:
Check if you expose the McpServer over an HTTP transport (Streamable HTTP, SSE, or createMcpHandler) rather than stdio only and it registers tools that accept input, especially arrays or records.
- If you're affected, upgrade this dependency to at least version 2.3.0 at pnpm-lock.yaml.
- If you're not affected, comment
/fp we don't use this [condition]
💬 Ignore this finding
To ignore this, reply with:
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
You can view more details on this finding in the Semgrep AppSec Platform here.
2fbe908 to
c74cfe6
Compare
7fb178a to
49d10be
Compare
The Cloudflare test plugin still used an older Miniflare/workerd than Wrangler, so updating the direct dependency alone left different runtimes in local and integration tests. Switch to `@cloudflare/vitest-plugin` 1.4.6 and align Miniflare/workerd with Wrangler. Miniflare 5 removed `fetchMock`; an Undici outbound service preserves the existing fixtures and `disableNetConnect()` policy. This is the prerequisite for #1670 (HTTP Code Mode), followed by #1675 (agent evals). Only seven test/dependency files move here; the broker, permissions and production integration remain in #1670. Validated independently on Node 24: **443 Cloudflare tests across 34 files**, root typechecks, lint and frozen install. The earlier full workspace run had unrelated CLI fixture/platform failures; CLI fixes are excluded. No deployment performed.
c74cfe6 to
9be4926
Compare
Code Mode is the MCP equivalent of
sentry api: agents can use published API operations without a dedicated MCP tool.The client's agent writes JavaScript; our Cloudflare sandbox executes authenticated HTTP calls and returns the result.
For example: “Copy this dashboard for two projects, preserving its widgets and filters.” The existing tool catalog cannot do this; Code Mode can.
search_sentry_apidiscovers the schema andexecute_sentry_coderuns the program. This version is HTTP-only; the SDK remains future work.Prerequisite #1676 is merged. Stack: this PR → #1675 (agent evals). Runtime and permission safety tests remain here.
Permissions
The Sentry token authenticates API calls; its OAuth scopes and the user's Sentry permissions set the maximum access.
The permission screen controls which of those actions this MCP connection may perform, without changing the token or its scopes.
/mcpcovers organizations authorized by the Sentry token;/mcp/{org}is restricted to that organization. Project-scoped connections do not expose Code Mode.Validation and before production
Previously passed: 469 hosted Cloudflare tests + 26 isolated runtime/access tests, root typechecks, lint, documentation links, frozen install and a production Wrangler dry-run. This extraction preserves the runtime and test sources byte-for-byte. The prerequisite independently passes 443 Cloudflare tests, root typechecks, lint and frozen install; the new documentation links/format also pass.
Pending before production: explicit execution closure for unawaited calls and timeouts, plus hosted OAuth-to-API authorization and CPU/termination verification. Local probes show that returning a result or timeout does not itself cancel work; a write already accepted upstream cannot be rolled back. The lifecycle investigation records the evidence and limits.
CI on the updated stack is pending. No production deployment performed. The previous full workspace run had unrelated CLI fixture/platform failures; CLI fixes are excluded.