File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
swift/ql/src/queries/Summary Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 99 * @tags summary
1010 */
1111
12+ /*
13+ * Most queries compute data flow from one of the following sources:
14+ * - flow sources (listed by this query, `swift/summary/flow-sources`).
15+ * - sensitive expressions (see `swift/summary/sensitive-expressions`).
16+ * - constant values.
17+ * - custom per-query sources.
18+ */
19+
1220import swift
1321import codeql.swift.dataflow.FlowSources
1422
1523string sourceClass ( FlowSource s ) {
16- s instanceof LocalFlowSource and result = "LocalFlowSource "
24+ s instanceof LocalFlowSource and result = "Local flow source "
1725 or
18- s instanceof RemoteFlowSource and result = "RemoteFlowSource "
26+ s instanceof RemoteFlowSource and result = "Remote flow source "
1927}
2028
2129from FlowSource s
Original file line number Diff line number Diff line change 11/**
2- * @name Summary statistics
2+ * @name Summary Statistics
33 * @description A table of summary statistics about a database.
44 * @kind table
55 * @id swift/summary/summary-statistics
@@ -59,6 +59,9 @@ predicate statistic(string what, string value) {
5959 what = "Taint reach (per million nodes)" and value = taintReach ( ) .toString ( )
6060 or
6161 what = "Regular expression evals" and value = count ( RegexEval e ) .toString ( )
62+ or
63+ what = "Regular expression evals with associated regex" and
64+ value = count ( RegexEval e | exists ( e .getARegex ( ) ) ) .toString ( )
6265}
6366
6467from string what , string value
You can’t perform that action at this time.
0 commit comments