Skip to content

test(security): fix CodeQL #689 — Kimi Web URL host substring sanitization (main) - #6048

Merged
diegosouzapw merged 1 commit into
mainfrom
fix/cq689-kimi-url-substring-main
Jul 3, 2026
Merged

diegosouzapw merged 1 commit into
mainfrom
fix/cq689-kimi-url-substring-main

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Ports the fix already merged into release/v3.8.44 (PR #5928) directly to main, so code-scanning alert #689 (js/incomplete-url-substring-sanitization) closes on the default branch instead of waiting for the next release→main merge.

Change

Single test file. Parses the URL and asserts on the exact hostname rather than a substring match:

  • includes("www.kimi.com") also accepts hostile hosts like www.kimi.com.evil.net or evil.net/?x=www.kimi.com.
  • Now: new URL(result.url).hostname === "www.kimi.com" (2 asserts → 3 stronger asserts, no weakening).

Validation

node --import tsx/esm --test tests/unit/web-cookie-providers-new.test.ts → 38 pass / 0 fail.

When release/v3.8.44 later merges to main, both sides carry the identical change, so git auto-resolves with no conflict.

…ation

Port the release/v3.8.44 fix to main so the code-scanning alert closes on
the default branch. Parse the URL and assert on the exact hostname instead
of a substring match — `includes("www.kimi.com")` would also accept a
hostile host like `www.kimi.com.evil.net` or `evil.net/?x=www.kimi.com`
(js/incomplete-url-substring-sanitization).
@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!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit 5bc11f4 into main Jul 3, 2026
6 of 7 checks passed
@diegosouzapw
diegosouzapw deleted the fix/cq689-kimi-url-substring-main branch July 3, 2026 05:02
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: failure

Coverage artifact was not available for this run.

PR Test Policy

This PR changes production code in src/, open-sse/, electron/, or bin/ without accompanying automated tests.

HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…substring sanitization (cheaper-inference#6048)

Port the release/v3.8.44 fix to main so the code-scanning alert closes on
the default branch. Parse the URL and assert on the exact hostname instead
of a substring match — `includes("www.kimi.com")` would also accept a
hostile host like `www.kimi.com.evil.net` or `evil.net/?x=www.kimi.com`
(js/incomplete-url-substring-sanitization).
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
…substring sanitization (cheaper-inference#6048)

Port the release/v3.8.44 fix to main so the code-scanning alert closes on
the default branch. Parse the URL and assert on the exact hostname instead
of a substring match — `includes("www.kimi.com")` would also accept a
hostile host like `www.kimi.com.evil.net` or `evil.net/?x=www.kimi.com`
(js/incomplete-url-substring-sanitization).
KooshaPari added a commit to KooshaPari/OmniRoute that referenced this pull request Aug 11, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…substring sanitization (cheaper-inference#6048)

Port the release/v3.8.44 fix to main so the code-scanning alert closes on
the default branch. Parse the URL and assert on the exact hostname instead
of a substring match — `includes("www.kimi.com")` would also accept a
hostile host like `www.kimi.com.evil.net` or `evil.net/?x=www.kimi.com`
(js/incomplete-url-substring-sanitization).
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