File tree Expand file tree Collapse file tree
powershell/ql/lib/semmle/code/powershell/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,17 +33,22 @@ private module Cached {
3333 */
3434 cached
3535 predicate defaultAdditionalTaintStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo , string model ) {
36- // Although flow through collections is modeled precisely using stores/reads, we still
37- // allow flow out of a _tainted_ collection. This is needed in order to support taint-
38- // tracking configurations where the source is a collection.
39- exists ( DataFlow :: ContentSet c | readStep ( nodeFrom , c , nodeTo ) |
40- c . isSingleton ( any ( DataFlow :: Content :: ElementContent ec ) )
36+ (
37+ exists ( CfgNodes :: ExprNodes :: OperationCfgNode op |
38+ op = nodeTo . asExpr ( ) and
39+ op . getAnOperand ( ) = nodeFrom . asExpr ( )
40+ )
4141 or
42- c .isKnownOrUnknownElement ( _)
43- // or
44- // TODO: We do't generate this one from readSteps yet, but we will as
45- // soon as we start on models-as-data.
46- // c.isAnyElement()
42+ // Although flow through collections is modeled precisely using stores/reads, we still
43+ // allow flow out of a _tainted_ collection. This is needed in order to support taint-
44+ // tracking configurations where the source is a collection.
45+ exists ( DataFlow:: ContentSet c | readStep ( nodeFrom , c , nodeTo ) |
46+ c .isSingleton ( any ( DataFlow:: Content:: ElementContent ec ) )
47+ or
48+ c .isKnownOrUnknownElement ( _)
49+ or
50+ c .isAnyElement ( )
51+ )
4752 ) and
4853 model = ""
4954 }
You can’t perform that action at this time.
0 commit comments