Skip to content

Commit 766cf82

Browse files
committed
PS: Add more models and accept test changes.
1 parent bd90435 commit 766cf82

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

powershell/ql/lib/semmle/code/powershell/frameworks/System.Net.model.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,13 @@ extensions:
66
- ["system.net.sockets.tcpclient", "Method[getstream].ReturnValue", "remote"]
77
- ["system.net.sockets.udpclient", "Method[endreceive].ReturnValue", "remote"]
88
- ["system.net.sockets.udpclient", "Method[receive].ReturnValue", "remote"]
9-
- ["system.net.sockets.udpclient", "Method[receiveasync].ReturnValue", "remote"]
9+
- ["system.net.sockets.udpclient", "Method[receiveasync].ReturnValue", "remote"]
10+
- ["system.net.webclient", "Method[downloaddata].ReturnValue", "remote"]
11+
- ["system.net.webclient", "Method[downloaddataasync].ReturnValue", "remote"]
12+
- ["system.net.webclient", "Method[downloaddatataskasync].ReturnValue", "remote"]
13+
- ["system.net.webclient", "Method[downloadfile].ReturnValue", "remote"]
14+
- ["system.net.webclient", "Method[downloadfileasync].ReturnValue", "remote"]
15+
- ["system.net.webclient", "Method[downloadfiletaskasync].ReturnValue", "remote"]
16+
- ["system.net.webclient", "Method[downloadstring].ReturnValue", "remote"]
17+
- ["system.net.webclient", "Method[downloadstringasync].ReturnValue", "remote"]
18+
- ["system.net.webclient", "Method[downloadstringtaskasync].ReturnValue", "remote"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.ps1:1:1:18:0 | [synth] pipeline | Unexpected result: type="command line argument" |
1+
| test.ps1:1:1:20:93 | [synth] pipeline | Unexpected result: type="command line argument" |

powershell/ql/test/library-tests/frameworks/system_net_sockets/test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ $data2 = $udpClient.Receive([ref]$remoteEndpoint2) # $ type="remote flow source"
1717
$receiveTask = $udpClient.ReceiveAsync() # $ type="remote flow source"
1818

1919
$webclient = [System.Net.WebClient]::new()
20-
$data = $webclient.DownloadData("https://example.com/data.txt") # $ MISSING: type="remote flow source"
20+
$data = $webclient.DownloadData("https://example.com/data.txt") # $ type="remote flow source"

0 commit comments

Comments
 (0)