Commit Graph

86439 Commits

Author SHA1 Message Date
REDMOND\brodes
febc82dc19 Merge branch 'UncheckedLeaprYearAfterModification_Refactor_Upstream' of https://github.com/microsoft/codeql into UncheckedLeaprYearAfterModification_Refactor_Upstream 2026-02-12 11:12:01 -05:00
REDMOND\brodes
4a7395b017 C++ Suggested code clean up. 2026-02-12 11:11:43 -05:00
Ben Rodes
9bbbbefd34 Apply suggestion from @geoffw0
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 10:20:59 -05:00
Ben Rodes
36e4efe77e Apply suggestion from @geoffw0
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 10:20:32 -05:00
Ben Rodes
f5a38b4701 Apply suggestion from @geoffw0
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 10:17:56 -05:00
Ben Rodes
b39732ba02 Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 10:10:11 -05:00
Ben Rodes
dfe6ed2171 Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 10:09:25 -05:00
REDMOND\brodes
c64a6762d0 Merge branch 'UncheckedLeaprYearAfterModification_Refactor_Upstream' of https://github.com/microsoft/codeql into UncheckedLeaprYearAfterModification_Refactor_Upstream 2026-02-12 09:52:49 -05:00
REDMOND\brodes
f7231f40eb C++: misc comment clean up per PR suggestions. Unified additional flow steps for two similar flows into a common additional step predicate. 2026-02-12 09:52:19 -05:00
Ben Rodes
a53218c2ce Update cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 09:36:57 -05:00
Ben Rodes
d1eb9ab5d2 Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2026-02-12 09:36:36 -05:00
REDMOND\brodes
e2ad1f6511 C++: Updating comment per PR reveiw suggestions. 2026-02-12 09:20:55 -05:00
Simon Friis Vindum
bf02e478fd Rust: Comment out tests with parse errors 2026-02-12 14:49:09 +01:00
REDMOND\brodes
4d4e7a1b5c Pretty print for tests. 2026-02-12 08:28:08 -05:00
Taus
7d17454a3b Merge pull request #21138 from github/tausbn/python-prepare-for-overlay-annotations
Prepare dataflow for local annotations
2026-02-12 14:23:45 +01:00
Taus
3e5c2ddeaf Merge pull request #21308 from github/smowton/admin/path-injection-use-autofix-qhelp
Python: use path-injection qhelp variant employed by autofix
2026-02-12 13:17:08 +01:00
Chris Smowton
5f970d9f2f Rewordings per copilot 2026-02-12 12:01:33 +00:00
Simon Friis Vindum
218585b52a Ruby: Add additonal tests with operators at the start of lines 2026-02-12 12:30:43 +01:00
Anders Schack-Mulligen
a945f15987 Merge pull request #21317 from aschackmull/java/deprecate-unreachableblocks
Java: Deprecate UnreachableBlocks.
2026-02-12 11:43:37 +01:00
Anders Schack-Mulligen
5c53677051 Java: Deprecate UnreachableBlocks. 2026-02-12 11:06:34 +01:00
Mathias Vorreiter Pedersen
2dc91a56eb C++: Lower the treshold for max number of bounds to 2^29. 2026-02-12 09:44:20 +00:00
Mathias Vorreiter Pedersen
6dd6bddff3 C++: Add more terms to make range analysis test timeout. 2026-02-12 09:44:17 +00:00
Mathias Vorreiter Pedersen
a4dd4f91d4 C++: Also compute type bounds for accesses of an enum type. 2026-02-12 09:44:14 +00:00
Mathias Vorreiter Pedersen
90a16cfaee Merge pull request #21314 from MathiasVP/remove-tc
C++: Remove redundant transitive closure
2026-02-12 09:21:56 +00:00
Simon Friis Vindum
a27d20dbcd Rust: Add test cases for binary operator at start of line 2026-02-12 09:31:59 +01:00
Michael Nebel
76ed386246 Merge pull request #21315 from github/workflow/coverage/update
Update CSV framework coverage reports
2026-02-12 08:29:25 +01:00
github-actions[bot]
fea07ebfcb Add changed framework coverage reports 2026-02-12 00:32:08 +00:00
Mathias Vorreiter Pedersen
9596b7b921 C++: No need to compute this TC. 2026-02-11 20:18:03 +00:00
Mathias Vorreiter Pedersen
b14ece72be C++: Add range analysis test demonstrating missing measuring bounds. 2026-02-11 16:58:18 +00:00
Tom Hvitved
9f5b8141f0 Rust: Fix bad join
Before
```
Pipeline standard for TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc@be110b6w was evaluated in 512 iterations totaling 114ms (delta sizes total: 10942).
            8395   ~0%    {5} r1 = JOIN `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev_delta` WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev` ON FIRST 3 OUTPUT Lhs.1, Lhs.2, _, Lhs.0, Lhs.3
            8395   ~0%    {4}    | REWRITE WITH Tmp.2 := 1, Out.2 := (Tmp.2 + In.4) KEEPING 4
            8448   ~0%    {5}    | JOIN WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2_0132#join_rhs` ON FIRST 3 OUTPUT Lhs.3, Rhs.3, Lhs.0, Lhs.1, Lhs.2
            7440   ~0%    {5}    | JOIN WITH TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::MkCallAndPos#53e3fb94#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.2, Lhs.0, Lhs.3, Lhs.4
               0   ~0%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::ArgIsInstantiationOfToIndex::ArgSubstIsInstantiationOf::isInstantiationOf/3#5154f0d6#prev` ON FIRST 2 OUTPUT Lhs.2, Lhs.1, Lhs.3, Lhs.4

            2937   ~0%    {5} r2 = JOIN TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::MkCallAndPos#53e3fb94#prev_delta WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.0, Lhs.1, Rhs.2
               0   ~0%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::ArgIsInstantiationOfToIndex::ArgSubstIsInstantiationOf::isInstantiationOf/3#5154f0d6#prev` ON FIRST 2 OUTPUT Lhs.1, Lhs.4, Lhs.3, Lhs.2

               0   ~0%    {6} r3 = JOIN r2 WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 3 OUTPUT Lhs.3, Lhs.2, Lhs.0, Lhs.1, Rhs.3, _
                          {5}    | REWRITE WITH Tmp.5 := 0, TEST InOut.4 = Tmp.5 KEEPING 5
               0   ~0%    {5}    | SCAN OUTPUT In.2, In.3, In.1, _, In.0
               0   ~0%    {5}    | REWRITE WITH Out.3 := 0
               0   ~0%    {4}    | JOIN WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 4 OUTPUT Lhs.4, Lhs.0, Lhs.1, _
               0   ~0%    {4}    | REWRITE WITH Out.3 := 0

           12463   ~0%    {2} r4 = SCAN `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::ArgIsInstantiationOfToIndex::ArgSubstIsInstantiationOf::isInstantiationOf/3#5154f0d6#prev_delta` OUTPUT In.1, In.0
        22532135   ~0%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#reorder_1_0_2#prev` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Rhs.2
           12463   ~0%    {4}    | JOIN WITH TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::MkCallAndPos#53e3fb94#reorder_0_2_1#prev ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Rhs.2, Lhs.0

           12463   ~2%    {6} r5 = JOIN r4 WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Rhs.3, _
                          {5}    | REWRITE WITH Tmp.5 := 0, TEST InOut.4 = Tmp.5 KEEPING 5
            4285   ~0%    {5}    | SCAN OUTPUT In.0, In.2, In.3, _, In.1
            4285   ~0%    {5}    | REWRITE WITH Out.3 := 0
            4285   ~1%    {4}    | JOIN WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 4 OUTPUT Lhs.4, Lhs.0, Lhs.1, _
            4285   ~1%    {4}    | REWRITE WITH Out.3 := 0

               0   ~0%    {4} r6 = JOIN r2 WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 3 OUTPUT Lhs.3, Lhs.0, Lhs.1, Rhs.3
               0   ~0%    {6}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, _
                          {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.3 - Tmp.5), TEST Out.5 = InOut.4
               0   ~0%    {4}    | SCAN OUTPUT In.0, In.1, In.2, In.3

           12463  ~45%    {4} r7 = JOIN r4 WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 3 OUTPUT Lhs.3, Lhs.0, Lhs.1, Rhs.3
            8178  ~50%    {6}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev` ON FIRST 3 OUTPUT Lhs.1, Lhs.0, Lhs.2, Lhs.3, Rhs.3, _
                          {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.3 - Tmp.5), TEST Out.5 = InOut.4
            7428  ~58%    {4}    | SCAN OUTPUT In.1, In.0, In.2, In.3

            4264   ~0%    {3} r8 = SCAN `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev_delta` OUTPUT In.1, In.2, In.0

            4312   ~0%    {5} r9 = JOIN r8 WITH `_project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/__#join_rhs#1` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2, _, Lhs.2
            4312   ~0%    {5}    | REWRITE WITH Out.3 := 0
            4312   ~0%    {5}    | JOIN WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 4 OUTPUT Lhs.4, Lhs.2, Lhs.0, Lhs.1, _
            4312   ~0%    {5}    | REWRITE WITH Out.4 := 0

           12760   ~0%    {5} r10 = JOIN r8 WITH `project#TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::toCheckRanked/5#52f6d5e0#2` ON FIRST 2 OUTPUT Lhs.2, Lhs.0, Lhs.1, Rhs.2, Rhs.3
               0   ~0%    {7}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev` ON FIRST 3 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.0, Rhs.3, _
                          {7}    | REWRITE WITH Tmp.6 := 1, Out.6 := (InOut.3 - Tmp.6), TEST Out.6 = InOut.5
               0   ~0%    {5}    | SCAN OUTPUT In.4, In.2, In.0, In.1, In.3

            4312   ~0%    {5} r11 = r9 UNION r10
            4288   ~0%    {5}    | JOIN WITH TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::MkCallAndPos#53e3fb94#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.2, Lhs.3, Lhs.4, Lhs.0
               0   ~0%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::ArgIsInstantiationOfToIndex::ArgSubstIsInstantiationOf::isInstantiationOf/3#5154f0d6#prev` ON FIRST 2 OUTPUT Lhs.4, Lhs.1, Lhs.2, Lhs.3

           11713  ~36%    {4} r12 = r1 UNION r3 UNION r5 UNION r6 UNION r7 UNION r11
           10942  ~39%    {4}    | AND NOT `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev`(FIRST 4)
                          return r12
