Skip to content

Scan all JVM Kotlin modules in CodeQL#18

Merged
IRus merged 2 commits into
mainfrom
fix/codeql-scan-all-jvm-modules
Jul 19, 2026
Merged

Scan all JVM Kotlin modules in CodeQL#18
IRus merged 2 commits into
mainfrom
fix/codeql-scan-all-jvm-modules

Conversation

@IRus

@IRus IRus commented Jul 19, 2026

Copy link
Copy Markdown
Member

The CodeQL manual-build compile step only compiled 8 of the 12 modules that produce JVM Kotlin classes. CodeQL's Kotlin extractor only sees code that is compiled during the build step, so these modules were never scanned:

  • :samples-cli (wasm-cli) — CLI entrypoint
  • :test-support-wat (wasm-wat) — WAT lexer and binary writer that parse untrusted text input
  • :annotations (wasm-annotations)
  • :benchmarks

The WAT parser and CLI are exactly the kind of untrusted-input surface the security-extended query pack targets, and none of it was visible to the scan.

New task list in the compile step:

:core:compileKotlinJvm :snapshot:compileKotlinJvm :wasi:compileKotlinJvm
:bindgen-api:compileKotlinJvm :bindgen-runtime:compileKotlinJvm
:bindgen-ksp:classes :gradle-plugin:classes :tck:compileKotlinJvm
:annotations:compileKotlinJvm :samples-cli:compileKotlin
:test-support-wat:compileKotlinJvm :benchmarks:compileKotlinJvm

Inclusion rationale: every module with a JVM Kotlin compilation is now compiled — KMP modules via compileKotlinJvm, the pure-JVM :samples-cli via compileKotlin (matching how the extractor picks up :bindgen-ksp/:gradle-plugin). :footprint-baseline and :footprint-core declare only an iosArm64 target, so they have no JVM compilation and cannot be extracted by the java-kotlin scan.

Verified locally: the full gradlew command from the edited step builds successfully, and all four new task paths were confirmed with --dry-run.

Note: this touches the same run block as the sibling PR adding cache-busting flags to the compile step, so a trivial merge conflict is possible.

🤖 Generated with Claude Code

IRus and others added 2 commits July 19, 2026 11:49
The manual-build compile step only covered 8 of the 12 JVM-compiling
modules, so CodeQL never extracted :samples-cli (CLI entrypoint),
:test-support-wat (WAT lexer/binary writer parsing untrusted text),
:annotations, or :benchmarks. Add their compile tasks so the
security-extended queries see that code.

:footprint-baseline and :footprint-core declare only an iosArm64
target and have no JVM compilation, so they stay out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@IRus
IRus merged commit ddea5ee into main Jul 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant