Skip to content

Commit 7d07773

Browse files
committed
PS: Accept test changes.
1 parent 0585c2f commit 7d07773

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

powershell/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ edges
1414
| test.ps1:104:11:104:20 | userinput | test.ps1:108:58:108:87 | Get-Process -Name $UserInput | provenance | |
1515
| test.ps1:114:11:114:20 | userinput | test.ps1:116:34:116:43 | UserInput | provenance | |
1616
| test.ps1:121:11:121:20 | userinput | test.ps1:123:28:123:37 | UserInput | provenance | |
17+
| test.ps1:129:11:129:20 | userinput | test.ps1:131:28:131:37 | UserInput | provenance | |
1718
| test.ps1:136:11:136:20 | userinput | test.ps1:139:50:139:59 | UserInput | provenance | |
1819
| test.ps1:144:11:144:20 | userinput | test.ps1:147:63:147:72 | UserInput | provenance | |
1920
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:154:46:154:51 | input | provenance | Src:MaD:0 |
@@ -31,6 +32,7 @@ edges
3132
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:167:41:167:46 | input | provenance | Src:MaD:0 |
3233
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:168:36:168:41 | input | provenance | Src:MaD:0 |
3334
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:169:36:169:41 | input | provenance | Src:MaD:0 |
35+
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:170:36:170:41 | input | provenance | Src:MaD:0 |
3436
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:172:42:172:47 | input | provenance | Src:MaD:0 |
3537
| test.ps1:152:10:152:32 | Call to read-host | test.ps1:173:42:173:47 | input | provenance | Src:MaD:0 |
3638
| test.ps1:154:46:154:51 | input | test.ps1:3:11:3:20 | userinput | provenance | |
@@ -48,6 +50,7 @@ edges
4850
| test.ps1:167:41:167:46 | input | test.ps1:104:11:104:20 | userinput | provenance | |
4951
| test.ps1:168:36:168:41 | input | test.ps1:114:11:114:20 | userinput | provenance | |
5052
| test.ps1:169:36:169:41 | input | test.ps1:121:11:121:20 | userinput | provenance | |
53+
| test.ps1:170:36:170:41 | input | test.ps1:129:11:129:20 | userinput | provenance | |
5154
| test.ps1:172:42:172:47 | input | test.ps1:136:11:136:20 | userinput | provenance | |
5255
| test.ps1:173:42:173:47 | input | test.ps1:144:11:144:20 | userinput | provenance | |
5356
nodes
@@ -81,6 +84,8 @@ nodes
8184
| test.ps1:116:34:116:43 | UserInput | semmle.label | UserInput |
8285
| test.ps1:121:11:121:20 | userinput | semmle.label | userinput |
8386
| test.ps1:123:28:123:37 | UserInput | semmle.label | UserInput |
87+
| test.ps1:129:11:129:20 | userinput | semmle.label | userinput |
88+
| test.ps1:131:28:131:37 | UserInput | semmle.label | UserInput |
8489
| test.ps1:136:11:136:20 | userinput | semmle.label | userinput |
8590
| test.ps1:139:50:139:59 | UserInput | semmle.label | UserInput |
8691
| test.ps1:144:11:144:20 | userinput | semmle.label | userinput |
@@ -101,6 +106,7 @@ nodes
101106
| test.ps1:167:41:167:46 | input | semmle.label | input |
102107
| test.ps1:168:36:168:41 | input | semmle.label | input |
103108
| test.ps1:169:36:169:41 | input | semmle.label | input |
109+
| test.ps1:170:36:170:41 | input | semmle.label | input |
104110
| test.ps1:172:42:172:47 | input | semmle.label | input |
105111
| test.ps1:173:42:173:47 | input | semmle.label | input |
106112
subpaths
@@ -120,5 +126,6 @@ subpaths
120126
| test.ps1:108:58:108:87 | Get-Process -Name $UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:108:58:108:87 | Get-Process -Name $UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |
121127
| test.ps1:116:34:116:43 | UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:116:34:116:43 | UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |
122128
| test.ps1:123:28:123:37 | UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:123:28:123:37 | UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |
129+
| test.ps1:131:28:131:37 | UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:131:28:131:37 | UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |
123130
| test.ps1:139:50:139:59 | UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:139:50:139:59 | UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |
124131
| test.ps1:147:63:147:72 | UserInput | test.ps1:152:10:152:32 | Call to read-host | test.ps1:147:63:147:72 | UserInput | This command depends on a $@. | test.ps1:152:10:152:32 | Call to read-host | user-provided value |

powershell/ql/test/query-tests/security/cwe-078/CommandInjection/test.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ function Invoke-MethodInjection2
123123
(Get-Process -Id $pid).$UserInput()
124124
}
125125

126-
#TODO: currently a FN
126+
127127
function Invoke-MethodInjection3
128128
{
129129
param($UserInput)
130130

131-
(Get-Process -Id $pid).$UserInput.Invoke()
131+
(Get-Process -Id $pid).$UserInput.Invoke() # BAD
132132
}
133133

134134
function Invoke-ExpandStringInjection1

0 commit comments

Comments
 (0)