mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Add test for supported sinks query.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
|
||||
public class SupportedExternalSinks
|
||||
{
|
||||
public void M1()
|
||||
{
|
||||
var o = new object();
|
||||
var response = new HttpResponse();
|
||||
response.AddHeader("header", "value");
|
||||
response.AppendHeader("header", "value");
|
||||
response.Write(o); // Known sink.
|
||||
response.WriteFile("filename"); // Known sink.
|
||||
response.Write(o); // Known sink.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
| System.Web.cs#System.Web#HttpResponse.Write(object) | 2 |
|
||||
| System.Web.cs#System.Web#HttpResponse.WriteFile(string) | 1 |
|
||||
@@ -0,0 +1 @@
|
||||
Telemetry/SupportedExternalSinks.ql
|
||||
@@ -0,0 +1,2 @@
|
||||
semmle-extractor-options: /r:System.Collections.Specialized.dll
|
||||
semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Web.cs
|
||||
Reference in New Issue
Block a user