fix: harden server reliability and OAuth security

This commit is contained in:
kst
2026-08-21 17:19:13 +09:00
parent b2aab2c520
commit 080030c764
16 changed files with 946 additions and 100 deletions
+19
View File
@@ -67,6 +67,25 @@ describe("remote development MCP server", () => {
expect(response.status).toBe(401);
});
it("authenticates MCP requests before parsing their JSON body", async () => {
const unauthenticated = await fetch(endpoint, {
method: "POST",
headers: { "content-type": "application/json" },
body: "{",
});
expect(unauthenticated.status).toBe(401);
const authenticated = await fetch(endpoint, {
method: "POST",
headers: {
authorization: "Bearer integration-secret",
"content-type": "application/json",
},
body: "{",
});
expect(authenticated.status).toBe(400);
});
it("lists tools and executes script and file workflows", async () => {
const client = new Client({ name: "integration-test", version: "1.0.0" });
const transport = new StreamableHTTPClientTransport(endpoint, {