Commit Graph

16 Commits

Author SHA1 Message Date
Anders Schack-Mulligen
228a61ead3 Swift: Add empty provenance column to expected files. 2024-02-09 11:32:07 +01:00
Geoffrey White
b2d3d465f0 Swift: Add more missing details to the URL model (along with a change from the SetContent PR, this fixes the test failures we were getting). 2023-08-07 20:15:50 +01:00
Geoffrey White
a73354d0b3 Swift: Accept test failures. 2023-08-07 20:14:07 +01:00
Geoffrey White
b8f67d7e8a Swift: Test changes (not affecting results). 2023-07-24 09:03:01 +01:00
Mathias Vorreiter Pedersen
c50a0419e2 Swift: Accept test changes. 2023-06-22 09:46:10 +01:00
Anders Schack-Mulligen
b2d3f29ef3 Swift: Fix tests. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
9fe5462b1b Swift: Update more expected output. 2023-04-26 13:41:50 +02:00
Nora Dimitrijević
95d4c304da Swift: Fix .expected tests
Only UnsafeJsEval remains.
2022-12-14 15:02:15 -05:00
Karim Ali
f6bc88471a update the expected output for CWE-079
Now that we have support for taint through fields of String, we can now detect certain flows that we previously marked as [NOT DETECTED]. This commit updates the expected output of CWE-079 (and the in-code annotation of the accompanying test case) to reflect that update.
2022-11-30 16:34:24 +02:00
Mathias Vorreiter Pedersen
062a0abceb Swift: Fix flow out of summarized callables. 2022-10-28 12:09:05 +02:00
Mathias Vorreiter Pedersen
0065a5af96 Swift: Accept path-explanation test changes. 2022-10-06 10:30:18 +01:00
Paolo Tranquilli
38d65d3fae Swift: make ConstructorDecl's name include params
In order to distinguish overloads of the constructor and for consistency
with other function calls, `ConstructorDecl` string representation uses
the name which includes parentheses and parameter labels.

For consistency also the destructor got the same change, which means
all `DestructorDecl`s will now show as `deinit()` rather than `deinit`.
2022-08-30 11:11:50 +02:00
Paolo Tranquilli
9b50336e47 Swift: synthesize MethodRefExpr
This introduces a `MethodRefExpr` node synthesized out of
`DotSyntaxCallExpr` under the `LookupExpr` hierarchy. This means that
much like
```free_function(1, 2)```
is a `CallExpr` with `getFunction` giving a `DeclRefExpr`,
```foo.method(1, 2)```
is now a `CallExpr` with `getFunction` giving a `MethodRefExpr`.

`ApplyExpr::getStaticTarget` has been made work with it (as well as
`ConstructorRefCallExpr` which for the moment has been left where it
is), a new `MethodApplyExpr` has been introduced deriving from it,
and control and data flow libraries have adapted.

A small but was fixed in `qlgen` where the default constructor for DB
types was not correctly subtracting derived IPA types depending on the
order of definitions in `schema.yml`.

There are still some occurrences of `DotSyntaxCallExpr`, and as already
mentioned the other `SelfApply` class (`ConstructorRefCallExpr`) was
left alone. Their treatment is left for a future PR.
2022-08-19 14:48:36 +02:00
Mathias Vorreiter Pedersen
5ee11c3d7b Swift: Accept test changes. 2022-08-09 15:12:42 +01:00
Mathias Vorreiter Pedersen
946b8c68a6 Swift: Accept test changes. 2022-08-05 11:19:00 +01:00
Geoffrey White
81bd61288c Swift: I think CWE-079 is the more accurate CWE for this query. 2022-08-03 14:45:19 +01:00