Commit Graph

66447 Commits

Author SHA1 Message Date
Chris Smowton
6ea7b195db Add test for a module declaration made in a file named other than module-info.java
This triggers a weird corner case in our extractor, which used to throw a null pointer exception.
2023-09-14 17:42:00 +01:00
Chris Smowton
c47ba000d6 Add test exercising the case of a missing type used as an interface
This induces the TypeEnter phase to create an ErrorType with a parameter, which in turn used to cause a stack overflow in comparing the TypeWrapper objects involved.

Note the output remains somewhat broken, exposing an <any> type, but at least the overflow is resolved.
2023-09-14 17:42:00 +01:00
Chris Smowton
4b5651bde9 Add test for Java extracting ErrorType 2023-09-14 17:42:00 +01:00
Chris Smowton
c0f8973749 Add test for extracting a Java AST with an error expression
Also note that ErrorExpr can occur outside upgrade/downgrade scripts
2023-09-14 17:42:00 +01:00
Chuan-kai Lin
264e57fc59 Merge pull request #14222 from github/mergeback-codeql-cli-2.14.5
Custom post-release preparation for codeql-cli-2.14.5
2023-09-14 09:40:11 -07:00
Robert Marsh
ab7cd5254a Swift: update dataflow test for nil coalescing 2023-09-14 16:28:00 +00:00
Mathias Vorreiter Pedersen
8aeb9b9ae0 Merge pull request #14219 from MathiasVP/fix-phi-flow-2
C++: Fix `phi`->`phi` flow
2023-09-14 17:22:51 +01:00
Robert Marsh
9a5fa42dbe Swift: CFG for nil coalescing operator 2023-09-14 16:16:30 +00:00
Mathias Vorreiter Pedersen
b18de9e641 C++: Add a named base case predicate for 'dereferencedByOperation' that can be used in queries. 2023-09-14 17:12:58 +01:00
amammad
5a3a8d781a fix some flowstate bug which Had caused to FP 2023-09-15 02:09:40 +10:00
amammad
08f78a2df4 fix some flowstate bug which Had caused to FP 2023-09-15 01:56:46 +10:00
Ian Lynagh
e5ac7620e3 Kotlin: Add more tests to the "gradle sequential" set 2023-09-14 15:44:32 +01:00
AlexDenisov
ff7ff6dcfa Merge pull request #14201 from MathiasVP/add-ast-consistency-query
C++: Add AST consistency query
2023-09-14 16:34:20 +02:00
Robert Marsh
56b646a74c Merge branch 'main' into rdmarsh2/swift/for-in 2023-09-14 14:14:06 +00:00
Robert Marsh
55546fe61c Merge pull request #14205 from rdmarsh2/rdmarsh2/swift/unify-array-collection-content
Swift: Unify `ArrayContent` and `CollectionContent`
2023-09-14 10:08:37 -04:00
Tom Hvitved
c0e600c515 Merge pull request #12672 from hvitved/ruby/implicit-array-reads-at-sinks
Ruby: Allow for implicit array reads at all sinks during taint tracking
2023-09-14 15:39:37 +02:00
amammad
0d3b944207 fix some mistakes:( 2023-09-14 23:39:28 +10:00
Tom Hvitved
61bfc4ec09 Merge pull request #14204 from hvitved/ruby/simplify-viable-callable
Ruby: Simplify `viableSourceCallableNonInit`
2023-09-14 15:36:47 +02:00
Robert Marsh
dd01da4938 Swift: AST and CFG tests for nil coalescing 2023-09-14 13:26:41 +00:00
Ian Lynagh
52d924924b Kotlin: Extract LighterAST comments as well as PSI comments 2023-09-14 14:24:52 +01:00
Mathias Vorreiter Pedersen
6ce7a56b41 Merge pull request #14190 from github/alexdenisov/await-inconsistencies
Swift: fix CFG for identity expressions (await, dot_self, parent)
2023-09-14 14:15:31 +01:00
Harry Maclean
5411123b8a Ruby: Fix GraphQL test 2023-09-14 14:14:26 +01:00
Robert Marsh
62953cb250 Swift: document "ArrayElement" case in MaD
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-09-14 09:11:35 -04:00
Robert Marsh
6ad78eba05 Swift: ArrayContent aliased to CollectionContent 2023-09-14 13:08:36 +00:00
Mathias Vorreiter Pedersen
b0566af938 C++: Accept test changes. 2023-09-14 14:04:12 +01:00
Mathias Vorreiter Pedersen
36b7b6cffe C++: Fix phi-phi flow. 2023-09-14 14:02:03 +01:00
Mathias Vorreiter Pedersen
2a55034e55 C++: Add failing test. 2023-09-14 14:01:48 +01:00
Michael Nebel
e577fb68bd C#: Add integration test for dotnet dotnet. 2023-09-14 14:59:49 +02:00
Michael Nebel
8768b9e3dd C#: Fix tracer issue with dotnet dotnet. 2023-09-14 14:49:57 +02:00
Erik Krogh Kristensen
7e7852eff6 Merge pull request #13641 from erik-krogh/multi-char
JS/RB: write qhelp for `incomplete-multi-character-sanitization`
2023-09-14 14:48:30 +02:00
Harry Maclean
57ae1ee3e9 Ruby: Add test for GraphQL remote flow sources 2023-09-14 13:46:52 +01:00
Harry Maclean
1526fff085 Ruby: Add missing doc comments 2023-09-14 13:46:37 +01:00
Alex Eyers-Taylor
d79a2c7674 CPP:Make __is_trivial a builtin operation. 2023-09-14 12:50:36 +01:00
Harry Maclean
20f1a74202 Ruby: Restrict GraphQL remote flow sources
Previously we considered any splat parameter in a graphql resolver to be
a remote flow source. Now we limit that to reads of the parameter which
yield scalar types (e.g. String), as defined by the GraphQL schema.

This should reduce GraphQL false positives.
2023-09-14 12:14:56 +01:00
Harry Maclean
4168245fc0 Ruby: Fix doc comments 2023-09-14 10:02:27 +01:00
Harry Maclean
29a8a82e92 Ruby: add more docs for splat flow 2023-09-14 09:26:42 +01:00
Tom Hvitved
97ed5b8afb Ruby: Improvments to splat flow
- Only step through a `SynthSplatParameterElementNode` when there is a splat parameter
  at index > 0.
- Model read+stores via `SynthSplatArgumentElementNode` as a single read-store
  step in type tracking.
2023-09-14 09:26:42 +01:00
Harry Maclean
bf51cbad88 Ruby: Update test fixture 2023-09-14 09:26:38 +01:00
Tom Hvitved
e11a4b63e9 Ruby: Remove SynthSplatArgParameterNode 2023-09-14 09:26:38 +01:00
Harry Maclean
5a6a52b767 Ruby: Use fewer SynthSplatArgumentElementNodes
In cases such as

    def f(x, *y); end

    f(*[1, 2])

we don't need any `SynthSplatArgumentElementNodes`. We get flow from the
splat argument to a `SynthSplatParameterNode` via `parameterMatch`, then
from element 0 of the synth splat to the positional param `x` via a
read step.

We add a read step from element 1 to `SynthSplatParameterElementNode(1)`.
From there we get flow to element 0 of `*y` via an existing store step.
2023-09-14 09:26:38 +01:00
Harry Maclean
4c1beea465 Ruby: Address review comments 2023-09-14 09:26:33 +01:00
Paolo Tranquilli
168aca0af4 Swift: add release notes 2023-09-14 10:25:16 +02:00
Paolo Tranquilli
fc51f4a80e Swift: add update/downgrade scripts 2023-09-14 10:22:59 +02:00
Paolo Tranquilli
270c6407f0 Swift: accept test changes 2023-09-14 10:18:41 +02:00
Paolo Tranquilli
8d02bcc3cb Swift: change non-generated TypeDecl.ql 2023-09-14 10:18:24 +02:00
Michael Nebel
b9acf1a4ee Merge pull request #14111 from michaelnebel/csharp/reduceprojectrestore
C#: Avoid explicitly restoring projects in solution files.
2023-09-14 10:06:49 +02:00
Paolo Tranquilli
cf1667c325 Swift: update extractor after schema changes 2023-09-14 10:05:17 +02:00
Paolo Tranquilli
4d3aecfff6 Swift: rename base_types to syntactic_base_types in TypeDecl 2023-09-14 10:03:52 +02:00
Harry Maclean
3c8683428b Ruby: Model more splat flow (alternative approach) 2023-09-14 08:55:59 +01:00
Harry Maclean
9ccd8cd248 Ruby: Update documentation 2023-09-14 08:54:49 +01:00