Skip to content

fix: patch mcp vitest audit and node runtime#98

Merged
dhairyashiil merged 5 commits into
calcom:mainfrom
dhairyashiil:codex/fix-vitest-audit
Jun 2, 2026
Merged

fix: patch mcp vitest audit and node runtime#98
dhairyashiil merged 5 commits into
calcom:mainfrom
dhairyashiil:codex/fix-vitest-audit

Conversation

@dhairyashiil
Copy link
Copy Markdown
Member

@dhairyashiil dhairyashiil commented Jun 2, 2026

Summary

Patches the repo-wide Security Audit failure by moving the MCP server vitest dev dependency to exact version 4.1.8, which is in the patched range for GHSA-5xrq-8626-4rwp.

Also removes broad semver ranges from direct apps/mcp-server dependencies by pinning them to the explicit versions previously declared in package.json:

  • @modelcontextprotocol/sdk: 1.12.1
  • @vercel/postgres: 0.10.0
  • zod: 3.24.4
  • tsx: 4.19.4

Important scope note: vitest is the only direct dependency intentionally upgraded, and that upgrade is required for the critical security advisory. This PR does not touch the mobile app.

Follow-up from review: vitest@4.1.8 requires Node 20+, so the MCP server package now declares node >=22, the README prerequisite matches it, and the MCP Docker runtime uses node:22-slim. I chose Node 22 instead of Node 20 because Node 20 is EOL as of 2026-03-24, while Node 22 is still LTS: https://nodejs.org/en/about/previous-releases

Docker follow-up: while validating the Node 22 runtime image locally, the MCP Docker build exposed two Dockerfile issues: the Bun builder image needed Python/build tools for node-gyp, and the final stage tried to copy a missing bun.lock*. This PR now fixes both so the MCP Docker image builds successfully.

Validation

  • bun install --frozen-lockfile
  • bun --filter @calcom/mcp-server test
  • bun --filter @calcom/mcp-server typecheck
  • bun --filter @calcom/mcp-server lint
  • bun --filter @calcom/mcp-server build
  • bun audit --prod --audit-level=critical
  • git diff --check
  • Node 22 MCP stdio smoke: built server returned an initialize result with serverInfo.name = calcom-mcp-server and protocol 2024-11-05
  • DOCKER_CONFIG=$(mktemp -d) docker build -f Dockerfile . from apps/mcp-server

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

@dhairyashiil is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@dhairyashiil dhairyashiil changed the title fix: update vitest for security audit fix: pin mcp deps and patch vitest audit Jun 2, 2026
Comment thread apps/mcp-server/package.json
Comment thread apps/mcp-server/package.json
@dhairyashiil dhairyashiil marked this pull request as ready for review June 2, 2026 18:04
@dhairyashiil dhairyashiil enabled auto-merge (squash) June 2, 2026 18:05
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/mcp-server/package.json
@dhairyashiil dhairyashiil changed the title fix: pin mcp deps and patch vitest audit fix: patch mcp vitest audit and node runtime Jun 2, 2026
Copy link
Copy Markdown
Contributor

@volnei volnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dhairyashiil dhairyashiil merged commit cbe2592 into calcom:main Jun 2, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants