mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
CodeQL js/stack-trace-exposure flags ANY error-derived value returned in the mock route bridge's 500 path, not just error.stack — swapping .stack for error.message (in #7354, alert #736) left sibling alert #737 open on the same line. Replace the body with a static string; the test only asserts status===200, so the 500 body is never inspected. Clears the last open CodeQL alert repo-wide, unblocking the Quality Ratchet on every PR. Companion to the release/v3.8.49 PR (merge-gates §8 — gate/CI-touching fix lands on main in the same session).
This commit is contained in:
committed by
GitHub
parent
66c56ece9e
commit
8e383f5c02
@@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user