```

After
```
Pipeline standard for TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc@07309ry7 was evaluated in 168 iterations totaling 145ms (delta sizes total: 8395).
        12517   ~0%    {6} r1 = SCAN `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argIsInstantiationOf/5#efdc1fbb#reorder_0_2_3_4_1#prev_delta` OUTPUT In.0, In.1, In.2, In.3, In.4, _
         4337   ~0%    {5}    | REWRITE WITH Tmp.5 := 0, TEST InOut.3 = Tmp.5 KEEPING 5
         4285   ~1%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, _
         4285   ~1%    {4}    | REWRITE WITH Out.3 := 0

            0   ~0%    {4} r2 = JOIN `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev_delta` WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argIsInstantiationOf/5#efdc1fbb#reorder_0_2_3_4_1#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.3

            0   ~0%    {5} r3 = SCAN r2 OUTPUT In.0, In.1, In.2, In.3, _
                       {4}    | REWRITE WITH Tmp.4 := 0, TEST InOut.3 = Tmp.4 KEEPING 4
            0   ~0%    {4}    | SCAN OUTPUT In.0, In.1, In.2, _
            0   ~0%    {4}    | REWRITE WITH Out.3 := 0

         8395   ~0%    {5} r4 = JOIN `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev_delta` WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, _, Lhs.3
         8395   ~0%    {4}    | REWRITE WITH Tmp.3 := 1, Out.3 := (Tmp.3 + In.4) KEEPING 4
            0   ~0%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argIsInstantiationOf/5#efdc1fbb#reorder_0_2_3_4_1#prev` ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3

            0   ~0%    {6} r5 = JOIN r2 WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, _
                       {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.3 - Tmp.5), TEST Out.5 = InOut.4
            0   ~0%    {4}    | SCAN OUTPUT In.0, In.1, In.2, In.3

        12517  ~18%    {4} r6 = SCAN `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argIsInstantiationOf/5#efdc1fbb#reorder_0_2_3_4_1#prev_delta` OUTPUT In.0, In.1, In.2, In.3
        11759  ~12%    {4}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodCall.resolveCallTargetBlanketCand/1#dispred#f8b86f2d#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3
         9874  ~12%    {6}    | JOIN WITH `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, _
                       {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.3 - Tmp.5), TEST Out.5 = InOut.4
         7476  ~18%    {4}    | SCAN OUTPUT In.0, In.1, In.2, In.3

        11761  ~12%    {4} r7 = r1 UNION r3 UNION r4 UNION r5 UNION r6
         8395   ~0%    {4}    | AND NOT `TypeInference::NonMethodResolution::NonMethodArgsAreInstantiationsOfBlanket::argsAreInstantiationsOfToIndex/4#f6ff35dc#prev`(FIRST 4)
                       return r7
