-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Add MaDs for java.lang.ScopedValue
#20339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: idrissrio/java-upgrade-fix
Are you sure you want to change the base?
Conversation
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,10,4621,260,99,,9,,,26
+ Java Standard Library,``java.*``,10,4626,260,99,,9,,,26
- Totals,,330,26328,2656,404,16,128,33,1,409
+ Totals,,330,26333,2656,404,16,128,33,1,409
- java.lang,38,3,783,,13,,,,,,1,,,,,,,,,,,,8,,,,11,,,4,,,1,,,,,,,,,,,,,,,,3,,,506,277
+ java.lang,38,3,788,,13,,,,,,1,,,,,,,,,,,,8,,,,11,,,4,,,1,,,,,,,,,,,,,,,,3,,,508,280 |
ef9b662
to
9bc14e0
Compare
There was a problem hiding this 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 support for modeling and testing dataflow through Java's new ScopedValue
API, introduced in Java 25.
- Adds MaD (Models as Data) entries for ScopedValue operations to enable dataflow tracking
- Creates comprehensive test cases that verify taint propagation through scoped value bindings and retrievals
- Configures the test environment to use Java 25 with preview features enabled
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
java/ql/lib/ext/java.lang.scoped.model.yml | Defines dataflow models for ScopedValue API methods including value binding and retrieval |
java/ql/test/library-tests/dataflow/scoped-values/test.ql | Test query that tracks taint flow from command line arguments to sink methods |
java/ql/test/library-tests/dataflow/scoped-values/ScopedValueFlowTest.java | Java test code demonstrating various ScopedValue usage patterns for dataflow testing |
java/ql/test/library-tests/dataflow/scoped-values/test.expected | Expected test results showing detected dataflow paths |
java/ql/test/library-tests/dataflow/scoped-values/options | Compiler options to enable Java 25 preview features |
java/ql/test/library-tests/dataflow/scoped-values/ScopedValueFlowTest.java
Outdated
Show resolved
Hide resolved
4c987d7
to
2c076f6
Compare
java.lang.scoped
java.lang.ScopedValue
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
a34b362
to
5d2268f
Compare
This pull request adds support for modeling and testing dataflow through Java's new
ScopedValue
API, introduced in Java 25.Java Docs - Scoped Value: https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/ScopedValue.html
Java Docs - Carrier: https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/ScopedValue.Carrier.html
JEP: https://openjdk.org/jeps/506