Paolo Tranquilli
f570cc1916
Merge pull request #10143 from github/redsun82/swift-add-module-to-decl
...
Swift: add module to `Decl`
2022-08-24 11:05:06 +02:00
Mathias Vorreiter Pedersen
de03fbdc49
Swift: Accept test changes.
2022-08-24 10:03:21 +01:00
Mathias Vorreiter Pedersen
997d9e8559
Swift: Include 'self' parameter declaration in the CFG.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
09427af2a2
Swift: Accept test changes.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
ca31984040
Swift: Autogenerate files.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
6e148a4c3f
Swift: Use the inline testing framework for dataflow tests.
2022-08-23 16:31:05 +01:00
Paolo Tranquilli
2fc88d5f8e
Swift: add module to Decl and remove forward traps
...
Add module context to all declarations. As keeping the `std::variant`s
required slightly more work for this, and we intended to remove them
any way, this is done in this change.
For background, we put those in as we were not extracting all modules at
the time, so we were missing some DB ids that we put back in by adding
the "defining" traps not only in the trap file related to the defining
module but also to the one where the declaration was used. Since then
we fixed module extraction, so this should not be needed any more.
2022-08-23 16:53:07 +02:00
Chris Smowton
f3ef8510d3
Merge pull request #10093 from smowton/smowton/feature/java-singular-locations
...
Java: pick an arbitrary representative location when an entity has many candidate locations.
2022-08-22 09:32:43 +01:00
Chris Smowton
8d20b9cf52
Use hasLocationInfo to match several Location fields at once
2022-08-19 19:03:17 +01:00
Chris Smowton
1ea7caf559
Fix join ordering in inline-expectations test
2022-08-19 18:17:22 +01:00
Paolo Tranquilli
631d234026
Swift: expand tests
2022-08-19 16:15:17 +02:00
Paolo Tranquilli
6706ba6ded
Swift: accept toString changes in tests
2022-08-19 15:22:02 +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
erik-krogh
2e44fba67d
add explicit this
2022-08-17 13:33:31 +02:00
Paolo Tranquilli
979706903a
Merge pull request #10070 from github/redsun82/swift-self-apply-tests
...
Swift: add more `SelfApplyExpr` testing
2022-08-17 09:34:20 +02:00
Paolo Tranquilli
f17fed7c9a
Swift: add more SelfApplyExpr testing
2022-08-16 17:46:22 +02:00
Geoffrey White
dd51b7f356
Swift: Add many tests.
2022-08-16 10:04:00 +01:00
Paolo Tranquilli
6dc90bc46c
Swift: accept test change
2022-08-15 11:53:18 +02:00
Paolo Tranquilli
176009ca88
Merge branch 'main' into redsun82/swift-first-prototype-of-generated-ipa-layer
2022-08-15 10:18:41 +02:00
Geoffrey White
c1be060ef8
Swift: Create query + test stubs.
2022-08-11 16:10:18 +01:00
Geoffrey White
1dcc44ff2f
Swift: taintedFromLine -> tainted.
2022-08-11 11:01:05 +01:00
Geoffrey White
d16a7754e1
Swift: Take out common code.
2022-08-10 19:04:01 +01:00
Geoffrey White
d7f50eafae
Swift: Minor fixes.
2022-08-10 19:03:52 +01:00
Geoffrey White
11f45cf20c
Swift: Add expectation annotations.
2022-08-10 18:53:45 +01:00
Geoffrey White
c2ee5fe258
Swift: Add inlineExpectations test.
2022-08-10 18:47:46 +01:00
Geoffrey White
f3499e98a4
Swift: Move try, ! to dataflow.
2022-08-10 15:13:04 +01:00
Geoffrey White
6f696ccc3c
Swift: Effect of merging with main to get the AnyTryExpr fix.
2022-08-09 19:02:59 +01:00
Geoffrey White
efcc696e6e
Merge branch 'main' into defaulttaint
2022-08-09 18:59:36 +01:00
Geoffrey White
36f410b9f7
Swift: Move taint logic from isAdditionalTaintStep to defaultAdditionalTaintStep.
2022-08-09 17:42:28 +01:00
Geoffrey White
242dc80907
Swift: Add taint test of try.
2022-08-09 17:42:25 +01:00
Geoffrey White
3bda9af97a
Swift: Add taint test of Data.
2022-08-09 17:42:24 +01:00
Geoffrey White
42c3e29a29
Swift: Add taint test of URL.
2022-08-09 17:42:23 +01:00
Geoffrey White
068ec8ea20
Swift: More tests of taint flow through Strings.
2022-08-09 16:43:07 +01:00
Geoffrey White
0141609703
Swift: Rename test.
2022-08-09 16:41:26 +01:00
Mathias Vorreiter Pedersen
5ee11c3d7b
Swift: Accept test changes.
2022-08-09 15:12:42 +01:00
Mathias Vorreiter Pedersen
f2767eb03a
Merge pull request #9972 from MathiasVP/swift-taint-through-interpolated-strings
...
Swift: Taint through interpolated strings
2022-08-05 15:55:35 +01:00
Mathias Vorreiter Pedersen
46ec7a9b82
Swift: Add the InlineExpectationsTest framework.
2022-08-05 11:49:15 +01:00
Mathias Vorreiter Pedersen
946b8c68a6
Swift: Accept test changes.
2022-08-05 11:19:00 +01:00
Mathias Vorreiter Pedersen
a302570349
Merge branch 'main' into swift-taint-through-interpolated-strings
2022-08-05 11:17:54 +01:00
Alex Denisov
5e69adb0a9
Swift: extract comments
2022-08-05 11:50:48 +02:00
Mathias Vorreiter Pedersen
1c8090fa04
Merge pull request #9964 from geoffw0/cwe95
...
Swift: Query for CWE-79 / CWE-95
2022-08-05 10:38:33 +01:00
Geoffrey White
1ce06accbd
Swift: Fix capitalization issue?
2022-08-05 10:20:51 +01:00
Mathias Vorreiter Pedersen
ac26371de0
Merge pull request #9909 from geoffw0/stringlengthconflation6
...
Swift: Understand String.utf8.count etc in the string length conflation CVE query
2022-08-05 10:13:25 +01:00
Mathias Vorreiter Pedersen
05e6dd85d4
Swift: Add taint tests for flow through interpolated strings.
2022-08-04 21:57:05 +01:00
Mathias Vorreiter Pedersen
52b78b6e68
Swift: Don't assume we know the call target statically in 'TInOutUpdateNode'.
2022-08-04 21:57:04 +01:00
Mathias Vorreiter Pedersen
3028b80e46
Swift: Control-flow through interpolated strings.
2022-08-04 21:57:04 +01:00
Geoffrey White
39f1352847
Swift: Complete the rename.
2022-08-03 14:45:20 +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
Geoffrey White
c635895644
Swift: Documentation.
2022-08-03 14:45:18 +01:00
Geoffrey White
651b73e21e
Swift: Check for tainted baseURL.
2022-08-03 09:42:48 +01:00