Commit Graph

51820 Commits

Author SHA1 Message Date
Nora Dimitrijević
535daf39b7 Swift: move getName to Callable (hand-written)
Now that getStaticTarget returns a Callable.
2022-12-14 14:29:13 -05:00
Nora Dimitrijević
89cd082f0a Swift: {Method,Initializer}CallExpr + SelfRefExpr
Adds a bit of symmetry in the API.

Also, fix a couple of tests that were using the old types.
2022-12-14 14:28:01 -05:00
Nora Dimitrijević
5f03099000 Swift: clarify DotSyntaxBaseIgnoredExpr
- Add docstring with implementation note.
- Avoid `concat` aggregate in toString().

Still, this class should really be cleaned up in the following ways:

- Rename to a sane name at the schema level
- Have subtypes that change the return type of getSubExpr to reflect
  the structure of the desugared closure. E.g. one for methods,
  one for fields.
2022-12-14 14:28:00 -05:00
Nora Dimitrijević
16a119248d Swift: remove toString() = "call to call to ..." 2022-12-14 14:28:00 -05:00
Nora Dimitrijević
91f35a5d53 Swift: isStaticOrClassMethod + isInstanceMethod
Still, we should really be extracting these attributes.
2022-12-14 14:28:00 -05:00
Nora Dimitrijević
6a0b020573 Swift: move methodlookup test to library-tests 2022-12-14 14:28:00 -05:00
Nora Dimitrijević
15d5674d12 Swift: update .expected files based on last commit 2022-12-14 14:28:00 -05:00
Nora Dimitrijević
a620658a66 Swift: fix PrintAst order, double parents, orphan decl refs
The main problem is that a lot of the old DotSyntaxApplyExpr->MethodRefExpr
synth-constructor hacks were not fully generalized to SelfApplyExpr
and OtherConstructorDeclRefExpr.

Also:

- Gave a index-in-parent-based ordering to PrintAst nodes(), to stabilize it more.
- Use a slightly more general SelfApplyExpr->Decl conversion
2022-12-14 14:28:00 -05:00
Nora Dimitrijević
b5bb814112 Swift: fix toString of some invisible DeclRefExprs 2022-12-14 14:28:00 -05:00
Nora Dimitrijević
f6d5e8db5f Swift: update test .expected files 2022-12-14 14:27:59 -05:00
Nora Dimitrijević
799b4c932f Swift: DotSyntaxBaseIgnored calls now have static target
This relies on getStaticTarget() returning a Callable... Not sure how I feel about that, since often we want to say

```
exists(Call c |
  c.getStaticTarget().hasName("...")
)
```