```
2026-02-11 16:11:30 +01:00
Owen Mansel-Chan
6a8204d28c "dataflow" -> "data flow" in QLDoc 2026-02-11 13:41:14 +00:00
Owen Mansel-Chan
1ee5728311 Add missing QLDoc 2026-02-11 13:40:20 +00:00
Owen Mansel-Chan
a22fd39230 Use RegexExecution in sanitizer definitions (expands scope) 2026-02-11 13:09:48 +00:00
Owen Mansel-Chan
fa3fba4a00 Use new regex-related classes (no functional change) 2026-02-11 13:09:46 +00:00
Owen Mansel-Chan
44eeee5757 Add and improve classes for regex-related methods 2026-02-11 13:09:45 +00:00
Owen Mansel-Chan
e6dbd525c3 Add RegexExecution in Concepts.qll 2026-02-11 13:09:42 +00:00
Simon Friis Vindum
522e4d64de Merge pull request #21273 from paldepind/rust/tp-assoc
Rust: Implement support for associated types accessed on type parameters
2026-02-11 13:39:55 +01:00
Chris Smowton
bed1ec8981 Enhance path validation recommendations
Expanded recommendations for validating user input when constructing file paths, including normalization and using allowlists.
2026-02-11 12:10:08 +00:00
Simon Friis Vindum
6c67475352 Rust: Minor tweaks in type inference 2026-02-11 12:32:54 +01:00
Simon Friis Vindum
287a8717a8 Rust: Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
2026-02-11 12:19:22 +01:00
Philip Ginsbach-Chen
9ed22610a3 Merge pull request #21306 from github/ginsbach/avoid-nontrivially-shadowing-toString
Avoid non-trivially shadowing `string.toString()`
2026-02-11 11:03:07 +00:00
Tom Hvitved
36c3084435 Merge pull request #21305 from hvitved/rust/type-inference-speedup
Rust: Speedup `inferMethodCallTypeSelf`
2026-02-11 11:03:06 +01:00
Tom Hvitved
37af38eed5 Merge pull request #21282 from hvitved/rust/path-resolution/type-inference-expectations
Rust: Distinguish path resolution expectations from type inference expectations
2026-02-11 11:00:28 +01:00
Tom Hvitved
89e9a253eb Rust: Distinguish path resolution expectations from type inference expectations 2026-02-11 10:33:41 +01:00
Paolo Tranquilli
40b908494c Merge branch 'main' into redsun82/bazel-9 2026-02-11 09:29:52 +01:00
Paolo Tranquilli
000d8244c4 address review 2026-02-11 09:29:42 +01:00
Simon Friis Vindum
2fa71f0c17 Rust: Add examples with associated type accessed on associated type 2026-02-11 09:10:21 +01:00
Simon Friis Vindum
2b10c8aef3 Rust: Fix gramar in qldoc 2026-02-11 09:09:34 +01:00
Michael Nebel
0ac1bc4c57 Merge pull request #21299 from microsoft/lwsimpkins/csharp-mad-httputility-upstream
Update MaD for System.Web.HttpUtility
2026-02-11 08:47:29 +01:00
Anders Schack-Mulligen
cfa62ae434 Merge pull request #21304 from aschackmull/java/deprecation-followup
Java: Add delayed deprecation annotation.
2026-02-11 08:40:01 +01:00