From 25f8f049c31a530289c70b9b6e62aad2d8693f91 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Thu, 23 Jan 2025 18:06:22 +0000 Subject: [PATCH] Powershell: Update changes to remain in sync with GitHub's shared libraries. --- .../powershell/dataflow/internal/FlowSummaryImpl.qll | 10 ++++++++++ .../code/powershell/typetracking/TypeTracking.qll | 3 ++- .../typetracking/internal/TypeTrackingImpl.qll | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/FlowSummaryImpl.qll b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/FlowSummaryImpl.qll index e35e33c4b5e4..b5f8d7beeacd 100644 --- a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/FlowSummaryImpl.qll +++ b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/FlowSummaryImpl.qll @@ -10,8 +10,14 @@ private import DataFlowImplSpecific::Private private import DataFlowImplSpecific::Public module Input implements InputSig { + 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 { diff --git a/powershell/ql/lib/semmle/code/powershell/typetracking/TypeTracking.qll b/powershell/ql/lib/semmle/code/powershell/typetracking/TypeTracking.qll index f9156961ce47..717a4baff943 100644 --- a/powershell/ql/lib/semmle/code/powershell/typetracking/TypeTracking.qll +++ b/powershell/ql/lib/semmle/code/powershell/typetracking/TypeTracking.qll @@ -3,5 +3,6 @@ * for tracking types. */ +private import powershell private import semmle.code.powershell.typetracking.internal.TypeTrackingImpl as Impl -import Impl::Shared::TypeTracking +import Impl::Shared::TypeTracking diff --git a/powershell/ql/lib/semmle/code/powershell/typetracking/internal/TypeTrackingImpl.qll b/powershell/ql/lib/semmle/code/powershell/typetracking/internal/TypeTrackingImpl.qll index 8908c99491c9..dcebe6117b54 100644 --- a/powershell/ql/lib/semmle/code/powershell/typetracking/internal/TypeTrackingImpl.qll +++ b/powershell/ql/lib/semmle/code/powershell/typetracking/internal/TypeTrackingImpl.qll @@ -157,7 +157,7 @@ private module TypeTrackerSummaryFlow = SummaryTypeTracker::SummaryFlow { class Node = DataFlowPublic::Node; class LocalSourceNode = DataFlowPublic::LocalSourceNode; @@ -295,4 +295,4 @@ module TypeTrackingInput implements Shared::TypeTrackingInput { predicate hasFeatureBacktrackStoreTarget() { none() } } -import SharedImpl::TypeTracking +import SharedImpl::TypeTracking