From d1eb9ab5d211dff88d46ab0087da78849ee4e88f Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 09:36:36 -0500 Subject: [PATCH 1/2] Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 3fd830acd97..7c16922c46a 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -767,7 +767,7 @@ class LeapYearGuardCondition extends GuardCondition { * ... values eventually used in the same time struct * If this is even more challenging if the struct the values end up in are not * local (set inter-procedurally). - * This flow flows constants 1-31 to a month or day assignment. + * This configuration looks for constants 1-31 flowing to a month or day assignment. * It is assumed a user of this flow will check if the month/day source and month/day sink * are in the same basic blocks as a year modification source and a year modification sink. * It is also assumed a user will check if the constant source is a value that is ignorable From a53218c2ce424b69428cbb4e621a08ec60db3151 Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 09:36:57 -0500 Subject: [PATCH 2/2] 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-06-UncheckedLeapYearAfterModification_Refactor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md b/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md index 3d0f71c5a65..4a2cf3ef189 100644 --- a/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md +++ b/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Refactor of UncheckedLeapYearAfterYearModification.ql to address large numbers of false positives. Reduced alerts from 40k to 2k. \ No newline at end of file +* Refactored the "Year field changed using an arithmetic operation without checking for leap year" query (`cpp/leap-year/unchecked-after-arithmetic-year-modification`) to address large numbers of false positive results. \ No newline at end of file