Rust: Add query sink counts query for getting a breakdown.

This commit is contained in:
Geoffrey White
2025-01-15 08:55:56 +00:00
parent c6a7be671b
commit 7904ed965b

View File

@@ -0,0 +1,17 @@
/**
* @name Query Sink Counts
* @description Lists the number of query sinks of each type found in the database. Query sinks are
* flow sinks that are used as possible locations for query results. Cryptographic
* operations are excluded.
* @kind metric
* @id rust/summary/query-sink-counts
* @tags summary
*/
import rust
import codeql.rust.dataflow.DataFlow
import Stats
from string kind, int num
where num = strictcount(DataFlow::Node n | getAQuerySinkKind(n) = kind)
select kind, num