mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
C#: Update testcases with examples.
This commit is contained in:
@@ -5,9 +5,12 @@ namespace Testing
|
||||
|
||||
public class ViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public object Query;
|
||||
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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
remoteFlowSourceMembers
|
||||
| AspRemoteFlowSource.cs:8:23:8:31 | RequestId |
|
||||
| AspRemoteFlowSource.cs:10:23:10:27 | Query |
|
||||
remoteFlowSources
|
||||
| AspRemoteFlowSource.cs:15:42:15:50 | viewModel |
|
||||
| AspRemoteFlowSource.cs:18:42:18:50 | viewModel |
|
||||
|
||||
Reference in New Issue
Block a user