Commit Graph

2167 Commits

Author SHA1 Message Date
Michael Nebel
1d82b09ec1 Sync files. 2023-04-13 09:21:05 +02:00
Chris Smowton
7eefa43f5a Rename and document viableArgParamSpecific to make clear it is a temporary hook. 2023-04-12 14:33:46 +01:00
Chris Smowton
4d8ca3d759 Add dataflow callback to filter out receiver argument flow to Golang interface dispatch candidates.
Other langauges stub the callback.
2023-04-12 14:19:06 +01:00
Alexandre Boulgakov
b890e2ef96 Swift: Use camelCase in KeyPathComponent predicates. 2023-04-12 12:50:50 +01:00
Alexandre Boulgakov
64443dfdcf Swift: Add named predicates for known KeyPathComponent kinds. 2023-04-12 12:06:14 +01:00
Alexandre Boulgakov
b900185ae3 Swift: Add db upgrade/downgrade scripts for key-path component extraction.
I've marked both scripts as "partial" since we're extracting different AST components for key-paths and don't have a good way to convert between them in QL. Each deletes the corresponding tables, but leaves non-key-path functionality intact.
2023-04-11 14:00:13 +01:00
Alexandre Boulgakov
35a2d55d18 Swift: Extract structured keypath components.
Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
2023-04-11 13:34:17 +01:00
Alexandre Boulgakov
2b1dea56b5 Swift: Add error query to AST tests.
Preexisting errors are left to be fixed later.
2023-04-11 13:34:16 +01:00
Geoffrey White
3baba70903 Merge pull request #12764 from geoffw0/modernsec
Swift: Modernize the encryption queries
2023-04-06 13:26:32 +01:00
Geoffrey White
fa23d9c1e4 Swift: Clean up and autoformat. 2023-04-05 15:18:40 +01:00
Geoffrey White
501848bd46 Swift: Convert dataflow / taint tests to DataFlow::ConfigSig. 2023-04-05 15:07:02 +01:00
Geoffrey White
07cae40985 Swift: More autoformatting. 2023-04-05 11:32:26 +01:00
Geoffrey White
a7038017da Swift: Improve QLDoc. 2023-04-05 11:08:27 +01:00
Geoffrey White
1c75729598 Swift: Autoformat. 2023-04-05 11:08:27 +01:00
Geoffrey White
0d14835feb Swift: Clean up sources / make some of them extendable as well. 2023-04-05 11:08:26 +01:00
Geoffrey White
fc5e958c8d Swift: Add extendible sinks, sanitizers etc and use them. 2023-04-05 11:08:26 +01:00
Jeroen Ketema
cae1892ab4 Swift: Update StringLengthConflation to use DataFlow::StateConfigSig 2023-04-05 09:12:15 +02:00
Jeroen Ketema
3bd6fd0f51 Swift: Update CleartextStorageDatabase to use DataFlow::ConfigSig 2023-04-04 21:53:29 +02:00
Jeroen Ketema
dd85d00579 Swift: Fix formatting 2023-04-04 09:10:21 +02:00
Jeroen Ketema
cb8568f6fd Swift: Rewrite PathInjection to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
97575807df Swift: Rewrite CleartextTransmission to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
e8bfb87f67 Swift: Rewrite CleartextStoragePreferences to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
a45f381ab9 Swift: Rewrite CleartextLogging to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
5deafeaf9e Swift: Rewrite UnsafeWebViewFetch to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
56156cfa36 Swift: Rewrite UnsafeJsEval to use `DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
db641e508a Swift: Rewrite UncontrolledFormatString to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
0ff607c930 Swift: Rewrite XXEQuery to use DataFlow::ConfigSig 2023-04-04 09:10:21 +02:00
Jeroen Ketema
9220bea3ec Swift: Rewrite SqlInjectionQuery to use DataFlow::ConfigSig 2023-04-04 09:10:15 +02:00
Geoffrey White
e62a6a037c Swift: Split encryption queries into three parts (trivial re-organization of existing code). 2023-04-03 17:20:34 +01:00
Jeroen Ketema
70d0e987c4 Swift: Rewrite PredicateInjection to use DataFlow::ConfigSig 2023-04-03 16:19:30 +02:00
Geoffrey White
4d3fc02d7e Merge pull request #11965 from geoffw0/realmfix
Swift: Test and fix missing swift/cleartext-storage-database results
2023-04-03 14:02:18 +01:00
Paolo Tranquilli
5e45377ad7 Merge pull request #12725 from github/redsun82/swift-successfully-extracted-lines
Swift: add `SuccessfullyExtractedLines` query
2023-04-03 09:12:41 +02:00
Geoffrey White
7f69fe6e8c Swift: Autoformat. 2023-03-31 16:32:49 +01:00
Geoffrey White
91f6b0ba4f Swift: Correct test expectations. 2023-03-31 15:50:59 +01:00
Geoffrey White
c88bea7080 Update swift/ql/lib/codeql/swift/elements/type/TypeAliasType.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-03-31 15:29:49 +01:00
Geoffrey White
b3e0c49435 Swift: Remove unnecessary imports. 2023-03-31 15:03:01 +01:00
Geoffrey White
8a805bb7a3 Swift: Replace getABaseOrAliasedType with slightly more sophisticated getABaseType. 2023-03-31 14:16:42 +01:00
Geoffrey White
302013a7fd Swift: Add a test for Type.getABaseOrAliasedType. 2023-03-31 10:44:01 +01:00
Geoffrey White
33b041242d Swift: Recognize Core Data + Realm sources via type aliases. 2023-03-31 10:44:01 +01:00
Geoffrey White
ddb27e5525 Merge pull request #12724 from geoffw0/modernstring2
Swift: Add missing import.
2023-03-31 09:48:46 +01:00
Paolo Tranquilli
bc698546e5 Swift: specify treatment for multi-line things 2023-03-31 10:32:40 +02:00
Paolo Tranquilli
33b4d2d653 Swift: add SuccessfullyExtractedLines query
This counts how many lines we have extracted some entity in. If we test
changes in this, we can have a more fine grained look into how much we
actually extract than looking at the extracted files.
2023-03-31 10:02:19 +02:00
Geoffrey White
01280aee67 Swift: Add missing import. 2023-03-31 08:48:57 +01:00
Paolo Tranquilli
3e703802b1 Merge pull request #12710 from github/redsun82/swift-imported-modules-as-set
Swift: make imported and exported modules a set
2023-03-31 09:46:44 +02:00
AlexDenisov
3cd0af6622 Merge pull request #12700 from github/redsun82/swift-fix-wmo
Swift: extract all source files in WMO mode
2023-03-30 18:01:48 +02:00
Geoffrey White
daa8141414 Swift: Add test case. 2023-03-30 16:16:40 +01:00
Geoffrey White
beb7d9d7a1 Swift: Test layout change. 2023-03-30 16:13:42 +01:00
Paolo Tranquilli
3d6916eb72 Swift: add upgrade/downgrade scripts 2023-03-30 16:44:28 +02:00
Paolo Tranquilli
6f6d3f1262 Merge branch 'main' into redsun82/swift-imported-modules-as-set 2023-03-30 16:42:35 +02:00
Paolo Tranquilli
06ad5b3949 Revert "Swift: add upgrade/downgrade scripts"
This reverts commit 48c2303391.

This is done to merge main and readd the scripts in another commit.
2023-03-30 16:41:04 +02:00