mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #14573 from hvitved/flow-summary-impl-param
Move `FlowSummaryImpl.qll` to `dataflow` pack
This commit is contained in:
@@ -1,15 +1,2 @@
|
||||
import csharp
|
||||
import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
import semmle.code.csharp.dataflow.internal.AccessPathSyntax
|
||||
import ModelValidation
|
||||
|
||||
private predicate getRelevantAccessPath(string path) {
|
||||
summaryModel(_, _, _, _, _, _, path, _, _, _) or
|
||||
summaryModel(_, _, _, _, _, _, _, path, _, _) or
|
||||
sinkModel(_, _, _, _, _, _, path, _, _) or
|
||||
sourceModel(_, _, _, _, _, _, path, _, _)
|
||||
}
|
||||
|
||||
private class AccessPathsExternal extends AccessPath::Range {
|
||||
AccessPathsExternal() { getRelevantAccessPath(this) }
|
||||
}
|
||||
import semmle.code.csharp.dataflow.internal.ExternalFlow::ModelValidation
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
|
||||
private import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
import shared.FlowSummaries
|
||||
import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
|
||||
private class IncludeAllSummarizedCallable extends IncludeSummarizedCallable {
|
||||
IncludeAllSummarizedCallable() { exists(this) }
|
||||
}
|
||||
|
||||
private class IncludeNeutralSummarizedCallable extends RelevantNeutralCallable instanceof FlowSummaryImpl::Public::NeutralSummaryCallable
|
||||
{
|
||||
private class IncludeNeutralSummarizedCallable extends RelevantNeutralCallable {
|
||||
/** Gets a string representing the callable in semi-colon separated format for use in flow summaries. */
|
||||
final override string getCallableCsv() { result = asPartialNeutralModel(this) }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import shared.FlowSummaries
|
||||
private import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
|
||||
class IncludeFilteredSummarizedCallable extends IncludeSummarizedCallable instanceof SummarizedCallable
|
||||
{
|
||||
class IncludeFilteredSummarizedCallable extends IncludeSummarizedCallable {
|
||||
IncludeFilteredSummarizedCallable() { exists(this) }
|
||||
|
||||
/**
|
||||
* Holds if flow is propagated between `input` and `output` and
|
||||
* if there is no summary for a callable in a `base` class or interface
|
||||
@@ -14,7 +15,7 @@ class IncludeFilteredSummarizedCallable extends IncludeSummarizedCallable instan
|
||||
super.propagatesFlow(input, output, preservesValue) and
|
||||
not exists(IncludeSummarizedCallable rsc |
|
||||
isBaseCallableOrPrototype(rsc) and
|
||||
rsc.(SummarizedCallable).propagatesFlow(input, output, preservesValue) and
|
||||
rsc.propagatesFlow(input, output, preservesValue) and
|
||||
this.(UnboundCallable).overridesOrImplementsUnbound(rsc)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user