Commit Graph

78472 Commits

Author SHA1 Message Date
Michael Nebel
930bb6b515 C#: Add FP for string.Format using params collection. 2025-04-24 08:54:42 +02:00
Michael Nebel
39abd5c004 C#: Update test expected output. 2025-04-24 08:54:40 +02:00
Michael Nebel
f31235db43 C#: Improve format logic to take CompositeFormat and generics into account. 2025-04-24 08:54:39 +02:00
Michael Nebel
11dffc6647 C#: Add more invalid-string-formatting testcases. 2025-04-24 08:54:37 +02:00
Michael Nebel
8fb5fe97aa C#: Update test expected output. 2025-04-24 08:54:36 +02:00
Michael Nebel
1d9d8780b3 C#: Remove some false positives and add more true positives for cs/invalid-string-format. 2025-04-24 08:54:34 +02:00
Michael Nebel
f73b7429c6 C#: Remove false positive example. 2025-04-24 08:54:33 +02:00
Michael Nebel
175e4ecb74 C#: Add more format testcases. 2025-04-24 08:54:31 +02:00
Michael Nebel
327ddb07a1 C#: Re-factor FormatMethod. 2025-04-24 08:54:30 +02:00
Michael Nebel
9cfd6e30b9 C#: Convert testing of cs/invalid-string-formatting to inline expectations and adjust some of the testcases. 2025-04-24 08:54:28 +02:00
Michael Nebel
68f93492b1 C#: Add cs/invalid-string-formatting to the codeql quality suite. 2025-04-24 08:54:27 +02:00
Michael Nebel
91f1183dfd Merge pull request #19354 from michaelnebel/csharp/matchlinenumbersonsinks
Shared: Match line information on Alert and Sink locations.
2025-04-24 08:53:01 +02:00
Michael Nebel
2e0ce44fde Javascript: Update test files. 2025-04-23 15:41:41 +02:00
Geoffrey White
37bcedcf11 Merge pull request #19353 from geoffw0/modelnoise2
Rust: Remove unnecessary predicate.
2025-04-23 12:34:40 +01:00
Tom Hvitved
4abdc13f79 Merge pull request #19193 from hvitved/rust/path-resolution-where-clause
Rust: Take `where` clauses into account in path resolution
2025-04-23 13:00:58 +02:00
Michael Nebel
617f4729d8 Shared: Match line information on Alert and Sink locations. 2025-04-23 12:35:17 +02:00
Mathias Vorreiter Pedersen
808141f7e8 Merge pull request #19295 from MathiasVP/cpp-add-mad-generation-library
C++: Instantiate model generation library
2025-04-23 11:32:16 +01:00
Geoffrey White
d6f1bd9792 Rust: Remove unnecessary predicate. 2025-04-23 11:24:29 +01:00
Mathias Vorreiter Pedersen
9e9a580d02 C++: Add MaD generation test with union content. 2025-04-23 11:11:17 +01:00
Mathias Vorreiter Pedersen
07d8f8dd0d C++: Add an empty model to prevent a warning. 2025-04-23 10:24:17 +01:00
Tom Hvitved
008dd3f4e3 Merge pull request #19272 from hvitved/ql4ql/qlref-inline-exp-kind-restrict
QL4QL: Restrict `ql/qlref-inline-expectations` to `(path-)problem` queries
2025-04-23 09:11:24 +02:00
Michael Nebel
62cb4bfd02 Merge pull request #19302 from michaelnebel/csharp/missing-access-control
C#: Relax condition for authorize attributes on `cs/web/missing-function-level-access-control`.
2025-04-23 09:09:32 +02:00
Tom Hvitved
959a79f995 Merge pull request #19345 from hvitved/shared/file-system-append-join-fix
Shared: Fix join in `FileSystem.qll`
2025-04-23 09:01:40 +02:00
Pierre
97ca2afa7a Merge pull request #19348 from github/changedocs-2.21.1
changedocs from 2.21.1 release
2025-04-22 22:14:43 +02:00
Pierre
2439b1e89a Merge branch 'main' into changedocs-2.21.1 2025-04-22 22:04:28 +02:00
Jon Janego
1cf10d8f9f changedocs from 2.21.1 release 2025-04-22 14:51:11 -05:00
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
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
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