Skip to content

Commit 94d81b5

Browse files
committed
C#: Base the CWE-614 tests purely on stubs.
1 parent 4fc8762 commit 94d81b5

File tree

13 files changed

+21
-16
lines changed

13 files changed

+21
-16
lines changed

csharp/ql/test/experimental/Security Features/CWE-614/RequireSSLFalseSystemWeb/Program.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.Collections.Specialized.dll
2-
31
class Program
42
{
53
void CookieDirectTrue()
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| Program.cs:19:25:19:29 | false | Cookie attribute 'Secure' is not set to true. |
2-
| Program.cs:24:73:24:77 | false | Cookie attribute 'Secure' is not set to true. |
3-
| Program.cs:44:25:44:25 | access to local variable v | Cookie attribute 'Secure' is not set to true. |
4-
| Program.cs:50:73:50:73 | access to local variable v | Cookie attribute 'Secure' is not set to true. |
1+
| Program.cs:17:25:17:29 | false | Cookie attribute 'Secure' is not set to true. |
2+
| Program.cs:22:73:22:77 | false | Cookie attribute 'Secure' is not set to true. |
3+
| Program.cs:42:25:42:25 | access to local variable v | Cookie attribute 'Secure' is not set to true. |
4+
| Program.cs:48:73:48:73 | access to local variable v | Cookie attribute 'Secure' is not set to true. |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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/experimental/Security Features/CWE-614/RequireSSLSystemWeb/ConfigEmpty/Program.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.Collections.Specialized.dll
2-
31
class Program
42
{
53
void CookieDefault()
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| Program.cs:7:22:7:60 | object creation of type HttpCookie | Cookie attribute 'Secure' is not set to true. |
1+
| Program.cs:5:22:5:60 | object creation of type HttpCookie | Cookie attribute 'Secure' is not set to true. |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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/experimental/Security Features/CWE-614/RequireSSLSystemWeb/ConfigFalse/Program.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.Collections.Specialized.dll
2-
31
class Program
42
{
53
void CookieDefault()
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| Program.cs:7:22:7:60 | object creation of type HttpCookie | Cookie attribute 'Secure' is not set to true. |
1+
| Program.cs:5:22:5:60 | object creation of type HttpCookie | Cookie attribute 'Secure' is not set to true. |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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/experimental/Security Features/CWE-614/RequireSSLSystemWeb/FormsTrue/Program.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.Collections.Specialized.dll
2-
31
class Program
42
{
53
void CookieDefault()

0 commit comments

Comments
 (0)