Owen Mansel-Chan
7f1f428b41
Remove invalid code in test
...
"type declarations inside generic functions are not currently supported"
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
aa62fabe26
Fix another place where type could be nil
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
06d139848d
Fix panic when type is unknown
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
2e8b9a9a7d
Fix extractor crash when missing type information
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ba147e8661
Test calls through variables
...
The tests which involve a flow through a receiver with a non-trivial access path
currently don't give the right result. This should be
fixed in a follow-up issue.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4a9aeacb69
Find callee through function instantiation
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
3790c4eb4d
Control flow for generic function instantiations
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0dee215e8c
Update CodeQL tests to go 1.18.1
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
a8a351f6ae
Improve comment
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
20562cb43d
Add missing this. to member predicate calls
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
5257c4ab45
Add control flow test
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
26d4acd3b6
generic function instantions aren't type exprs
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ce9c9cfe9d
CallExpr.getCalleeExpr should get uninstantiated function
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7a7ca619b3
Add data flow tests for generic structs, methods and functions
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4e71ab5cfc
Update comment above first extraction of packages
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
25b91d8155
Update tests
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8c15199ca9
Use generic struct field not instantiated one in Uses
...
We do not extract instantiated named types, and instead use the generic
type. But fields of the underlying struct of an instantiated named types
are obtained from the Uses map. We solve this keeping track of which
objects should be overridden by which other objects.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8276ca04b4
Use generic method not instantiated one in Uses
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
253ca2bb67
Address review comments 2
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
59aa7426ec
Add comments about entities without a parent scope
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
9abc7ea617
Address review comments 1
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4828430fd4
Extract all object types before emitting them
...
Note that `extractObjectType` calls `extractType` which may add
additional objects to the list that `ForEachObject` loops over, so
we should emit object types as a second pass.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4fa972fdc5
Rename variable for clarity
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
1da5399652
Fix obvious test failures
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0194eb98d7
Add an upgrade and downgrade script
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4d9937d1c6
Add tests
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
63d1663eb2
bug fix: label pointer-typed receivers correctly
...
We were trying to convert the object's type to a named type
to iterate through its methods, forgetting that it could also be
a pointer to a named type.
This bug was exposed because we no longer extract an object's
type before extracting it (unless it is a receiver), and when we
extracted a named type we extract its methods and when
extracting a method we extract its receiver and we always give
it the correct label in that situation.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
92c331402d
Extract type parameters in types, not just decls
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
213fa1fec2
Break out of loop when a match has been found
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
982f11f8c7
Make ScopedObjectID take a function
...
This is so that ExtractType() won't be called except in the case
of a receiver variable, which is important for extracting type
parameters.
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
f908a6f1dc
Rename parm to param for clarity
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
1e08201632
Extract type param declarations
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3510f2cdcd
Support non-basic interfaces in extractor
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
a05a525755
Extract generic type instantiations to new table
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
e84db95f9c
Extract generic function instantiations to new table
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
b8ab46d969
Add QL class for type parameter types
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3952b1c07a
Extract type parameter types (and update dbscheme)
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
f7dcb11816
Extract uninstantiated generic types only
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
7f0a37913f
Use Go 1.18
2022-05-10 14:52:09 +01:00
Mathias Vorreiter Pedersen
1d10f14629
Merge pull request #9100 from redsun82/swift-tbd-rework
...
Swift: changes required for TBD node rework
2022-05-10 13:31:43 +01:00
Rasmus Wriedt Larsen
2b6e0cfb44
Merge pull request #8340 from yoff/python/simple-csrf
...
python: minimal CSRF implementation
2022-05-10 13:36:38 +02:00
Rasmus Wriedt Larsen
cb17e2a649
Merge pull request #8595 from porcupineyhairs/pypam
...
Python : Add query to detect PAM authorization bypass
2022-05-10 13:35:12 +02:00
Erik Krogh Kristensen
09360bce20
Merge pull request #9085 from erik-krogh/cash
...
JS: add model for the cash library
2022-05-10 13:20:57 +02:00
Paolo Tranquilli
bf71e4c500
Swift: getPrimaryQlClass -> getAPrimaryQlClass
2022-05-10 12:42:18 +02:00
Tom Hvitved
712fe002b9
Data flow: Sync files
2022-05-10 12:41:10 +02:00
Tom Hvitved
bfabfc3601
Data flow: Add Configuration::includeHiddenNodes()
2022-05-10 12:40:46 +02:00
Paolo Tranquilli
0b9dc9703f
Swift: changes required for TBD node rework
...
These changes are required to allow a new type-safe approach to TBD
nodes, that will come in a separate commit.
This introduces:
* the possibility to add properties to the root `Element`
* a functor taking tags to the corresponding binding trap entry
* `hasProp()` methods for optional properties in QL
* `getPrimaryQlClass()` method
2022-05-10 11:59:25 +02:00
Rasmus Lerchedahl Petersen
aa3d7babf4
python: fix bad merge
...
caused by an optimistic attempt at solving a
merge conflict in the online GUI.
2022-05-10 11:37:41 +02:00
Rasmus Wriedt Larsen
2421076d2f
Merge pull request #8696 from RasmusWL/new-nosql-examples
...
Python: Improve experimental modeling for `pymongo`
2022-05-10 11:03:05 +02:00
yoff
6c3e2db7fd
Merge branch 'main' into python/simple-csrf
2022-05-10 10:55:28 +02:00