Merge pull request #156 from microsoft/update-powershell-dataflow-after-shared-changes

Powershell: Fix dataflow library after GitHub changes
This commit is contained in:
dilanbhalla
2025-01-28 11:00:45 -08:00
committed by GitHub
3 changed files with 14 additions and 3 deletions

View File

@@ -10,8 +10,14 @@ private import DataFlowImplSpecific::Private
private import DataFlowImplSpecific::Public
module Input implements InputSig<Location, DataFlowImplSpecific::PowershellDataFlow> {
private import codeql.util.Void
class SummarizedCallableBase = string;
class SourceBase = Void;
class SinkBase = Void;
ArgumentPosition callbackSelfParameterPosition() { none() }
ReturnKind getStandardReturnValueKind() { result instanceof NormalReturnKind }
@@ -114,6 +120,10 @@ private module StepsInput implements Impl::Private::StepsInputSig {
or
result.asCall().getAstNode() = sc.(LibraryCallable).getACallSimple()
}
Node getSourceNode(Input::SourceBase source, Impl::Private::SummaryComponent sc) { none() }
Node getSinkNode(Input::SinkBase source, Impl::Private::SummaryComponent sc) { none() }
}
module Private {

View File

@@ -3,5 +3,6 @@
* for tracking types.
*/
private import powershell
private import semmle.code.powershell.typetracking.internal.TypeTrackingImpl as Impl
import Impl::Shared::TypeTracking<Impl::TypeTrackingInput>
import Impl::Shared::TypeTracking<Location, Impl::TypeTrackingInput>

View File

@@ -157,7 +157,7 @@ private module TypeTrackerSummaryFlow = SummaryTypeTracker::SummaryFlow<SummaryT
private newtype TContentFilter = MkElementFilter()
module TypeTrackingInput implements Shared::TypeTrackingInput {
module TypeTrackingInput implements Shared::TypeTrackingInput<Location> {
class Node = DataFlowPublic::Node;
class LocalSourceNode = DataFlowPublic::LocalSourceNode;
@@ -295,4 +295,4 @@ module TypeTrackingInput implements Shared::TypeTrackingInput {
predicate hasFeatureBacktrackStoreTarget() { none() }
}
import SharedImpl::TypeTracking<TypeTrackingInput>
import SharedImpl::TypeTracking<Location, TypeTrackingInput>