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 9
9
* @tags summary
10
10
*/
11
11
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
+
12
20
import swift
13
21
import codeql.swift.dataflow.FlowSources
14
22
15
23
string sourceClass ( FlowSource s ) {
16
- s instanceof LocalFlowSource and result = "LocalFlowSource "
24
+ s instanceof LocalFlowSource and result = "Local flow source "
17
25
or
18
- s instanceof RemoteFlowSource and result = "RemoteFlowSource "
26
+ s instanceof RemoteFlowSource and result = "Remote flow source "
19
27
}
20
28
21
29
from FlowSource s
Original file line number Diff line number Diff line change 1
1
/**
2
- * @name Summary statistics
2
+ * @name Summary Statistics
3
3
* @description A table of summary statistics about a database.
4
4
* @kind table
5
5
* @id swift/summary/summary-statistics
@@ -59,6 +59,9 @@ predicate statistic(string what, string value) {
59
59
what = "Taint reach (per million nodes)" and value = taintReach ( ) .toString ( )
60
60
or
61
61
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 ( )
62
65
}
63
66
64
67
from string what , string value
You can’t perform that action at this time.
0 commit comments