Commit Graph

307 Commits

Author SHA1 Message Date
Tony Torralba
6a8b9fde78 Add data flowsources test 2022-11-24 12:35:51 +01:00
Tony Torralba
d6b14a1395 Update test expectations 2022-11-24 12:35:50 +01:00
Tony Torralba
2284127650 Add MaD rows for the Data class 2022-11-24 12:35:50 +01:00
Tony Torralba
4f8ef13cd8 Fix expectation in NSData tests 2022-11-24 12:13:46 +01:00
Tony Torralba
2ac06b8db9 Turns out lambda flow is already supported 2022-11-24 10:52:27 +01:00
Geoffrey White
7d45ca6293 Merge branch 'main' into optionals2 2022-11-22 17:35:27 +00:00
Tony Torralba
2e1a78e1bf Add models for NSData and NSMutableData 2022-11-22 15:48:58 +01:00
Tom Hvitved
0d89f57680 Swift: Update expected test output 2022-11-21 12:55:40 +01:00
Geoffrey White
2780d9a9a3 Merge branch 'main' into optionals2 2022-11-17 18:16:46 +00:00
Tom Hvitved
67e8ec1a5f Swift: Update expected test output 2022-11-16 13:36:03 +01:00
Geoffrey White
4c806a442a Swift: Dataflow through ? :. 2022-11-15 12:01:09 +00:00
Geoffrey White
2dbb891942 Swift: Dataflow through ??. 2022-11-15 11:42:43 +00:00
Geoffrey White
9b38e1102a Swift: Add more tests of optionals. 2022-11-15 11:41:04 +00:00
AlexDenisov
e69d003d8f Merge pull request #11196 from github/redsun82/swift-error-element
Swift: create common `ErrorElement` superclass and tests
2022-11-11 15:50:58 +01:00
Mathias Vorreiter Pedersen
38acdaabfa Merge pull request #11111 from geoffw0/tuples
Swift: Content flow through tuples
2022-11-11 14:20:26 +00:00
Paolo Tranquilli
d3ff4908e6 Merge branch 'main' into redsun82/swift-error-element 2022-11-11 14:05:47 +01:00
Paolo Tranquilli
41977d1dbb Swift: implement extraction of new properties 2022-11-11 12:49:48 +01:00
Paolo Tranquilli
3de650e19d Swift: make toBeTested and shouldPrint propagate to children 2022-11-11 12:49:18 +01:00
Paolo Tranquilli
f5b198b8b7 Swift: fix dangling test reference 2022-11-10 17:50:22 +01:00
Geoffrey White
af9ad7b699 Merge branch 'main' into tuples 2022-11-08 21:38:38 +00:00
Mathias Vorreiter Pedersen
4cdcebf022 Merge pull request #11161 from geoffw0/localflowsource
Swift: Add LocalFlowSource class and a few sources.
2022-11-08 16:12:32 +00:00
Geoffrey White
24c8f1d8b5 Swift: Add some local (and remote) flow sources for String. 2022-11-08 13:38:25 +00:00
Geoffrey White
c5285acb04 Swift: Add more tests for String flow sources. 2022-11-08 13:05:40 +00:00
Paolo Tranquilli
552c5249ac Merge pull request #11131 from github/redsun82/swift-incomplete-ast
Swift: deal with incomplete ASTs
2022-11-08 14:01:58 +01:00
Paolo Tranquilli
450a4a04af Swift: add incomplete ast test
The test was inspired by locally running the query against files in
https://github.com/apple/swift/tree/main/test/Parse

A query for missing elements was also added to the AST tests, expecting
nothing to be found.
2022-11-08 11:46:07 +01:00
Tony Torralba
4411852e59 Add BitwiseOperation.qll 2022-11-08 11:33:10 +01:00
Paolo Tranquilli
21adcca065 Swift: add bitwise ops to PrintAst test 2022-11-08 08:53:36 +01:00
Geoffrey White
645906a7d7 Merge branch 'main' into tuples 2022-11-07 13:17:12 +00:00
Geoffrey White
3c07ff592a Swift: Fix result expectations. 2022-11-04 09:44:48 +00:00
Paolo Tranquilli
c8cb30f76e Swift: refactor StmtVisitor to use translations
Also make `visit` in `SwiftDispatcher` work on `const` pointers.

Also, fixed a bug where the guard of a `CaseLabelItem` was not being
extracted, hence the test updates.
2022-11-03 18:16:53 +01:00
Paolo Tranquilli
4702271102 Swift: add cfg.swift to AST tests 2022-11-03 18:16:53 +01:00
Geoffrey White
24f0eeb6df Swift: Better assigning to tuple values. 2022-11-03 15:52:01 +00:00
Geoffrey White
6dc51edb4c Swift: Assigning to tuple values. 2022-11-03 15:51:58 +00:00
Geoffrey White
472ece45e7 Swift: Basic content flow through tuples. 2022-11-03 15:51:33 +00:00
Geoffrey White
a7ecdef2a6 Swift: Add dataflow tests for tuples. 2022-11-03 15:50:27 +00:00
Tony Torralba
b62ede1544 Fix issue in JsExportedSource
Model the source as an access to the tainted field, instead of the field itself (which didn't work)
2022-10-31 12:08:03 +01:00
Tony Torralba
2402504a4c Add missing SummaryPostUpdateNode 2022-10-28 18:24:17 +02:00
Tony Torralba
baf7986cfa Rework types exported through JSContext
Better model the JSExport protocol logic
2022-10-28 15:56:05 +02:00
Tony Torralba
48b0cc0229 Add models for JSContext and JSValue 2022-10-28 13:01:25 +02:00
Tony Torralba
81701547b2 Add taint sources for WKScriptMessage
This is what contains externally-provided data in Webview JS-native bridges
2022-10-28 12:58:27 +02:00
Mathias Vorreiter Pedersen
142e50008e Merge pull request #10967 from MathiasVP/fix-swift-summary
Swift: Fix flow out of summarized callables
2022-10-28 12:57:52 +02:00
Mathias Vorreiter Pedersen
062a0abceb Swift: Fix flow out of summarized callables. 2022-10-28 12:09:05 +02:00
Geoffrey White
ca279f4073 Merge pull request #10996 from geoffw0/methods
Swift: Add MethodDecl.hasQualifiedName
2022-10-27 19:18:48 +01:00
Geoffrey White
e981a28b0f Swift: autoformat test. 2022-10-26 16:32:52 +01:00
Geoffrey White
0d41d4e90c Swift: for consistancy, lets have a simple hasName function as well. 2022-10-26 16:11:01 +01:00
Geoffrey White
b24a27d4ae Swift: Add hasQualifiedName methods and tests. 2022-10-26 16:03:49 +01:00
Tony Torralba
30f5fb6d83 Update expectations after merge 2022-10-24 14:24:13 +02:00
Tony Torralba
f523fbc9d0 Merge branch 'main' into atorralba/swift/customurlschemes 2022-10-24 11:41:50 +02:00
Tony Torralba
3973e1ce04 Update swift/ql/test/library-tests/dataflow/dataflow/FlowConfig.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2022-10-24 11:37:51 +02:00
Tony Torralba
80f7d58fae Add missing tests for not-quite-working flow steps 2022-10-24 09:37:22 +02:00