Repository navigation
chore: bump kotlin to 2.4.20 - #6256
Merged
Merged
Conversation
CVE-2026-53914 is an unsafe deserialization in the Kotlin build cache and affects org.jetbrains.kotlin:kotlin-gradle-plugin below 2.4.20. The NVD entry carries the CPE cpe:2.3:a:jetbrains:kotlin with an upper bound of 2.4.20, which matches every Kotlin artifact, so the platform SBOM check flags the kotlin-reflect 2.4.0 that hilla-typescript-generator brings even though only the Gradle plugin is affected. The Gradle plugin we build the Hilla Gradle plugin with is the artifact the advisory really covers, so both places move together: - kotlin.version 2.4.0 to 2.4.20 in the root POM, which drives kotlin-reflect, kotlin-stdlib and kotlin-stdlib-jdk8 in dependencyManagement and the kotlin-maven-plugin that compiles the Kotlin test sources - kotlinVersion 2.4.0 to 2.4.20 in the gradle-plugin and kotlin-gradle-test gradle.properties, which is the org.jetbrains.kotlin.jvm plugin version
|
Artur-
approved these changes
Sep 11, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6256 +/- ##
=========================================
Coverage 81.31% 81.31%
Complexity 2018 2018
=========================================
Files 343 343
Lines 14816 14816
Branches 2107 2107
=========================================
Hits 12048 12048
Misses 2477 2477
Partials 291 291
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Artur-
pushed a commit
that referenced
this pull request
Sep 11, 2026
## Summary The security integration tests continued right after clicking logout, while the logout request was still running. This made them fail at random on CI. The test helper now waits until the page reload that logout triggers has really happened. ## What changed `SecurityIT.clickLogout()` used to click the logout button and then only check that the root page was shown. That check was not enough: - Hilla's logout ends in a `window.location.replace()`, but right after the click the old document still reports `readyState` `complete`. - If the browser is already on the root page, the old page also shows the expected URL and header. So the assertion passed on the page that was still on screen, and the helper returned while the logout request was still in flight. Whatever the test did next raced that request: an `openResource()` was still served with the old session (no redirect to the login view), and a cookie read saw the Spring CSRF cookie cleared but not yet replaced. This is the failure seen in the `ITs (ubuntu-latest, security)` job of #6256, where the same commit passed on a re-run. `clickLogout()` now: 1. waits for the main view element to go stale — this happens exactly when the reloaded document commits, and 2. waits for the new document to finish loading. This is the same anchoring already used in `AbstractLoginTest`. The fix applies to every subclass of `SecurityIT` (context path, URL mapping, JWT, react-signals). No dedicated test was added for the wait itself. To make it fail reliably, `window.fetch` had to be patched to hold the logout request back for about a second, because on an idle machine the reload wins the race and the assertion passes with or without the wait. That is more machinery than the assertion is worth, and the wait is exercised by the existing logout tests on every run. ## Test summary | # | Status | What the test verifies | Why it matters | |---|--------|------------------------|----------------| | 1 | ✅ | After `logout()`, opening a protected resource redirects to the login view | This is the exact assertion that flaked; it proves the server session is really gone before the test continues | | 2 | ✅ | After `logout()`, the Spring CSRF cookie is present again | A cookie read that lands mid-logout sees the cookie cleared but not yet re-issued | | 3 | ✅ | After `logout()`, the JWT cookie is gone | Logout must drop the stateless credentials, not just the session | | 4 | ✅ | After `logout()`, the app behaves as anonymous again | Covers the stateless (JWT) setup end to end | | 5 | ❗ **gap** | `clickLogout()` returns only after the reloaded document commits, even when the logout request is slow | Deliberate: reproducing it needs `window.fetch` patched to delay the logout request, which is more machinery than the assertion is worth | Test methods that cover these rows (all pre-existing, none changed on this branch; they exercise the changed helper through `logout()`): - `SecurityIT.access_restricted_to_logged_in_users` — 1 - `SecurityIT.access_restricted_to_admin` — 1 - `com.vaadin.flow.spring.fusionsecurityjwt.SecurityIT.csrf_cookie` — 2 - `com.vaadin.flow.spring.fusionsecurityjwt.SecurityIT.jwt_cookie_reset_on_logout` — 3 - `com.vaadin.flow.spring.fusionsecurityjwt.SecurityIT.stateless_for_anonymous_after_logout` — 4 Left untested on purpose: the wait itself (row 5), for the reason given above. --------- Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Artur-
pushed a commit
that referenced
this pull request
Sep 11, 2026
Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Artur-
pushed a commit
that referenced
this pull request
Sep 11, 2026
Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
kotlin.version2.4.0→2.4.20in the root POM:kotlin-reflect,kotlin-stdlibandkotlin-stdlib-jdk8independencyManagement, plus thekotlin-maven-pluginthat compiles the Kotlin test sources ofhilla-typescript-generatorkotlinVersion2.4.0→2.4.20inpackages/java/gradle-plugin/gradle.propertiesandpackages/java/tests/gradle/kotlin-gradle-test/gradle.properties, which is theorg.jetbrains.kotlin.jvm(Kotlin Gradle plugin) versionContext
The Vaadin platform SBOM check reports CVE-2026-53914 (CRITICAL, unsafe deserialization in the Kotlin build cache) against
org.jetbrains.kotlin:kotlin-reflect:2.4.0, which reaches the platform throughhilla-typescript-generator. The advisory only affectsorg.jetbrains.kotlin:kotlin-gradle-plugin(< 2.4.20); the NVD entry carriescpe:2.3:a:jetbrains:kotlinwith an upper bound of2.4.20, and that CPE matches every Kotlin artifact, which is whykotlin-reflectgets flagged.So the
kotlin-reflectside is a false positive, but the Kotlin Gradle plugin we build the Hilla Gradle plugin with is the artifact the advisory really covers, and it sat on the same2.4.0. Both move to2.4.20here, which also drops the entry from the platform SBOM report instead of keeping it on the acknowledged list.Validation
mvn -B -pl packages/java/typescript-generator test→ 607 tests, 0 failures, 0 errors, 2 skipped, with the Kotlin test sources compiled bykotlin-maven-plugin2.4.20 (the TypeScript snapshot tests neednpm ci && npm run buildfirst, otherwise the generator CLI is missing)Unsupported class file major version 69). TheGradle testsjob covers both the functional tests and thekotlin-gradle-testITs.