mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
C#: Add telemetry query for supported sinks.
This commit is contained in:
17
csharp/ql/src/Telemetry/SupportedExternalSinks.ql
Normal file
17
csharp/ql/src/Telemetry/SupportedExternalSinks.ql
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @name Supported sinks in external libraries
|
||||
* @description A list of 3rd party APIs detected as sinks. Excludes test and generated code.
|
||||
* @kind metric
|
||||
* @tags summary
|
||||
* @id csharp/telemetry/supported-external-api-sinks
|
||||
*/
|
||||
|
||||
import csharp
|
||||
import ExternalAPI
|
||||
|
||||
from ExternalAPI api, int usages
|
||||
where
|
||||
not api.isUninteresting() and
|
||||
api.isSink() and
|
||||
usages = strictcount(Call c | c.getTarget() = api)
|
||||
select api.getInfo() as info, usages order by usages desc
|
||||
Reference in New Issue
Block a user