Commit Graph

82577 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
214ca2a535 Merge pull request #272 from microsoft/jb1/2.22.3
Merge upstream `codeql-cli-2.22.3`
2025-08-12 16:33:08 +02:00
Mathias Vorreiter Pedersen
627ee8536c PS: Port changes from #20132 to PowerShell. 2025-08-12 14:52:12 +01:00
Josh Brown
c6ab9412b6 Merge tag 'codeql-cli/v2.22.3' into jb1/2.22.3
Compatible with CodeQL CLI 2.22.3
2025-08-11 12:56:34 -07:00
Josh Brown
09365313ef merge upstream v2.22.2 2025-08-11 12:45:33 -07:00
Josh Brown
f39c1141d8 Revert "Merge pull request #257 from microsoft/jb1/reapply-22.1-tmp"
This reverts commit 6d496ee073, reversing
changes made to 866977b6c5.
2025-08-11 12:45:01 -07:00
Chanel
337132b5e0 Merge pull request #270 from microsoft/better-api-graphs
PS: Better usability when working with nested classes
2025-08-11 08:03:50 -07:00
Mathias Vorreiter Pedersen
e96e464855 PS: Accept test changes. 2025-08-11 14:22:19 +01:00
Mathias Vorreiter Pedersen
9b5897ca3a PS: Improve api graphs. 2025-08-11 14:22:17 +01:00
Mathias Vorreiter Pedersen
1bd93b9849 PS: Add missing dataflow predicates related to models. 2025-08-08 17:08:15 +01:00
Mathias Vorreiter Pedersen
3829528467 PS: Delete stuff we don't actually need. 2025-08-08 17:07:43 +01:00
Chuan-kai Lin
da3e5479df Merge pull request #20165 from github/release-prep/2.22.3
Release preparation for version 2.22.3
codeql-cli/v2.22.3
2025-08-04 09:19:35 -07:00
Chuan-kai Lin
4df1c12876 Minor CHANGELOG updates 2025-08-04 09:09:25 -07:00
github-actions[bot]
fd82aeb1f8 Release preparation for version 2.22.3 2025-08-04 15:47:57 +00:00
Tom Hvitved
65bf76e3ed Merge pull request #20161 from hvitved/rust/fix-bad-joins
Rust: Fix two bad joins introduced by magic
2025-08-04 17:32:54 +02:00
Geoffrey White
8b5603cf71 Merge pull request #20160 from geoffw0/exec
Rust: Add type inference test cases resembling missing call targets in SQLx.
2025-08-04 16:03:12 +01:00
Geoffrey White
6925d4e564 Merge pull request #20129 from codeqlhelper/main
C++: Static variables are initialized to zero or null by compiler
2025-08-04 13:23:45 +01:00
Tom Hvitved
125a4b9b10 Rust: Fix two bad joins introduced by magic
```
Evaluated relational algebra for predicate TypeInference::closureParameterPath/2#9d0bf423#bbf@ba08cc1s with tuple counts:
           565067    ~172652%    {2} r1 = JOIN `Callable::Callable.getParam/1#dispred#ce0254b3_01#count_range` WITH `Callable::Generated::Callable.getNumberOfParams/0#dispred#abb45996` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            24684     ~11784%    {3}    | JOIN WITH Type::TTupleTypeParameter#5ca17706 ON FIRST 2 OUTPUT Rhs.2, Lhs.1, Lhs.0
             2970      ~1391%    {3}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
              664       ~242%    {4}    | JOIN WITH `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
              303        ~49%    {4}    | JOIN WITH Type::TDynTraitTypeParameter#e16268df ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
              198         ~0%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, _, _, Rhs.1, Lhs.3, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
              198         ~0%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
              198         ~0%    {3}    | SCAN OUTPUT In.1, In.0, In.2

           877984   ~1444714%    {1} r2 = SCAN `CallExprBase::CallExprBase.getArg/1#dispred#d775f13d` OUTPUT In.1
           299888     ~83707%    {3}    | JOIN WITH Type::TTupleTypeParameter#5ca17706_102#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Rhs.2
        515462762     ~59140%    {4}    | JOIN WITH `CallExprBase::Generated::CallExprBase.getNumberOfArgs/0#dispred#0975fe12_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2
          9429188  ~25728933%    {3}    | JOIN WITH TypeInference::InvokedClosureExpr#24e5dacb_1#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2
            53669    ~142315%    {3}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
             4003     ~10522%    {4}    | JOIN WITH `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
              370       ~910%    {4}    | JOIN WITH Type::TDynTraitTypeParameter#e16268df ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
              148       ~293%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, _, _, Rhs.1, Lhs.3, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
              148       ~316%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
              148       ~293%    {3}    | SCAN OUTPUT In.1, In.0, In.2

              346        ~75%    {3} r3 = r1 UNION r2
                                 return r3
```

and

```
Evaluated relational algebra for predicate TypeInference::fnParameterPath/2#4dea2880#bbf@d56000vi with tuple counts:
                1         ~0%    {1} r1 = SCAN `Stdlib::FnOnceTrait.getTypeParam/0#dispred#93f20bbc` OUTPUT In.1
                1         ~0%    {1}    | JOIN WITH Type::TTypeParamTypeParameter#868c69a5 ON FIRST 1 OUTPUT Rhs.1
                1         ~0%    {1}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Rhs.1
           877984   ~1350201%    {2}    | JOIN WITH `ArgList::Generated::ArgList.getArg/1#dispred#b07adc80` CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0
           321252     ~90755%    {4}    | JOIN WITH Type::TTupleTypeParameter#5ca17706_102#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Rhs.2
        553043191     ~65412%    {5}    | JOIN WITH `CallExprBase::Generated::CallExprBase.getNumberOfArgs/0#dispred#0975fe12_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0, Lhs.3
         10089088  ~26772053%    {4}    | JOIN WITH TypeInference::InvokedClosureExpr#24e5dacb_1#join_rhs ON FIRST 1 OUTPUT Lhs.4, Lhs.1, Lhs.2, Lhs.3
            57729    ~157423%    {8}    | JOIN WITH `TypeInference::TypePath::singleton/1#ee45de3b` ON FIRST 1 OUTPUT Lhs.2, Lhs.3, _, _, Lhs.1, Rhs.1, _, _
                                 {4}    | REWRITE WITH Out.2 := (In.4 ++ In.5), Tmp.3 := (In.4 ++ In.5), Tmp.6 := "[0-9]+", Tmp.7 := "", Out.3 := regexpReplaceAll(Tmp.3,Tmp.6,Tmp.7) KEEPING 4
            57729    ~157423%    {6}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3, _
                                 {4}    | REWRITE WITH Out.3 := length(In.4), Tmp.5 := 10, TEST Out.3 <= Tmp.5 KEEPING 4
            57729    ~157423%    {3}    | SCAN OUTPUT In.1, In.0, In.2
                                 return r1
