Skip to content

Commit 72e18ac

Browse files
committed
PS: Flow through conversions.
1 parent 43fcbca commit 72e18ac

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ module LocalFlow {
102102
or
103103
nodeFrom.asExpr() = nodeTo.asStmt().(CfgNodes::StmtNodes::CmdExprCfgNode).getExpr()
104104
or
105+
nodeFrom.asExpr() = nodeTo.asExpr().(CfgNodes::ExprNodes::ConvertCfgNode).getBase()
106+
or
105107
exists(
106108
CfgNodes::ExprNodes::ArrayExprCfgNode arrayExpr, EscapeContainer::EscapeContainer container
107109
|

powershell/ql/test/library-tests/dataflow/local/test.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
| test.ps1:10:6:10:16 | [...]... | test.ps1:10:1:10:3 | c |
2121
| test.ps1:10:6:10:16 | [...]... | test.ps1:10:1:10:16 | ...=... |
2222
| test.ps1:10:6:10:16 | [...]... | test.ps1:10:6:10:16 | [...]... |
23+
| test.ps1:10:14:10:16 | b | test.ps1:10:6:10:16 | [...]... |
2324
| test.ps1:11:1:11:8 | Sink | test.ps1:11:1:11:8 | pre-return value for Sink |
2425
| test.ps1:11:1:11:8 | Sink | test.ps1:11:1:11:8 | pre-return value for Sink |
2526
| test.ps1:11:1:11:8 | implicit unwrapping of Sink | test.ps1:1:1:11:8 | return value for test.ps1 |

0 commit comments

Comments
 (0)