Skip to content

Commit b66ed57

Browse files
committed
Swift: Fix a mistake in FlowSources.qll.
1 parent d9f2d34 commit b66ed57

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

swift/ql/lib/codeql/swift/dataflow/FlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class RemoteFlowSource extends FlowSource { }
2828
/**
2929
* A data flow source of local user input that is defined through 'models as data'.
3030
*/
31-
private class ExternalLocalFlowSource extends RemoteFlowSource {
31+
private class ExternalLocalFlowSource extends LocalFlowSource {
3232
ExternalLocalFlowSource() { sourceNode(this, "local") }
3333

3434
override string getSourceType() { result = "external" }

swift/ql/test/library-tests/dataflow/flowsources/FlowSources.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import codeql.swift.dataflow.FlowSources
33
import codeql.swift.dataflow.ExternalFlow
44
import FlowConfig
55

6-
from RemoteFlowSource source
6+
from FlowSource source
77
select source, concat(source.getSourceType(), ", ")

swift/ql/test/library-tests/dataflow/flowsources/FlowSourcesInline.expected

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
| alamofire.swift:365:22:365:31 | .value | Unexpected result: source=remote |
77
| alamofire.swift:372:23:372:32 | .value | Unexpected result: source=remote |
88
| alamofire.swift:379:28:379:37 | .value | Unexpected result: source=remote |
9-
| alamofire.swift:389:28:389:55 | call to String.init(contentsOfFile:) | Unexpected result: source=remote |
9+
| alamofire.swift:389:28:389:55 | call to String.init(contentsOfFile:) | Unexpected result: source=local |
1010
| alamofire.swift:396:22:396:31 | .value | Unexpected result: source=remote |
1111
| alamofire.swift:403:22:403:31 | .value | Unexpected result: source=remote |
1212
| alamofire.swift:404:28:404:50 | call to String.init(contentsOf:) | Unexpected result: source=remote |
1313
| alamofire.swift:411:23:411:32 | .value | Unexpected result: source=remote |
1414
| alamofire.swift:418:22:418:31 | .value | Unexpected result: source=remote |
1515
| alamofire.swift:425:23:425:32 | .value | Unexpected result: source=remote |
1616
| alamofire.swift:431:28:431:37 | .value | Unexpected result: source=remote |
17-
| alamofire.swift:448:20:448:49 | call to String.init(contentsOfFile:) | Unexpected result: source=remote |
17+
| alamofire.swift:448:20:448:49 | call to String.init(contentsOfFile:) | Unexpected result: source=local |
1818
| alamofire.swift:455:23:455:32 | .data | Unexpected result: source=remote |
1919
| alamofire.swift:461:23:461:32 | .data | Unexpected result: source=remote |
2020
| customurlschemes.swift:53:44:53:54 | url | Unexpected result: source=remote |
@@ -31,14 +31,14 @@
3131
| customurlschemes.swift:88:28:88:39 | didUpdate | Unexpected result: source=remote |
3232
| customurlschemes.swift:89:28:89:65 | openURLContexts | Unexpected result: source=remote |
3333
| data.swift:18:20:18:54 | call to Data.init(contentsOf:options:) | Unexpected result: source=remote |
34-
| filemanager.swift:37:23:37:86 | call to contentsOfDirectory(at:includingPropertiesForKeys:options:) | Unexpected result: source=remote |
35-
| filemanager.swift:38:23:38:58 | call to contentsOfDirectory(atPath:) | Unexpected result: source=remote |
36-
| filemanager.swift:39:19:39:52 | call to directoryContents(atPath:) | Unexpected result: source=remote |
37-
| filemanager.swift:41:23:41:58 | call to subpathsOfDirectory(atPath:) | Unexpected result: source=remote |
38-
| filemanager.swift:42:19:42:43 | call to subpaths(atPath:) | Unexpected result: source=remote |
39-
| filemanager.swift:44:19:44:60 | call to destinationOfSymbolicLink(atPath:) | Unexpected result: source=remote |
40-
| filemanager.swift:45:15:45:56 | call to pathContentOfSymbolicLink(atPath:) | Unexpected result: source=remote |
41-
| filemanager.swift:47:14:47:38 | call to contents(atPath:) | Unexpected result: source=remote |
34+
| filemanager.swift:37:23:37:86 | call to contentsOfDirectory(at:includingPropertiesForKeys:options:) | Unexpected result: source=local |
35+
| filemanager.swift:38:23:38:58 | call to contentsOfDirectory(atPath:) | Unexpected result: source=local |
36+
| filemanager.swift:39:19:39:52 | call to directoryContents(atPath:) | Unexpected result: source=local |
37+
| filemanager.swift:41:23:41:58 | call to subpathsOfDirectory(atPath:) | Unexpected result: source=local |
38+
| filemanager.swift:42:19:42:43 | call to subpaths(atPath:) | Unexpected result: source=local |
39+
| filemanager.swift:44:19:44:60 | call to destinationOfSymbolicLink(atPath:) | Unexpected result: source=local |
40+
| filemanager.swift:45:15:45:56 | call to pathContentOfSymbolicLink(atPath:) | Unexpected result: source=local |
41+
| filemanager.swift:47:14:47:38 | call to contents(atPath:) | Unexpected result: source=local |
4242
| generics.swift:10:9:10:16 | .source1 | Unexpected result: source=remote |
4343
| generics.swift:11:9:11:16 | .source2 | Unexpected result: source=remote |
4444
| generics.swift:12:9:12:24 | call to source3() | Unexpected result: source=remote |
@@ -89,9 +89,9 @@
8989
| string.swift:56:21:56:44 | call to String.init(contentsOf:) | Unexpected result: source=remote |
9090
| string.swift:57:21:57:77 | call to String.init(contentsOf:encoding:) | Unexpected result: source=remote |
9191
| string.swift:59:21:59:69 | call to String.init(contentsOf:usedEncoding:) | Unexpected result: source=remote |
92-
| string.swift:62:21:62:48 | call to String.init(contentsOfFile:) | Unexpected result: source=remote |
93-
| string.swift:63:21:63:81 | call to String.init(contentsOfFile:encoding:) | Unexpected result: source=remote |
94-
| string.swift:64:21:64:73 | call to String.init(contentsOfFile:usedEncoding:) | Unexpected result: source=remote |
92+
| string.swift:62:21:62:48 | call to String.init(contentsOfFile:) | Unexpected result: source=local |
93+
| string.swift:63:21:63:81 | call to String.init(contentsOfFile:encoding:) | Unexpected result: source=local |
94+
| string.swift:64:21:64:73 | call to String.init(contentsOfFile:usedEncoding:) | Unexpected result: source=local |
9595
| url.swift:53:15:53:19 | .resourceBytes | Unexpected result: source=remote |
9696
| url.swift:60:15:60:19 | .lines | Unexpected result: source=remote |
9797
| url.swift:67:16:67:22 | .lines | Unexpected result: source=remote |

0 commit comments

Comments
 (0)