Files
codeql/java/ql
Anders Fugmann d0e652159e Fix internal query violations and update test expectations for K2
- Make registerExtractorExtension protected (called from subclass)
- Change codeQlExtensionReceiver from var to val (setter unused)
- Update integration test expected files for K2 behavior:
  - Add DB-CHECK.expected for known K2 cross-extractor consistency errors
  - Update result expectations for K2 type resolution differences
- Update language test expected files (pathsanitizer, CWE-312):
  - K2 resolves Path.toString() and CharSequence.toString() with
    different callable IDs than the Java extractor, causing
    callableBinding consistency errors and lost taint flow results

These are pre-existing K2 issues documented in
github/codeql-kotlin-team#196, originally worked around by pinning
tests to -language-version 1.9 in PR #16554 (May 2024). Kotlin 2.4.0
drops 1.9 support, forcing us to accept these known K2 differences.

Verified: the same DB-CHECK errors occur with the released CodeQL CLI
(v2.23.9) and Kotlin 2.3.20 when using -language-version 2.0,
confirming these are K2 behavioral differences unrelated to our 2.4.0
extractor changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-10 15:12:24 +02:00
..