Skip to content

[Snyk] Security upgrade io.ktor:ktor-server-netty from 1.5.3 to 2.0.0#322

Open
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-574e940861cc55055cac7e6200ec9085
Open

[Snyk] Security upgrade io.ktor:ktor-server-netty from 1.5.3 to 2.0.0#322
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-574e940861cc55055cac7e6200ec9085

Conversation

@caniszczyk

Copy link
Copy Markdown

snyk-top-banner

Snyk has created this PR to fix 3 vulnerabilities in the maven dependencies of this project.

Snyk changed the following file(s):

  • builders/testdata/java/ktordemo/pom.xml

Vulnerabilities that will be fixed with an upgrade:

Issue Score Upgrade
high severity Allocation of Resources Without Limits or Throttling
SNYK-JAVA-IONETTY-18170202
  828   io.ktor:ktor-server-netty:
1.5.3 -> 2.0.0
Major version upgrade Proof of Concept
high severity Allocation of Resources Without Limits or Throttling
SNYK-JAVA-IONETTY-18170204
  828   io.ktor:ktor-server-netty:
1.5.3 -> 2.0.0
Major version upgrade Proof of Concept
high severity Allocation of Resources Without Limits or Throttling
SNYK-JAVA-IONETTY-18170213
  721   io.ktor:ktor-server-netty:
1.5.3 -> 2.0.0
Major version upgrade No Known Exploit

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Allocation of Resources Without Limits or Throttling

@caniszczyk

Copy link
Copy Markdown
Author

Merge Risk: High

The upgrade from Ktor 1.5.3 to 2.0.0 is a major version change with significant and extensive breaking changes that will require substantial code modification.

Key Breaking Changes:

  • Feature Renamed to Plugin: The core concept of ApplicationFeature has been universally renamed to Plugin. This affects all plugin installations and custom plugin implementations. Imports must be changed from io.ktor.features.* to io.ktor.server.plugins.*.

  • Package and Module Restructuring: To improve consistency, server-specific code has been moved into the io.ktor.server.* package. This requires updating many import statements throughout an application.

  • Testing API Overhaul: The testing API has been completely rewritten. The withTestApplication function is removed and replaced by a new testApplication function, which changes how test clients are created and how requests are made. Test suites will need to be migrated to the new API.

  • Content Negotiation Refactoring: The ContentNegotiation feature is no longer in ktor-server-core. It has been moved to a separate ktor-server-content-negotiation artifact, and serialization libraries have been moved to ktor-serialization-* artifacts. This requires updating build dependencies and imports.

  • WebSocket Package Move: WebSocket code has been moved from io.ktor.http.cio.websocket.* to its own io.ktor.websocket.* package, requiring import updates.

Source: Ktor 2.0 Migration Guide.

Recommendation: This is a high-effort migration. Developers must carefully follow the official migration guide to update package imports, dependencies, plugin configurations, and rewrite all server tests. Automated migration tools offered by IntelliJ IDEA may assist but manual intervention is expected.

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants