Skip to content

Commit c7ea08a

Browse files
committed
Swift: Fix inline expectations.
1 parent 9ecba6a commit c7ea08a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
| testPathInjection.swift:314:35:314:35 | remoteUrl | Unexpected result: hasPathInjection=208 |
2-
| testPathInjection.swift:316:40:316:40 | remoteUrl | Unexpected result: hasPathInjection=208 |

swift/ql/test/query-tests/Security/CWE-022/testPathInjection.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,15 @@ func test() {
311311
// Realm
312312

313313
_ = Realm.Configuration(fileURL: safeUrl) // GOOD
314-
_ = Realm.Configuration(fileURL: remoteUrl) // BAD
314+
_ = Realm.Configuration(fileURL: remoteUrl) // $ hasPathInjection=208
315315
_ = Realm.Configuration(seedFilePath: safeUrl) // GOOD
316-
_ = Realm.Configuration(seedFilePath: remoteUrl) // BAD
316+
_ = Realm.Configuration(seedFilePath: remoteUrl) // $ hasPathInjection=208
317317

318318
var config = Realm.Configuration() // GOOD
319319
config.fileURL = safeUrl // GOOD
320-
config.fileURL = remoteUrl // BAD [NOT DETECTED]
320+
config.fileURL = remoteUrl // $ MISSING: hasPathInjection=208
321321
config.seedFilePath = safeUrl // GOOD
322-
config.seedFilePath = remoteUrl // BAD [NOT DETECTED]
322+
config.seedFilePath = remoteUrl // $ MISSING: hasPathInjection=208
323323
}
324324

325325
func testSanitizers() {

0 commit comments

Comments
 (0)