File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
swift/ql/lib/codeql/swift/security Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import swift
7
- import codeql.swift.StringFormat
8
- import codeql.swift.dataflow.DataFlow
9
- import codeql.swift.dataflow.TaintTracking
7
+ private import codeql.swift.StringFormat
8
+ private import codeql.swift.dataflow.DataFlow
9
+ private import codeql.swift.dataflow.TaintTracking
10
+ private import codeql.swift.dataflow.ExternalFlow
10
11
11
12
/**
12
13
* A dataflow sink for uncontrolled format string vulnerabilities.
@@ -26,11 +27,14 @@ class UncontrolledFormatStringAdditionalTaintStep extends Unit {
26
27
}
27
28
28
29
/**
29
- * A default uncontrolled format string sink, that is, the format argument to
30
- * a `FormattingFunctionCall`.
30
+ * A default uncontrolled format string sink.
31
31
*/
32
32
private class DefaultUncontrolledFormatStringSink extends UncontrolledFormatStringSink {
33
33
DefaultUncontrolledFormatStringSink ( ) {
34
+ // the format argument to a `FormattingFunctionCall`.
34
35
this .asExpr ( ) = any ( FormattingFunctionCall fc ) .getFormat ( )
36
+ or
37
+ // a sink defined in a Csv model.
38
+ sinkNode ( this , "uncontrolled-format-string" )
35
39
}
36
40
}
You can’t perform that action at this time.
0 commit comments