Commit Graph

78658 Commits

Author SHA1 Message Date
Jami
4483a24133 Merge pull request #19075 from jcogs33/jcogs33/java/do-not-use-finalizers
Java: Add new quality query to detect `finalize` calls
2025-04-22 14:11:14 -04:00
Jami
ed99088c2b Merge pull request #19094 from jcogs33/jcogs33/java/junit5-missing-nested-annotation
Java: Add new quality query to detect missing `@Nested` annotation in JUnit5 tests
2025-04-22 13:10:00 -04:00
Jeroen Ketema
7ee862a3af Merge pull request #19347 from jketema/swift-files-2
Swift: Make file checking in tests more strict
2025-04-22 17:15:11 +02:00
Jeroen Ketema
adb58e304d Swift: Make file checking in tests more strict
With Swift 6.1 the extractor will start to extract files outside of the test
directory. These files and their elements we do not want to see in our tests.

Test forgotten in https://github.com/github/codeql/pull/19344
2025-04-22 16:51:36 +02:00
Jeroen Ketema
03ce2b0867 Merge pull request #19346 from jketema/swift-files-2
Swift: Make file checking in integration tests more strict
2025-04-22 15:33:33 +02:00
Jeroen Ketema
375ec8f948 Merge pull request #19344 from jketema/swift-files
Swift: Make file checking in tests more strict
2025-04-22 15:33:15 +02:00
Tom Hvitved
40390d1ada Address review comment 2025-04-22 15:08:39 +02:00
Napalys
fdfdcc0d93 Undo unnecessary name tracking for request, response objects 2025-04-22 14:16:45 +02:00
Jeroen Ketema
a211998bc9 Swift: Make file checking in integration tests more strict
With Swift 6.1 the extractor will start to extract files outside of the test
directory. These files and their elements we do not want to see in our tests.
2025-04-22 13:52:15 +02:00
Alexander Eyers-Taylor
c11ed6d119 Merge pull request #19116 from github/alexet/ruby-deterministic
Ruby: Make module graph queries avoid relying on evalaution order.
2025-04-22 11:27:03 +01:00
Tom Hvitved
ae5ac11387 Shared: Fix join in FileSystem.qll
Before
```
Evaluated relational algebra for predicate FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d@d2a7eeoa on iteration 2 running pipeline standard with tuple counts:
         120   ~2%    {4} r1 = SCAN `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev_delta` OUTPUT In.1, In.0, In.2, In.3

           0   ~0%    {6} r2 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#1` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                      {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
           0   ~0%    {4}    | SCAN OUTPUT In.2, In.0, In.1, In.4

          91   ~3%    {6} r3 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                      {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
          81   ~0%    {4}    | SCAN OUTPUT In.4, In.0, In.1, In.2
          81   ~3%    {4}    | JOIN WITH containerparent_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Rhs.1

         269   ~0%    {7} r4 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#2` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Rhs.2, Lhs.1, Lhs.2, Lhs.3, _
                      {7}    | REWRITE WITH Tmp.6 := 1, Out.6 := (InOut.1 - Tmp.6), TEST Out.6 = InOut.4
          39   ~1%    {5}    | SCAN OUTPUT In.5, In.0, In.1, In.2, In.3
        1295   ~0%    {6}    | JOIN WITH containerparent ON FIRST 1 OUTPUT Rhs.1, Lhs.3, _, Lhs.1, Lhs.2, Lhs.4
        1295   ~0%    {6}    | REWRITE WITH Out.2 := 1
          34   ~1%    {4}    | JOIN WITH `cached_FileSystem::Container.splitAbsolutePath/2#dispred#dc97b0cc` ON FIRST 3 OUTPUT Lhs.5, Lhs.3, Lhs.4, Lhs.0

         115   ~0%    {4} r5 = r2 UNION r3 UNION r4
         115   ~0%    {4}    | AND NOT `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev`(FIRST 4)
                      return r5
```

After
```
Evaluated relational algebra for predicate FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d@4fb6e6v7 on iteration 2 running pipeline standard with tuple counts:
        120   ~0%    {4} r1 = SCAN `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev_delta` OUTPUT In.1, In.0, In.2, In.3

          0   ~0%    {6} r2 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#1` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                     {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
          0   ~0%    {4}    | SCAN OUTPUT In.2, In.0, In.1, In.4

         91   ~0%    {6} r3 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                     {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
         81   ~0%    {4}    | SCAN OUTPUT In.4, In.0, In.1, In.2
         81   ~5%    {4}    | JOIN WITH containerparent_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Rhs.1

        269   ~0%    {7} r4 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#2` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Rhs.2, Lhs.1, Lhs.2, Lhs.3, _
                     {7}    | REWRITE WITH Tmp.6 := 1, Out.6 := (InOut.1 - Tmp.6), TEST Out.6 = InOut.4
         39   ~3%    {5}    | SCAN OUTPUT In.5, In.2, In.0, In.1, In.3
         34   ~0%    {4}    | JOIN WITH `FileSystem::Folder::Append<PathResolution::shouldAppend>::getAChildContainer/2#2e91feca` ON FIRST 2 OUTPUT Lhs.4, Lhs.2, Lhs.3, Rhs.2

        115   ~2%    {4} r5 = r2 UNION r3 UNION r4
        115   ~2%    {4}    | AND NOT `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev`(FIRST 4)
                     return r5
```
2025-04-22 12:16:59 +02:00
Napalys Klicius
63402ea581 Merge pull request #2 from asgerf/js/fastify-addhook
JS: Add isMiddlewareSetup() hook to Routing model
2025-04-22 12:07:39 +02:00
Asger F
00661b62dc JS: Add isMiddlewareSetup() hook to Routing model 2025-04-22 12:00:02 +02:00
Anders Schack-Mulligen
d05e90518c Merge pull request #19296 from Marcono1234/patch-1
Docs: Fix typo in code sample
2025-04-22 11:08:17 +02:00
Jeroen Ketema
ce5c48192e Swift: Make file checking in tests more strict
With Swift 6.1 the extractor will start to extract files outside of the test
directory. These files and their elements we do not want to see in our tests.
2025-04-22 10:41:12 +02:00
Asger F
c2cab184ac Merge pull request #19283 from asgerf/js/rest-pattern-fix
JS: Fix missing flow into rest pattern lvalue
2025-04-22 10:37:36 +02:00
Jami Cogswell
3aa6b49204 Java: Add new query to java-code-quality.qls.expected 2025-04-21 10:02:08 -04:00
Jami
72d49f21ee Merge branch 'main' into jcogs33/java/do-not-use-finalizers 2025-04-21 09:57:53 -04:00
Jami Cogswell
07a694e804 Java: add new query to java-code-quality.qls.expected 2025-04-21 09:52:52 -04:00
Jami
02ded89d84 Merge branch 'main' into jcogs33/java/junit5-missing-nested-annotation 2025-04-21 09:46:49 -04:00
Jami
2b9160526a Apply docs review suggestion
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2025-04-20 21:47:25 -04:00
Mathias Vorreiter Pedersen
3fd760c632 C++: Move 'InlineMadTest.qll' out of 'lib/utils/test' and into 'test' since C++ has no external packs depending on MaD testing. 2025-04-20 16:49:02 +01:00
Mathias Vorreiter Pedersen
6fcf56e6e1 C++: Add more tests. 2025-04-20 16:49:00 +01:00
Mathias Vorreiter Pedersen
f6f5f97109 C++: Also make protected members irrelevant. 2025-04-20 16:48:58 +01:00
Mathias Vorreiter Pedersen
e55f94c364 C++: Move contents of 'isUninterestingForDataFlowModels' to 'relevant' 2025-04-20 16:48:56 +01:00
Mathias Vorreiter Pedersen
9cba91c682 C++: Add another entry to 'qlpack' for external models. 2025-04-20 16:48:54 +01:00
Mathias Vorreiter Pedersen
0ce6ab5444 Remove an unnecessary if. 2025-04-20 16:48:53 +01:00
Mathias Vorreiter Pedersen
5462dcdf75 C++: Make final member functions not extensible. 2025-04-20 16:48:51 +01:00
Mathias Vorreiter Pedersen
1f43e51be4 C++: Fix ql-for-ql findings. 2025-04-20 16:48:49 +01:00
Mathias Vorreiter Pedersen
1465058da0 C++: Add copy-pasted files from C#. 2025-04-20 16:48:47 +01:00
Mathias Vorreiter Pedersen
09ebd6e87d C++: Instantiate inline expectation test framework to test model generation. 2025-04-20 16:48:45 +01:00
Mathias Vorreiter Pedersen
f241e4b537 C++: Add tests that will soon succeed. 2025-04-20 16:48:43 +01:00
Mathias Vorreiter Pedersen
3d48b23428 C++: Instantiate model generation library. 2025-04-20 16:48:41 +01:00
Nora Dimitrijević
7f5b48d485 C#: Fix join order in ExternalFlow::interpretElement/6 (only affects RTJO mode) 2025-04-17 15:52:13 +02:00
Geoffrey White
254789c89a Merge pull request #19305 from geoffw0/modelnoise
Rust: Remove the noisy models output from the dataflow/local test.
2025-04-17 13:16:45 +01:00
Geoffrey White
22b3ef7f20 Merge pull request #19333 from geoffw0/consistency
Rust: Make source kinds consistent with other languages
2025-04-17 13:15:00 +01:00
Jeroen Ketema
53bd2361af Merge pull request #19329 from github/idrissrio/designated-initializer
C++: add predicate to distinguish designator-based initializations
2025-04-17 13:15:42 +02:00
Arthur Baars
48f9e5a96d Merge pull request #19237 from github/aibaars/crate-graph-type-variables
Rust: extract generic parameters, arguments and resolve bound type variables
2025-04-17 13:02:41 +02:00
Jeroen Ketema
0bcee84117 C++: Minor textual fixes 2025-04-17 12:33:27 +02:00
Geoffrey White
8d60e82ec0 Merge branch 'main' into modelnoise 2025-04-17 10:43:15 +01:00
Geoffrey White
43069f139d Rust: command-line-source -> commandargs. 2025-04-17 10:15:04 +01:00
Geoffrey White
ed2d06bcd7 Rust: environment-source -> environment. 2025-04-17 09:57:59 +01:00
Geoffrey White
7e108a8a29 Merge pull request #19310 from geoffw0/trim
Rust: Add model for str.trim
2025-04-17 09:48:45 +01:00
Geoffrey White
e1bddb6152 Merge pull request #19304 from geoffw0/rustio
Rust: Model sources for std::io
2025-04-17 09:47:21 +01:00
Geoffrey White
372ba5c9a5 Merge branch 'main' into modelnoise 2025-04-17 09:42:43 +01:00
idrissrio
15fe2fbba6 C++: update stats file 2025-04-16 20:45:33 +02:00
Geoffrey White
9da6d9435e Rust: More tests affected. 2025-04-16 17:41:27 +01:00
idrissrio
36a425715c C++: add upgrade and downgrade scripts 2025-04-16 17:07:25 +02:00
Geoffrey White
77d3c95d6e Merge branch 'main' into trim 2025-04-16 15:33:30 +01:00
idrissrio
d8afd2a786 C++: add change note for designator-based initializations 2025-04-16 16:23:32 +02:00