Skip to content

Commit

Permalink
Data flow: Dummy SinkBase implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Dec 17, 2024
1 parent ca2b719 commit 707bebb
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::CppDataFlow> {

class SourceBase = Void;

class SinkBase = Void;

ArgumentPosition callbackSelfParameterPosition() { result = TDirectPosition(-1) }

ReturnKind getStandardReturnValueKind() { result.(NormalReturnKind).getIndirectionIndex() = 0 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::CsharpDataFlow>

class SourceBase = Void;

class SinkBase = Void;

predicate neutralElement(SummarizedCallableBase c, string kind, string provenance, boolean isExact) {
interpretNeutral(c, kind, provenance) and
// isExact is not needed for C#.
Expand Down
2 changes: 2 additions & 0 deletions go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::GoDataFlow> {

class SourceBase = Void;

class SinkBase = Void;

predicate neutralElement(
Input::SummarizedCallableBase c, string kind, string provenance, boolean isExact
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::JavaDataFlow> {

class SourceBase = Void;

class SinkBase = Void;

predicate neutralElement(
Input::SummarizedCallableBase c, string kind, string provenance, boolean isExact
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::PythonDataFlow>

class SourceBase = Void;

class SinkBase = Void;

ArgumentPosition callbackSelfParameterPosition() { result.isLambdaSelf() }

ReturnKind getStandardReturnValueKind() { any() }
Expand Down
2 changes: 2 additions & 0 deletions ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::RubyDataFlow> {

class SourceBase = Void;

class SinkBase = Void;

ArgumentPosition callbackSelfParameterPosition() { result.isLambdaSelf() }

ReturnKind getStandardReturnValueKind() { result instanceof NormalReturnKind }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::SwiftDataFlow>

class SourceBase = Void;

class SinkBase = Void;

ArgumentPosition callbackSelfParameterPosition() { result instanceof ThisArgumentPosition }

ReturnKind getStandardReturnValueKind() { result instanceof NormalReturnKind }
Expand Down

0 comments on commit 707bebb

Please sign in to comment.