File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
swift/ql/src/queries/Summary Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @name Flow Sources
3+ * @description List all flow sources found in the database. Flow sources
4+ * indicate data that originates from an untrusted source, such
5+ * as as untrusted remote data.
6+ * @kind table
7+ * @id swift/summary/flow-sources
8+ */
9+
10+ import swift
11+ import codeql.swift.dataflow.FlowSources
12+
13+ from RemoteFlowSource s
14+ select s , "Flow source: " + s .getSourceType ( )
Original file line number Diff line number Diff line change 1+ /**
2+ * @name Sensitive Expressions
3+ * @description List all sensitive expressions found in the database.
4+ * Sensitive expressions are expressions that have been
5+ * identified as potentially containing data that should not be
6+ * leaked to an attacker.
7+ * @kind table
8+ * @id swift/summary/sensitive-expressions
9+ */
10+
11+ import swift
12+ import codeql.swift.security.SensitiveExprs
13+
14+ from SensitiveExpr e
15+ select e , "Sensitive expression: " + e .getSensitiveType ( )
Original file line number Diff line number Diff line change 1+ /**
2+ * @name Summary statistics
3+ * @description A table of summary statistics about a database. Includes
4+ * values that measure its size, and the numbers of certain
5+ * features interesting to analysis that have been found.
6+ * @kind table
7+ * @id swift/summary/summary-statistics
8+ */
9+
10+ import swift
11+ import codeql.swift.dataflow.FlowSources
12+ import codeql.swift.security.SensitiveExprs
13+
14+ predicate statistic ( string what , int value ) {
15+ what = "Files" and value = count ( File f )
16+ or
17+ what = "Expressions" and value = count ( Expr e )
18+ or
19+ what = "Remote flow sources" and value = count ( RemoteFlowSource s )
20+ or
21+ what = "Sensitive expressions" and value = count ( SensitiveExpr e )
22+ }
23+
24+ from string what , int value
25+ where statistic ( what , value )
26+ select what , value
You can’t perform that action at this time.
0 commit comments