Java: Identify more APIs as supported in the telemetry queries (as QL defined sources).

This commit is contained in:
Michael Nebel
2024-04-22 11:21:13 +02:00
parent 06f987ad58
commit acb2bbb2a3
11 changed files with 143 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
/** Provides classes and predicates related to handling APIs from external libraries. */
private import java
private import semmle.code.java.dataflow.ApiSources as ApiSources
private import semmle.code.java.dataflow.DataFlow
private import semmle.code.java.dataflow.ExternalFlow
private import semmle.code.java.dataflow.FlowSources
@@ -69,9 +70,7 @@ class ExternalApi extends Callable {
}
pragma[nomagic]
predicate isSource() {
this.getAnOutput() instanceof RemoteFlowSource or sourceNode(this.getAnOutput(), _)
}
predicate isSource() { this.getAnOutput() instanceof ApiSources::SourceNode }
/** Holds if this API is a known sink. */
pragma[nomagic]