Skip to content

Conversation

@joefarebrother
Copy link
Contributor

Adds remote flow sources for parameters of WebSocketHandler methods, and taint steps for related types.

@joefarebrotherjoefarebrother requested a review from a team as a code ownerDecember 9, 2025 13:50
CopilotAI review requested due to automatic review settings December 9, 2025 13:50
@@ -0,0 +1,16 @@
import java
import semmle.code.java.dataflow.DataFlow

Check warning

Code scanning / CodeQL

Redundant import Warning test

Redundant import, the module is already imported inside
semmle.code.java.dataflow.FlowSources
.
Redundant import, the module is already imported inside
utils.test.InlineFlowTest
.
@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
- `Spring <https://spring.io/>`_,``org.springframework.*``,38,486,143,26,,28,14,,35+ `Spring <https://spring.io/>`_,``org.springframework.*``,47,492,143,26,,28,14,,35- Totals,,330,26361,2656,404,16,128,33,1,409+ Totals,,339,26367,2656,404,16,128,33,1,409
  • Changes to framework-coverage-java.csv:
+ org.springframework.web.socket,,9,6,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9,6,

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds remote flow source models for Spring Framework's WebSocket API, enabling taint tracking through WebSocket handler methods. The changes model parameters of WebSocketHandler and AbstractWebSocketHandler methods as remote sources, and add taint propagation steps for related WebSocket types.

Key changes:

  • Adds remote flow source models for WebSocketHandler interface methods and AbstractWebSocketHandler class methods
  • Adds taint summary models for WebSocketSession and WebSocketMessage getter methods
  • Includes comprehensive test stubs and test cases to validate the new models

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
java/ql/lib/ext/org.springframework.web.socket.model.ymlDefines source models for WebSocketHandler methods and summary models for taint propagation through WebSocket-related getters
java/ql/lib/change-notes/2025-12-08-spring-websocket-handler.mdDocuments the addition of remote flow sources from the org.springframework.web.socket package
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/WebSocketHandler.javaTest stub for the WebSocketHandler interface
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/handler/AbstractWebSocketHandler.javaTest stub for the AbstractWebSocketHandler abstract class
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/handler/TextWebSocketHandler.javaTest stub for the TextWebSocketHandler class
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/WebSocketSession.javaTest stub for the WebSocketSession interface with various getter methods
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/WebSocketMessage.javaTest stub for the generic WebSocketMessage interface
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/AbstractWebSocketMessage.javaTest stub for the AbstractWebSocketMessage base class
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/TextMessage.javaTest stub for TextMessage with asBytes() method
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/BinaryMessage.javaTest stub for BinaryMessage
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/PongMessage.javaTest stub for PongMessage
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/CloseStatus.javaTest stub for CloseStatus class
java/ql/test/stubs/springframework-5.8.x/org/springframework/web/socket/WebSocketExtension.javaTest stub for WebSocketExtension class
java/ql/test/library-tests/frameworks/spring/websocket/Test.javaTest cases validating taint flow through WebSocket handler methods
java/ql/test/library-tests/frameworks/spring/websocket/test.qlTest query configuration for inline flow tests
java/ql/test/library-tests/frameworks/spring/websocket/test.expectedExpected test results file (empty, will be generated)
java/ql/test/library-tests/frameworks/spring/websocket/optionsCompiler options for the test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@joefarebrother