Skip to content

test(security): compare the parsed host instead of a URL substring (CodeQL #1136) - #16616

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/codeql-1136-url-host-assert
Oct 15, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/codeql-1136-url-host-assert

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Corrige o alerta CodeQL #1136 (js/incomplete-url-substring-sanitization) em tests/unit/claude-passthrough-foreign-server-tool-use-3685.test.ts:203.

A asserção negativa !captured.url.includes("api.anthropic.com") passa a comparar new URL(captured.url).hostname, de modo que o host é verificado e não uma substring da URL. Só teste; nenhum código de produção muda.

Validação: o arquivo roda 6/6 com env hermética (env -u OMNIROUTE_API_KEY, DATA_DIR novo); eslint e prettier limpos.

⚠️ base-red inherited: #15306

@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit b7e328f into release/v3.8.52 Oct 15, 2026
35 of 56 checks passed
@diegosouzapw
diegosouzapw deleted the fix/codeql-1136-url-host-assert branch October 18, 2026 23:50
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