Skip to content

Fix public Moshcode session MCP gateway and discovery - #118

Merged
ralyodio merged 1 commit into
masterfrom
fix/mcp-apex-gateway
Sep 13, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/mcp-apex-gateway

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Moshcode's per-session MCP URLs use moshcode.sh, but that host returned 404 for the share endpoint and OAuth discovery. Route the product host's share and metadata paths to the existing app service, preserving the canonical resource URL and keeping OAuth consent/token issuance on app.moshcode.sh.

The destination is fixed; other tenant hosts, account pages, and caller-controlled upstream URLs cannot enter this gateway. Validation: all 253 tests pass, production build passes, and the built Next server returned real upstream discovery metadata and preserved the 401 bearer challenge for an unauthenticated MCP POST. Coordinated with moshcoder/moshcode#497; deploy after its scoped server changes pass review.

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

20 finding(s)

HIGH/CRITICAL: 3 | MEDIUM: 13 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution public/install.sh:302
HIGH sh-remote-script-execution public/install.sh:305
HIGH sh-remote-script-execution public/install.sh:432
MEDIUM js-open-redirect app/dashboard/[[...tab]]/page.tsx:67
MEDIUM js-open-redirect app/signup/page.tsx:38
MEDIUM js-open-redirect components/PitSearch.tsx:118
MEDIUM js-unescaped-html-sink components/Tenant.tsx:21
MEDIUM js-unescaped-html-sink components/Tenant.tsx:22
MEDIUM js-unescaped-html-sink components/Tenant.tsx:62
MEDIUM js-unescaped-html-sink components/Tenant.tsx:136
MEDIUM sql-template-interpolation lib/db.ts:1079
MEDIUM sql-template-interpolation lib/db.ts:1107
MEDIUM redos-nested-quantifier lib/markdown.ts:109
MEDIUM sh-remote-script-execution public/install.sh:123
MEDIUM sh-remote-script-execution public/install.sh:127
MEDIUM sh-remote-script-execution public/install.sh:146
LOW secret-generic-credential tests/domain-webhook-active.test.mjs:18
LOW secret-generic-credential tests/domain-webhook-active.test.mjs:25
LOW secret-generic-credential tests/domain-webhook-active.test.mjs:30
LOW secret-generic-credential tests/project-webhook-management.test.mjs:53

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio marked this pull request as draft September 13, 2026 10:10
@ralyodio
ralyodio marked this pull request as ready for review September 13, 2026 10:14
@ralyodio
ralyodio merged commit 0d51301 into master Sep 13, 2026
5 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.

1 participant