C#: Base the remaning CWE-1004 tests purely on stubs.

This commit is contained in:
Michael Nebel
2023-12-12 10:57:56 +01:00
parent cdf6b28e13
commit 0b39f1155e
11 changed files with 18 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
| Program.cs:25:27:25:31 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:30:74:30:78 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:50:27:50:27 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:56:74:56:74 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:23:27:23:31 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:28:74:28:78 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:48:27:48:27 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:54:74:54:74 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
class Program
{
void CookieDirectTrue()

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
semmle-extractor-options: ${testdir}/../../../../resources/stubs/System.Web.cs

View File

@@ -1 +1 @@
| Program.cs:7:22:7:59 | object creation of type HttpCookie | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:5:22:5:59 | object creation of type HttpCookie | Cookie attribute 'HttpOnly' is not set to true. |

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
class Program
{
void CookieDefault()

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs

View File

@@ -1 +1 @@
| Program.cs:7:22:7:59 | object creation of type HttpCookie | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:5:22:5:59 | object creation of type HttpCookie | Cookie attribute 'HttpOnly' is not set to true. |

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
class Program
{
void CookieDefault()

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
class Program
{
void CookieDefault()

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs