C#: Use generated stubs for CookieHttpOnlyFalseAspNetCore testcases and update test output with new line numbers.

This commit is contained in:
Michael Nebel
2022-08-09 14:32:19 +02:00
parent 3a908ac4b8
commit d6880f059d
6 changed files with 9 additions and 12 deletions

View File

@@ -1,2 +1,2 @@
| Program.cs:15:33:15:37 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:22:39:22:43 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:13:33:13:37 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:20:39:20:43 | false | Cookie attribute 'HttpOnly' is not set to true. |

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Authentication.Cookies.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Authentication.cs ${testdir}/../../../../../resources/stubs/Microsoft.Extensions.DependencyInjection.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.CookiePolicy.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Hosting.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Http.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Mvc.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Builder.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;

View File

@@ -1,4 +1,4 @@
| Program.cs:27:34:27:38 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:40:88:40:92 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:63:34:63:34 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:70:88:70:88 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:25:34:25:38 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:38:88:38:92 | false | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:61:34:61:34 | access to local variable v | Cookie attribute 'HttpOnly' is not set to true. |
| Program.cs:68:88:68:88 | 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/Microsoft.AspNetCore.Http.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Mvc.cs
public class MyController : Microsoft.AspNetCore.Mvc.Controller
{
public void CookieDelete()

View File

@@ -1,5 +1,3 @@
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Authentication.Cookies.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Authentication.cs ${testdir}/../../../../../resources/stubs/Microsoft.Extensions.DependencyInjection.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.CookiePolicy.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Hosting.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Http.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Mvc.cs ${testdir}/../../../../../resources/stubs/Microsoft.AspNetCore.Builder.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;

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: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj