Merge pull request #14573 from hvitved/flow-summary-impl-param

Move `FlowSummaryImpl.qll` to `dataflow` pack
This commit is contained in:
Tom Hvitved
2023-12-14 12:24:15 +01:00
committed by GitHub
110 changed files with 4820 additions and 13159 deletions

View File

@@ -304,7 +304,7 @@ class TopJdkApi extends Callable {
/** Holds if this API has a manual neutral summary model. */
private predicate hasManualNeutralSummary() {
this.(FlowSummaryImpl::Public::NeutralSummaryCallable).hasManualModel()
this = any(FlowSummaryImpl::Public::NeutralSummaryCallable n | n.hasManualModel()).asCallable()
}
/** Holds if this API has a manual MaD model. */

View File

@@ -79,7 +79,7 @@ class ExternalApi extends Callable {
/** Holds if this API is a known neutral. */
pragma[nomagic]
predicate isNeutral() { this instanceof FlowSummaryImpl::Public::NeutralCallable }
predicate isNeutral() { this = any(FlowSummaryImpl::Public::NeutralCallable n).asCallable() }
/**
* Holds if this API is supported by existing CodeQL libraries, that is, it is either a

View File

@@ -1,6 +1,6 @@
private import java
private import semmle.code.java.dataflow.internal.DataFlowPrivate
private import semmle.code.java.dataflow.internal.FlowSummaryImplSpecific
private import semmle.code.java.dataflow.internal.FlowSummaryImpl
private import semmle.code.java.dataflow.internal.ModelExclusions
private import ModelEditor
@@ -8,7 +8,7 @@ private import ModelEditor
* A class of effectively public callables from source code.
*/
class PublicEndpointFromSource extends Endpoint, ModelApi {
override predicate isSource() { sourceElement(this, _, _, _) }
override predicate isSource() { SourceSinkInterpretationInput::sourceElement(this, _, _) }
override predicate isSink() { sinkElement(this, _, _, _) }
override predicate isSink() { SourceSinkInterpretationInput::sinkElement(this, _, _) }
}