Files
codeql/java/ql/src/Telemetry/UnsupportedExternalAPIs.ql
Jonas Jensen 118abd40c9 Java: add exclude-from-incremental tag to telemetry queries
In the future, this tag should signal to the action that the queries
should be excluded from incremental scans because they are too slow
and/or produce too many results.

The three queries tagged here rely on global data-flow analysis to find
all XSS sinks. All other metric and diagnostic queries are fast enough
for incrementality.
2025-04-02 14:19:45 -07:00

17 lines
519 B
Plaintext

/**
* @name Usage of unsupported APIs coming from external libraries
* @description A list of 3rd party APIs used in the codebase. Excludes test and generated code.
* @kind metric
* @tags summary telemetry exclude-from-incremental
* @id java/telemetry/unsupported-external-api
*/
import java
import ExternalApi
private predicate relevant(ExternalApi api) { not api.isSupported() }
from string apiName, int usages
where Results<relevant/1>::restrict(apiName, usages)
select apiName, usages order by usages desc