Files
codeql/csharp/ql/test/library-tests/dataflow/flowsources/aspremote/AspRemoteFlowSource.cs
2022-06-16 08:43:06 +02:00

23 lines
814 B
C#

using Microsoft.AspNetCore.Mvc;
namespace Testing
{
public class ViewModel
{
public string RequestId { get; set; } // Considered tainted.
public object RequestIdField; // Not considered tainted as it is a field.
public string RequestIdOnlyGet { get; } // Not considered tainted as there is no setter.
public string RequestIdPrivateSet { get; private set; } // Not considered tainted as it has a private setter.
public static object RequestIdStatic { get; set; } // Not considered tainted as it is static.
private string RequestIdPrivate { get; set; } // Not considered tainted as it is private.
}
public class TestController : Controller
{
public object MyAction(ViewModel viewModel)
{
throw null;
}
}
}