mirror of
https://github.com/github/codeql.git
synced 2026-07-07 04:25:30 +02:00
18 lines
678 B
Plaintext
18 lines
678 B
Plaintext
/**
|
|
* @name Frequency counts for external APIs that are used with untrusted data
|
|
* @description This reports the external APIs that are used with untrusted data, along with how
|
|
* frequently the API is called, and how many unique sources of untrusted data flow
|
|
* to it.
|
|
* @id cpp/count-untrusted-data-external-api
|
|
* @kind table
|
|
* @tags security external/cwe/cwe-20
|
|
*/
|
|
|
|
import cpp
|
|
import ExternalAPIs
|
|
|
|
from ExternalAPIUsedWithUntrustedData externalAPI
|
|
select externalAPI, count(externalAPI.getUntrustedDataNode()) as numberOfUses,
|
|
externalAPI.getNumberOfUntrustedSources() as numberOfUntrustedSources order by
|
|
numberOfUntrustedSources desc
|