Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

test(ci): static body in codex e2e mock route bridge (CodeQL #737) (#7559)

Diego Rodrigues de Sa e Souza8e383f5c02b3
diff --git a/tests/integration/codex-chat-reasoning-http-e2e.test.ts b/tests/integration/codex-chat-reasoning-http-e2e.test.ts
index e5a03749ff..b7172b2bb1 100644
--- a/tests/integration/codex-chat-reasoning-http-e2e.test.ts
+++ b/tests/integration/codex-chat-reasoning-http-e2e.test.ts
@@ -178,10 +178,12 @@ async function startRouteServer() {
body,
});
await bridgeRouteResponse(await chatRoute.POST(request), outgoing);
- } catch (error) {
- // Mock route bridge: surface the message, never the raw stack (js/stack-trace-exposure).
+ } catch {
+ // Mock route bridge: static body only — CodeQL flags ANY error-derived value here,
+ // including error.message / String(error) (js/stack-trace-exposure #736/#737). The test
+ // only asserts status===200, so the 500 body is never inspected.
outgoing.writeHead(500, { "content-type": "text/plain" });
- outgoing.end(error instanceof Error ? error.message : String(error));
+ outgoing.end("internal test route error");
}
});