Skip to content

Commit 577bbd5

Browse files
committed
C#: Base tests on stubs, move extractor options to options file and updated expected test output.
1 parent bc7cb1e commit 577bbd5

File tree

5 files changed

+9
-56
lines changed

5 files changed

+9
-56
lines changed

csharp/ql/test/experimental/CWE-918/RequestForgery.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// semmle-extractor-options: ${testdir}/../../resources/stubs/System.Web.cs /r:System.Threading.Tasks.dll /r:System.Collections.Specialized.dll /r:System.Runtime.dll /r:System.Private.Uri.dll
2-
31
using System;
42
using System.Threading.Tasks;
53
using System.Web.Mvc;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
edges
2-
| RequestForgery.cs:14:52:14:54 | url : String | RequestForgery.cs:16:66:16:68 | access to parameter url |
2+
| RequestForgery.cs:12:52:12:54 | url : String | RequestForgery.cs:14:66:14:68 | access to parameter url |
33
nodes
4-
| RequestForgery.cs:14:52:14:54 | url : String | semmle.label | url : String |
5-
| RequestForgery.cs:16:66:16:68 | access to parameter url | semmle.label | access to parameter url |
4+
| RequestForgery.cs:12:52:12:54 | url : String | semmle.label | url : String |
5+
| RequestForgery.cs:14:66:14:68 | access to parameter url | semmle.label | access to parameter url |
66
subpaths
77
#select
8-
| RequestForgery.cs:16:66:16:68 | access to parameter url | RequestForgery.cs:14:52:14:54 | url : String | RequestForgery.cs:16:66:16:68 | access to parameter url | The URL of this request depends on a $@. | RequestForgery.cs:14:52:14:54 | url | user-provided value |
8+
| RequestForgery.cs:14:66:14:68 | access to parameter url | RequestForgery.cs:12:52:12:54 | url : String | RequestForgery.cs:14:66:14:68 | access to parameter url | The URL of this request depends on a $@. | RequestForgery.cs:12:52:12:54 | url | user-provided value |
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
semmle-extractor-options: /r:System.Net.Http.dll
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
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
semmle-extractor-options: /r:System.Data.Common.dll
1+
semmle-extractor-options: /nostdlib /noconfig
2+
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/System.Data.SqlClient/4.8.3/System.Data.SqlClient.csproj

csharp/ql/test/query-tests/Security Features/CWE-327/InsecureSQLConnection/stubs.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)