```
2025-08-04 14:22:50 +02:00
Geoffrey White
2ec6dafd18 Rust: Add a type inference test case resembling missing call targets in SQLx. 2025-08-04 10:21:59 +01:00
Simon Friis Vindum
9aebc58214 Merge pull request #20147 from paldepind/rust/type-limit-metric
Rust: Add metric for DCA and debug predicates for type that reach the length limit
2025-08-04 07:53:14 +02:00
Mathias Vorreiter Pedersen
1fab97b765 Merge pull request #20149 from MathiasVP/expose-definition-from-dataflow-ssa
C++: Expose SSA definitions from dataflow
2025-08-01 12:04:04 +01:00
Mathias Vorreiter Pedersen
0e9286dd34 C++: Fix QLDoc. 2025-08-01 11:37:12 +01:00
Mathias Vorreiter Pedersen
b70836e241 C++: Modify the API to not expose dataflow nodes. 2025-08-01 11:34:49 +01:00
Mathias Vorreiter Pedersen
33d05984c8 C++: Stick the exposed SSA classes into a public SSA module. 2025-08-01 11:34:47 +01:00
Mathias Vorreiter Pedersen
32e6d0934e C++: Drive-by fix: These files imported both the public dataflow files and the internal ones. Let's only import the internal ones. 2025-08-01 11:34:45 +01:00
Mathias Vorreiter Pedersen
7ede3aa516 C++: Fix imports. 2025-08-01 10:35:34 +01:00
Mathias Vorreiter Pedersen
0d91622d18 C++: Rename SsaInternals to SsaImpl and SsaInternalsCommon to SsaImplCommon. 2025-08-01 10:34:14 +01:00
codeqlhelper
4323e6853f Update cpp/ql/src/change-notes/2025-07-27-avoid-reporting-static-global-variable.md
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2025-07-31 21:17:29 +08:00
Mathias Vorreiter Pedersen
c8f4b287d1 C++: Add a comment on the old SSA library. 2025-07-31 14:07:38 +01:00
Mathias Vorreiter Pedersen
7e93b99ff9 C++: Add change note. 2025-07-31 13:57:19 +01:00
Mathias Vorreiter Pedersen
8691075aae Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-31 13:52:21 +01:00
Mathias Vorreiter Pedersen
5a91aa2105 C++: Expose SSA definitions from dataflow. 2025-07-31 13:45:03 +01:00
Simon Friis Vindum
abc58ac8b3 Rust: Add metric and debug predicates for type that reach the length limit 2025-07-31 14:20:32 +02:00
Mathias Vorreiter Pedersen
1dae787605 C++: Drive-by fix suggested by Schack. This now matches the predicate in C#. 2025-07-31 12:58:05 +01:00
Ian Lynagh
492e27b8e8 Merge pull request #20141 from igfoo/igfoo/kotlin-2.2.20-beta2
Kotlin: Support 2.2.20-beta2
2025-07-31 12:00:17 +01:00
Ian Lynagh
e589019e04 Kotlin: Use 2.2.20-Beta2 rather than 2.2.20-Beta1 2025-07-30 14:14:14 +01:00
Ian Lynagh
4ea6133042 Kotlin: Add 2.2.20-Beta2 jars 2025-07-30 14:13:02 +01:00
Ian Lynagh
c78818d7dd Kotlin: Remove *2.2.20-Beta1* jars 2025-07-30 14:12:43 +01:00
Simon Friis Vindum
3bc1d47738 Merge pull request #20130 from paldepind/rust/type-inference-fn
Rust: Implement type inference for closures and calls to closures
2025-07-30 13:13:57 +02:00
codeqlhelper
ee3e7e34ba Merge pull request #1 from geoffw0/initnotrun .expected
CPP: Add .expected file for the InitialisationNotRun test
2025-07-30 18:36:29 +08:00
Geoffrey White
c0638a5fcb CPP: Update .expected for the changes here. 2025-07-30 11:24:57 +01:00
Anders Schack-Mulligen
5ca9c090a8 Merge pull request #20132 from aschackmull/ssa/guardvalue
SSA: Update data flow integration and BarrierGuard interface to use GuardValue.
2025-07-30 12:23:17 +02:00
Geoffrey White
d6fddde6e0 CPP: Add .expected (results before query changes here). 2025-07-30 11:22:56 +01:00
Geoffrey White
43bca84310 CPP: Convert test to use a stub rather than a library include. 2025-07-30 11:22:53 +01:00
Simon Friis Vindum
5b152cfdec Rust: Fix typo in change note
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2025-07-29 18:38:14 +02:00
Simon Friis Vindum
5540b9df71 Merge branch 'main' into rust/type-inference-fn 2025-07-29 16:43:17 +02:00
Idriss Riouak
6c00ceaec9 Merge pull request #20134 from github/idrissrio/java-dca-fix
Java: Move `extractorInformationSkipKey` predicate to library pack
2025-07-29 15:32:02 +01:00
idrissrio
ac52a1b123 Java: Move extractorInformationSkipKey predicate to library pack 2025-07-29 09:45:18 +02:00
Simon Friis Vindum
9d72fab287 Merge pull request #20119 from paldepind/rust/type-inference-assoc-type-tp
Rust: Type inference for impl trait types with type parameters
2025-07-28 11:38:17 +02:00
Anders Schack-Mulligen
3b8234ecec SSA: Update data flow integration and BarrierGuard interface to use GuardValue. 2025-07-28 11:29:12 +02:00
Simon Friis Vindum
92bce4e432 Rust: Split getFunctionReturnPos into two predicates 2025-07-28 10:45:59 +02:00