Skip to content

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

Merged
diegosouzapw merged 1 commit into
release/v3.8.49from
fix/codeql-737-static-test-body
Jul 17, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.49from
fix/codeql-737-static-test-body

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

What

Replaces the error-derived 500 body in the codex Responses e2e mock route bridge (tests/integration/codex-chat-reasoning-http-e2e.test.ts, line 184) with a static string.

Why

CodeQL js/stack-trace-exposure flags any error-derived value returned from that catch, not only error.stack:

#737 is currently the only open CodeQL alert in the whole repo, and check:codeql-ratchet counts alerts repo-wide → it keeps Quality Ratchet red on every open PR. This closes it at the source.

Fix

} catch {
  // static body only — CodeQL flags any error-derived value here
  outgoing.writeHead(500, { "content-type": "text/plain" });
  outgoing.end("internal test route error");
}

The test only asserts status === 200, so the 500 body is never inspected — no assertion weakened.

Validation (Hard Rule #18)

node --import tsx/esm --test tests/integration/codex-chat-reasoning-http-e2e.test.ts → 1 pass, 0 fail.

Companion PR opens against main (the file exists on both branches) per merge-gates §8.

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.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@diegosouzapw
diegosouzapw merged commit 8b82110 into release/v3.8.49 Jul 17, 2026
20 checks passed
@diegosouzapw
diegosouzapw deleted the fix/codeql-737-static-test-body branch July 19, 2026 21:01
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…inference#737) (cheaper-inference#7558)

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 cheaper-inference#7354, alert cheaper-inference#736) left sibling alert cheaper-inference#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.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…inference#737) (cheaper-inference#7558)

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 cheaper-inference#7354, alert cheaper-inference#736) left sibling alert cheaper-inference#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.
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