and Callable has a sparse interface. Maybe some AbstractFunctionDecl
methods can be moved to Callable.
2022-12-14 14:24:36 -05:00
Nora Dimitrijević
89bfad0420 Swift: fix MethodLookupExpr.getMethod()
By adding a couple missing cases.
2022-12-14 14:24:36 -05:00
Nora Dimitrijević
c1e746a980 Swift: add InitializerLookupExpr < MethodLookupExpr 2022-12-14 14:24:36 -05:00
Nora Dimitrijević
2af8ec86e6 Swift: init/deinit stringifies with qualifier 2022-12-14 14:24:36 -05:00
Nora Dimitrijević
14b84c6e06 Swift: add MethodDecl.isStatic/0 2022-12-14 14:24:36 -05:00
Nora Dimitrijević
668d79a62d Swift: one more rename 2022-12-14 14:24:36 -05:00
Nora Dimitrijević
2b060b1433 Swift: initial schema change (generated part) 2022-12-14 14:24:35 -05:00
Nora Dimitrijević
0c55561b8e Swift: initial schema change (hand-written part) 2022-12-14 14:22:53 -05:00
Nora Dimitrijević
1ede851cf5 Swift: initial getStaticTarget test 2022-12-14 14:22:53 -05:00
Nora Dimitrijević
99719d0ee1 Swift: initial PrintAst test for Method Lookups 2022-12-14 14:22:53 -05:00
Paolo Tranquilli
793de3196b Revert "Swift: accept test changes"
This reverts commit 26ae8f177b.
2022-12-14 18:34:12 +01:00
Paolo Tranquilli
14fd89d482 Swift: generalize output redirection code 2022-12-14 18:26:48 +01:00
Paolo Tranquilli
45c0c7fe6c Merge branch 'main' into redsun82/swift-open-redirection 2022-12-14 18:26:16 +01:00
Jami
33955ee4ab Merge pull request #11623 from jcogs33/jcogs33/exclude-funcexpr-from-dataflowtargetapi
Java/C#: exclude `FunctionalExpr`s from `DataFlowTargetApi`
2022-12-14 12:22:50 -05:00
Owen Mansel-Chan
8703da9db6 Merge pull request #11698 from owen-mc/go/fix-test-to-do-what-it-says
Fix test to use `hasQualifiedName/2`
2022-12-14 17:11:58 +00:00
Jeroen Ketema
31b4dda7bd Merge pull request #11687 from jketema/tainted-path-use-use
C++: Make `cpp/path-injection` work with use-use dataflow
2022-12-14 18:06:05 +01:00
Alvaro Muñoz
f46a8faf00 port RouteSetup API-based implementation to DataFlow one 2022-12-14 17:37:32 +01:00
turbo
b35a1d4206 Adjust docs referring to experimental queries to include details on new tagging system 2022-12-14 17:16:38 +01:00
turbo
4ec401a3f6 Tag all security queries in supported languages' experimental directories with an experimental tag 2022-12-14 17:15:50 +01:00
Tom Hvitved
c04b90bc6b Add change note 2022-12-14 16:30:18 +01:00
Mathias Vorreiter Pedersen
22b04af0fa Merge pull request #11658 from MathiasVP/uncertain-writes
C++: Flow through uncertain writes
2022-12-14 15:26:28 +00:00
Alex Ford
2af5925f38 Ruby: improve coverage of GlobalID::Identification modelling 2022-12-14 15:21:19 +00:00
Owen Mansel-Chan
6ef677b606 Fix test to use hasQualifiedName/2 2022-12-14 15:20:02 +00:00
Owen Mansel-Chan
d18179c243 Add QLDoc for toString on DataFlowType 2022-12-14 14:56:54 +00:00
Jeroen Ketema
bb256514c0 Merge remote-tracking branch 'upstream/main' into mathiasvp/replace-ast-with-ir-use-usedataflow 2022-12-14 15:52:20 +01:00
Asger F
a92acf5218 Merge pull request #11689 from asgerf/js/missing-csrf-qhelp
JS: Update MissingCsrfMiddleware after 'csurf' deprecation
2022-12-14 15:50:32 +01:00
Alvaro Muñoz
818c2da1aa fix Spife tests (without heuristics) 2022-12-14 15:42:27 +01:00
Alvaro Muñoz
4cf7299d79 restore Spife.qll to working status 2022-12-14 15:41:53 +01:00
Owen Mansel-Chan
50414cc748 Make DataFlowType a singleton 2022-12-14 14:40:15 +00:00
Alvaro Muñoz
14faff4477 fix restify tests 2022-12-14 15:38:35 +01:00
Owen Mansel-Chan
38369a72dc Merge pull request #11696 from github/smowton-patch-1
go: fix bug in zip-slip example fix
2022-12-14 14:31:58 +00:00
Michael Nebel
fe3c8613cd Java: Fix name of extensible in java integration test. 2022-12-14 15:25:47 +01:00
Jeroen Ketema
3b78860d8d Merge pull request #11692 from jketema/itemization
C++: Fix itemization in QLDoc
2022-12-14 15:19:12 +01:00
Chris Smowton
5799287a2b go: fix bug in zip-slip example fix 2022-12-14 13:51:32 +00:00
erik-krogh
42880f54a6 change ql/to-string-in-logic to a warning query 2022-12-14 14:48:55 +01:00
erik-krogh
1cd1b14e78 remove some more benign results in ql/suggest-instanceof-extension 2022-12-14 14:48:01 +01:00
erik-krogh
35f9f7c71b remove some benign results from ql/suggest-instanceof-extension 2022-12-14 14:47:58 +01:00
Jami
b248b44983 Merge pull request #11668 from jcogs33/jcogs33/update-isjdkinternal
Java: update `isJdkInternal`
2022-12-14 08:33:18 -05:00
erik-krogh
618f48b60b lower the precision of ql/class-predicate-doesnt-use-this to low 2022-12-14 14:31:22 +01:00
erik-krogh
f34f7cc41a exclude test folders from ql/path-problem-query 2022-12-14 14:31:22 +01:00