CodeQL library for C#
codeql/csharp-all 3.1.2-dev (changelog, source)
Search

Class SsaInputNode

A node that represents an input to an SSA phi (read) definition.

This allows for barrier guards to filter input to phi nodes. For example, in

var x = taint;
if (x != "safe")
{
    x = "safe";
}
sink(x);

the false edge out of x != "safe" guards the input from x = taint into the phi node after the condition.

It is also relevant to filter input into phi read nodes:

var x = taint;
if (b)
{
    if (x != "safe1")
    {
        return;
    }
} else {
    if (x != "safe2")
    {
        return;
    }
}

sink(x);

both inputs into the phi read node after the outer condition are guarded.

Import path

import semmle.code.csharp.dataflow.internal.DataFlowPrivate

Direct supertypes

Indirect supertypes

Fields

Inherited fields

Inherited predicates

asDefinition

Gets the definition corresponding to this node, if any.

from Node
asDefinitionAtNode

Gets the definition corresponding to this node, at control flow node cfn, if any.

from Node
asExpr

Gets the expression corresponding to this node, if any.

from Node
asExprAtNode

Gets the expression corresponding to this node, at control flow node cfn, if any.

from Node
asParameter

Gets the parameter corresponding to this node, if any.

from Node
getControlFlowNode

Gets the control flow node corresponding to this node, if any.

from Node
getControlFlowNodeImpl

Do not call: use getControlFlowNode() instead.

from SsaNode
getDataFlowType

Gets the type of this node used for type pruning.

from NodeImpl
getDefinitionExtfrom SsaNode
getEnclosingCallable

Gets the enclosing callable of this node.

from Node
getEnclosingCallableImpl

Do not call: use getEnclosingCallable() instead.

from SsaNode
getLocation

Gets the location of this node.

from Node
getLocationImpl

Do not call: use getLocation() instead.

from SsaNode
getType

Gets the type of this node.

from Node
getTypeImpl

Do not call: use getType() instead.

from SsaNode
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Node
toString

Gets a textual representation of this node.

from Node
toStringImpl

Do not call: use toString() instead.

from SsaNode