Skip to content

Commit 35a615c

Browse files
committed
C#: Base the remoteflowsource test on stubs and update line numbers in expected output.
1 parent 94d81b5 commit 35a615c

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

csharp/ql/test/library-tests/dataflow/flowsources/remote/RemoteFlowSource.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ public sealed class ServiceContractAttribute : Attribute { }
77
public sealed class OperationContractAttribute : Attribute { }
88
}
99

10-
namespace System.Runtime.Serialization
11-
{
12-
public sealed class DataContractAttribute : Attribute { }
13-
public sealed class DataMemberAttribute : Attribute { }
14-
}
15-
1610
namespace RemoteFlowSource
1711
{
1812
using System.ServiceModel;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
semmle-extractor-options: /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Security.Cryptography.X509Certificates.dll ${testdir}/../../../../resources/stubs/System.Web.cs
1+
semmle-extractor-options: /nostdlib /noconfig
2+
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
3+
semmle-extractor-options: ${testdir}/../../../../resources/stubs/System.Web.cs

csharp/ql/test/library-tests/dataflow/flowsources/remote/remoteFlowSource.expected

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
| Controller.cs:11:62:11:66 | taint | ASP.NET MVC action method parameter |
33
| Controller.cs:16:43:16:52 | sampleData | ASP.NET MVC action method parameter |
44
| Controller.cs:16:62:16:66 | taint | ASP.NET MVC action method parameter |
5-
| RemoteFlowSource.cs:36:17:36:23 | access to parameter request | ASP.NET query string |
6-
| RemoteFlowSource.cs:37:17:37:23 | access to parameter textBox | ASP.NET user input |
7-
| RemoteFlowSource.cs:40:44:40:53 | sampleData | web service input |
8-
| RemoteFlowSource.cs:40:63:40:67 | taint | web service input |
9-
| RemoteFlowSource.cs:46:17:46:23 | access to parameter request | ASP.NET query string |
10-
| RemoteFlowSource.cs:51:17:51:23 | access to parameter request | ASP.NET query string |
11-
| RemoteFlowSource.cs:51:17:51:42 | access to property RawUrl | ASP.NET unvalidated request data |
5+
| RemoteFlowSource.cs:30:17:30:23 | access to parameter request | ASP.NET query string |
6+
| RemoteFlowSource.cs:31:17:31:23 | access to parameter textBox | ASP.NET user input |
7+
| RemoteFlowSource.cs:34:44:34:53 | sampleData | web service input |
8+
| RemoteFlowSource.cs:34:63:34:67 | taint | web service input |
9+
| RemoteFlowSource.cs:40:17:40:23 | access to parameter request | ASP.NET query string |
10+
| RemoteFlowSource.cs:45:17:45:23 | access to parameter request | ASP.NET query string |
11+
| RemoteFlowSource.cs:45:17:45:42 | access to property RawUrl | ASP.NET unvalidated request data |

0 commit comments

Comments
 (0)