Skip to content

Powershell: Fix dataflow library after GitHub changes #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -295,4 +295,4 @@ module TypeTrackingInput implements Shared::TypeTrackingInput {
predicate hasFeatureBacktrackStoreTarget() { none() }
}

import SharedImpl::TypeTracking<TypeTrackingInput>
import SharedImpl::TypeTracking<Location, TypeTrackingInput>
Loading