Commit Graph

2187 Commits

Author SHA1 Message Date
Geoffrey White
a3c66b6032 Merge pull request #12833 from geoffw0/addmodels
Swift: Add some sink models
2023-04-19 14:18:29 +01:00
Geoffrey White
e9ffefaa96 Swift: Improve ExtensionDecl.toString. 2023-04-19 13:38:04 +01:00
Mathias Vorreiter Pedersen
8d62d5916e Merge pull request #12807 from MathiasVP/dataflow-for-keypaths
Swift: Dataflow for keypaths
2023-04-19 10:00:49 +01:00
Nora Dimitrijević
96f06f8eca Swift: refactor the public API wrt captures
This exposes capture- and access-related methods under different names.
2023-04-18 16:50:37 +02:00
Paolo Tranquilli
edb355b47f Swift: add QLdoc for generated Raw and Synth modules 2023-04-17 09:38:26 +02:00
Geoffrey White
d94ed1b4a3 Merge pull request #12824 from geoffw0/modernsec4
Swift: Add CryptoSwift sinks in swift/weak-sensitive-data-hashing
2023-04-14 19:56:37 +01:00
Geoffrey White
2adc4c0feb Swift: PredicatUpgrade predicate injection sources from RemoteFlowSource to FlowSource. Even local input should be in parameters rather than concatenated into the predicate. 2023-04-14 17:50:57 +01:00
Geoffrey White
7b8606d411 Swift: Delete unnecessary import. 2023-04-14 16:36:22 +01:00
Geoffrey White
9ecba6a94d Swift: Add missing imports in ExternalFlow.qll. 2023-04-14 14:58:24 +01:00
Geoffrey White
619d572d50 Swift: Add RNCryptor hmacKey encryption-key sinks. 2023-04-14 14:58:15 +01:00
Geoffrey White
46da73cc11 Swift: Add realm path-injection sinks. 2023-04-14 14:50:50 +01:00
Geoffrey White
feccd307da Swift: Add realm encryption-key sinks. 2023-04-14 14:47:24 +01:00
Geoffrey White
3f8ac1a12b Merge pull request #12794 from geoffw0/modernsec2
Swift: Add CSV extension points to the encryption queries.
2023-04-13 19:43:05 +01:00
Geoffrey White
8c415f3988 Swift: getName() -> getFullName(). 2023-04-13 17:56:07 +01:00
Mathias Vorreiter Pedersen
f9d5e56d9c s/entry/exit 2023-04-13 13:22:07 +01:00
Mathias Vorreiter Pedersen
f32d77b36c Swift: Add QLDoc. 2023-04-13 13:13:18 +01:00
Mathias Vorreiter Pedersen
33bc7eabbb Swift: Fix CFG for key-path expressions. 2023-04-13 13:12:09 +01:00
Mathias Vorreiter Pedersen
859b3051b7 Swift: Add consistency queries to CFG tests. 2023-04-13 13:12:02 +01:00
Michael Nebel
1d82b09ec1 Sync files. 2023-04-13 09:21:05 +02:00
Mathias Vorreiter Pedersen
f46ea325e8 Swift: Add dataflow through key-path expressios by modeling them as lambdas that perform a sequence of read steps. 2023-04-12 17:38:34 +01: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
Geoffrey White
cdcee5cc75 Swift: Add high-level CryptoSwift sinks. 2023-04-11 19:59:43 +01:00
Geoffrey White
539f8f0f70 Swift: Add mid-level CryptoSwift sinks and prevent duplication that results. Overall this doesn't give us any new results in tests, but makes paths shorter, and in the real world I expect it to add reliability. 2023-04-11 19:54:55 +01:00
Geoffrey White
51a62b54ee Swift: Add low-level CryptoSwift sinks. 2023-04-11 19:54:48 +01:00
Geoffrey White
d299d92025 Swift: Prevent potentially misleading duplicate results. 2023-04-11 19:39:09 +01:00
Geoffrey White
03a4084c11 Swift: Update some sinks to CSV format. 2023-04-11 18:10:54 +01:00
Geoffrey White
256c3f66ca Swift: Various minor fixes / consistency improvements to sinks. 2023-04-11 17:04:09 +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
Geoffrey White
7ddfcb28e5 Swift: Rename DefaultConstantPasswordSink -> CryptoSwiftPasswordSink. 2023-04-11 11:49:21 +01:00
Geoffrey White
d4cc86cd05 Swift: Make the RNCryptor sources wider (actual usage seems to vary). 2023-04-06 20:36:12 +01:00
Geoffrey White
81b0dbffbd Swift: Add CSV extension points to the encryption queries. 2023-04-06 14:07:41 +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
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