Commit Graph

4437 Commits

Author SHA1 Message Date
Geoffrey White
07b89b89d7 Swift: Clean up a bit. 2022-06-22 19:35:37 +01:00
Geoffrey White
19026e9ed5 Swift: Work around toString change. 2022-06-22 19:16:09 +01:00
Geoffrey White
da7f49155d Swift: Use dataflow. 2022-06-22 19:16:09 +01:00
Geoffrey White
28d801fde3 Swift: CWE-135 query sources and sinks. 2022-06-22 19:16:08 +01:00
Robert Marsh
42929a70e8 Swift: implement LambdaCall in dataflow library 2022-06-22 17:30:54 +00:00
Mathias Vorreiter Pedersen
77b8ceb976 Swift: Make sure property setters and getters also have ExprNodes. 2022-06-22 17:53:41 +01:00
Paolo Tranquilli
cfde68023d Swift: fix includes jumbled by IDE 2022-06-22 18:17:40 +02:00
Paolo Tranquilli
22321aa124 Swift: reorganize code
Visitor code has been split between header and sources to speed up
incremental build. Moreover the code was reorganized using a new `infra`
bazel package (and `visitors` got promoted to a bazel package as well).
2022-06-22 18:11:58 +02:00
Paolo Tranquilli
e25f22da26 Merge main into redsun82/swift-extraction 2022-06-22 16:54:52 +02:00
Paolo Tranquilli
1fc2bc4938 Swift: really fix tests 2022-06-22 16:15:02 +02:00
Mathias Vorreiter Pedersen
43bfa2af55 Merge pull request #9635 from MathiasVP/swift-add-remote-flow-sources
Swift: Add `RemoteFlowSource`
2022-06-22 14:41:19 +01:00
Mathias Vorreiter Pedersen
a293fd1f3e Merge pull request #9638 from geoffw0/stringlengthconflation
Swift: String length conflation tests (for CVE-2022-23625)
2022-06-22 14:39:34 +01:00
Mathias Vorreiter Pedersen
07c4308a32 Merge branch 'main' into swift-add-remote-flow-sources 2022-06-22 14:27:44 +01:00
Robert Marsh
d13d4c6cd1 Merge pull request #9623 from MathiasVP/swift-interpretElement0
Swift: Interpret MaD strings
2022-06-22 09:27:13 -04:00
Geoffrey White
e07df0d0c8 Swift: make setters private in test. 2022-06-22 14:13:30 +01:00
Geoffrey White
f9e1e630f7 Swift: more accurate NSObject / NSString hierarchy in test. 2022-06-22 12:36:40 +01:00
Paolo Tranquilli
3ed783df7f Swift: fix tests 2022-06-22 12:14:47 +02:00
Paolo Tranquilli
ee5c30ebda Merge main into redsun82/swift-extraction 2022-06-22 11:11:20 +02:00
Anders Schack-Mulligen
df6d68b215 Merge pull request #9618 from aschackmull/dataflow/deprecate-barrierguard-class
Dataflow: Deprecate BarrierGuard class
2022-06-22 10:44:08 +02:00
Michael Nebel
24ba5cc06e Merge pull request #9025 from michaelnebel/csharp/generatedrefactor
C#: Provenance column in Models as Data CSV format.
2022-06-22 10:34:31 +02:00
Paolo Tranquilli
1e4ac44362 Swift: some expression extractions 2022-06-21 17:31:40 +02:00
Paolo Tranquilli
c77fc26c69 Swift: Callable abstraction
This new class encompasses both `AbstractFunctionDecl` and
`AbstractClosureExpr`, together with their common parts (namely
parameters and the body).

`ClosureExpr` and `AutoClosureExpr` got ported to structured C++
generated translation in the process.
2022-06-21 15:50:35 +02:00
Geoffrey White
8989210995 Swift: Fix some details so that the test works. 2022-06-21 14:22:35 +01:00
Mathias Vorreiter Pedersen
415e9742a7 Swift: Add a 'RemoteFlowSource' class. 2022-06-21 14:09:56 +01:00
Mathias Vorreiter Pedersen
f9c8926fcc Swift: Fill in some easy TODOs in 'FlowSummaryImplSpecific' and implement a source model for 'String(contentsOf:)'. 2022-06-21 10:27:46 +01:00
Mathias Vorreiter Pedersen
184371f3ce Swift: Implement 'interpretElement0'. 2022-06-21 10:22:02 +01:00
Mathias Vorreiter Pedersen
ace00c3d09 Swift: Add a 'getName' predicate to types that forwards to the 'getName' from the declaration. 2022-06-21 10:06:01 +01:00
Mathias Vorreiter Pedersen
cf08644b92 Swift: Add an AST class for possible method declarations. 2022-06-21 10:06:01 +01:00
Mathias Vorreiter Pedersen
e2478d1106 Swift: 'getStaticCallTarget' should also return things like 'ConstructorDecl's. 2022-06-21 09:35:56 +01:00
AlexDenisov
7010dffed7 Merge pull request #9622 from github/redsun82/swift-quiet-codegen
Swift: add --quiet to codegen
2022-06-21 07:43:33 +02:00
Paolo Tranquilli
c9f48da569 Swift: add --quiet to codegen 2022-06-20 18:03:59 +02:00
Paolo Tranquilli
3d222a7377 Merge main into redsun82/swift-use-generated-classes 2022-06-20 18:02:13 +02:00
Paolo Tranquilli
48584a6c2e Merge main into redsun82/swift-use-generated-classes 2022-06-20 17:53:21 +02:00
Michael Nebel
b4cb1e58d3 Swift: Sync FlowSummaryImpl to swift. 2022-06-20 16:30:12 +02:00
Mathias Vorreiter Pedersen
a1bf448e56 Swift: Accept more test changes. 2022-06-20 15:28:06 +01:00
Mathias Vorreiter Pedersen
c049988116 Swift: Accept test changes. 2022-06-20 14:57:16 +01:00
Mathias Vorreiter Pedersen
850a90d9a8 Swift: Change the declaration names generated by the extractor to match the output of the Swift compiler. 2022-06-20 14:57:16 +01:00
Anders Schack-Mulligen
730871cc74 Swift: Deprecate BarrierGuard. 2022-06-20 15:46:38 +02:00
Geoffrey White
30557ebe55 Swift: Test for string length conflation query. 2022-06-20 14:38:52 +01:00
Alex Denisov
42dc6814f0 Swift: extract all output-producing source files, not only primary files 2022-06-20 14:06:54 +02:00
Paolo Tranquilli
90f0e3ee72 Swift: remove forgotten resolved TODO 2022-06-20 13:08:28 +02:00
Paolo Tranquilli
95a6c5d4e5 Swift: fix emission of synthesized entities
This was temporarily broken as we were skipping full emission of all
entities without any valid location.

We now rely on `decl->getDeclContext()->getParentSourceFile()` which is
more robust.
2022-06-20 13:00:05 +02:00
Paolo Tranquilli
c9eef0c6f1 Merge pull request #9592 from github/alexdenisov/extend-lua-tracer-config
Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args
2022-06-20 12:53:17 +02:00
Mathias Vorreiter Pedersen
edf0be0854 Merge pull request #9611 from MathiasVP/swift-nomagic-get-location
Swift: Add `nomagic` to `getLocation`
2022-06-20 10:42:45 +01:00
AlexDenisov
304f58b12c Update swift/tools/tracing-config.lua
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
2022-06-20 11:22:13 +02:00
Mathias Vorreiter Pedersen
12d27ec580 Swift: Modify 'toString' in 'OtherConstructorDeclRefExpr' to properly reflect that it's a reference and not a call. 2022-06-20 09:59:23 +01:00
Mathias Vorreiter Pedersen
068ac2b80e Swift: Add 'nomagic' to 'getLocation'. 2022-06-20 09:41:06 +01:00
Paolo Tranquilli
a91c94c38b Swift: temporarily disable failing test 2022-06-20 10:32:19 +02:00
Paolo Tranquilli
1f53b7fbe8 Merge main into alexdenisov/xref-decls 2022-06-20 10:25:29 +02:00
AlexDenisov
f1786f4d6b Apply suggestions from code review
Co-authored-by: Cornelius Riemenschneider <cornelius@github.com>
2022-06-20 07:29:10 +02:00