mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Rust: Add query sink counts query for getting a breakdown.
This commit is contained in:
17
rust/ql/src/queries/summary/QuerySinkCounts.ql
Normal file
17
rust/ql/src/queries/summary/QuerySinkCounts.ql
Normal 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
|
||||
Reference in New Issue
Block a user