mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Add integration tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
namespace test;
|
||||
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Razor;
|
||||
|
||||
public class UserData
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class TestController : Controller {
|
||||
public IActionResult Test(UserData tainted1) {
|
||||
return View("Test", tainted1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
@namespace test
|
||||
@model UserData
|
||||
@{
|
||||
}
|
||||
|
||||
@if (Model != null)
|
||||
{
|
||||
<h3>Hello "@Html.Raw(Model.Name)"</h3>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Security Features/CWE-079/XSS.ql
|
||||
@@ -0,0 +1,6 @@
|
||||
import os
|
||||
from create_database_utils import *
|
||||
|
||||
|
||||
os.environ['CODEQL_EXTRACTOR_CSHARP_STANDALONE_EXTRACT_WEB_VIEWS'] = 'true'
|
||||
run_codeql_database_create(lang="csharp", extra_args=["--extractor-option=buildless=true", "--extractor-option=cil=false"])
|
||||
Reference in New Issue
Block a user