mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Java: remove Supplier.get model
This commit is contained in:
@@ -4,9 +4,3 @@ extensions:
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["java.util.function", "Predicate", False, "test", "(Object)", "", "Argument[-1]", "regex-use[0]", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["java.util.function", "Supplier", False, "get", "()", "", "Argument[-1]", "ReturnValue", "value", "manual"]
|
||||
|
||||
@@ -77,10 +77,6 @@ public class Test {
|
||||
AtomicReference ar = new AtomicReference(source());
|
||||
sink(ar.get()); // $hasValueFlow
|
||||
|
||||
// java.util.function
|
||||
Supplier<Double> sup = (Supplier)source();
|
||||
sink(sup.get()); // $hasValueFlow
|
||||
|
||||
// java.util
|
||||
StringJoiner sj1 = new StringJoiner(",");
|
||||
sink(sj1.add((CharSequence)source())); // $hasTaintFlow
|
||||
|
||||
@@ -147,6 +147,7 @@ class TopJdkApi extends SummarizedCallableBase {
|
||||
* `java.lang.Throwable#printStackTrace()`: should probably not be a general step, but there might be specialised queries that care
|
||||
* `java.util.function.Consumer#accept(Object)`: specialized lambda flow
|
||||
* `java.util.function.Function#apply(Object)`: specialized lambda flow
|
||||
* `java.util.function.Supplier#get()`: lambda flow
|
||||
* `java.util.stream.Collectors#joining(CharSequence)`: cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well
|
||||
* `java.util.stream.Collectors#toMap(Function,Function)`: specialized collectors flow
|
||||
* `java.util.stream.Stream#collect(Collector)`: handled separately on a case-by-case basis as it is too complex for MaD
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
| java.lang.Throwable#printStackTrace() | no manual model |
|
||||
| java.util.function.Consumer#accept(Object) | no manual model |
|
||||
| java.util.function.Function#apply(Object) | no manual model |
|
||||
| java.util.function.Supplier#get() | no manual model |
|
||||
| java.util.stream.Collectors#joining(CharSequence) | no manual model |
|
||||
| java.util.stream.Collectors#toMap(Function,Function) | no manual model |
|
||||
| java.util.stream.Stream#collect(Collector) | no manual model |
|
||||
|
||||
Reference in New Issue
Block a user