Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
41b94e7
Add spring websocket handler models
joefarebrother Dec 8, 2025
a594ca9
Add tests
joefarebrother Dec 8, 2025
1d61da5
Generate stubs
joefarebrother Dec 8, 2025
d98e660
Test fixes + more tests
joefarebrother Dec 9, 2025
d0cd4ee
Add change note
joefarebrother Dec 9, 2025
94fcee5
minor formatting tweak
joefarebrother Dec 9, 2025
7768ebe
Python: Add parser support for template strings
tausbn Oct 28, 2025
cd7ae34
Python: Regenerate parser files
tausbn Oct 28, 2025
28e733e
Python: Support template strings in rest of extractor
tausbn Oct 28, 2025
652c335
Python: Regenerate AST and dbscheme files
tausbn Oct 28, 2025
414e689
Python: Add AST node wrappers
tausbn Dec 4, 2025
47c967a
Python: Bump extractor version
tausbn Dec 4, 2025
82c629a
Python: Add up-/downgrade scripts for template literals
tausbn Dec 4, 2025
b9616eb
Python: Add stats
tausbn Dec 4, 2025
4d45b58
Python: Add change note
tausbn Dec 4, 2025
119ecff
C#: Implicit span conversion.
michaelnebel Dec 18, 2025
44c9c58
C#: Add implicit span conversion test case.
michaelnebel Dec 18, 2025
1817f9c
C#: Add change-note.
michaelnebel Dec 18, 2025
6b03130
Python: Fix bad join in `import_points_to`
tausbn Dec 18, 2025
57d8851
Update supported platforms
jketema Dec 19, 2025
f23351a
Rust: Refactor MaD provanance-based filtering
hvitved Dec 19, 2025
ac859d9
Merge pull request #21070 from jketema/jketema/supported-platforms
jketema Jan 5, 2026
06a5648
Rust: Speedup `AccessAfterLifetime.ql`
hvitved Dec 19, 2025
5bc457f
Rust: Move logic from `AccessAfterLifetimeExtensions.qll` to `AccessA…
hvitved Jan 5, 2026
2543754
Rust: Remove `newtype` construction
hvitved Jan 5, 2026
ba922fc
Kotlin: Mark support for Kotlin versions 1.6 and 1.7 as deprecated
andersfugmann Jan 5, 2026
f87cb4a
Update docs/codeql/reusables/supported-versions-compilers.rst
andersfugmann Jan 5, 2026
2d90cc8
C#: Update hardcoded package version numbers for stub generation.
michaelnebel Dec 19, 2025
3f25065
C#: Re-generate stubs.
michaelnebel Dec 19, 2025
576998a
C#: Manual corrections to the generated stubs.
michaelnebel Dec 19, 2025
a671810
C#: Update test options files to point to the new stubs versions.
michaelnebel Dec 19, 2025
bbec35b
C#: Update flow summaries test expected output.
michaelnebel Dec 19, 2025
4ebbd1f
Docs: clarify behavior of range checks
nickrolfe Jan 5, 2026
5faa546
Merge pull request #21096 from github/nickrolfe/doc-range-checks
nickrolfe Jan 5, 2026
836b667
Address review comment
hvitved Jan 5, 2026
16b2e71
Merge pull request #21069 from michaelnebel/net10/stubs
michaelnebel Jan 6, 2026
19179d5
Merge pull request #21071 from hvitved/rust/access-after-lifetime-perf
hvitved Jan 6, 2026
ae9588e
Rust: Improve `TuplePositionContent.getAnAccess`
hvitved Jan 5, 2026
0d5f1b1
C#: Update .NET runtime generated models.
michaelnebel Jan 5, 2026
5299b35
C#: Update models test expected output.
michaelnebel Jan 5, 2026
f532154
C#: Add change note.
michaelnebel Jan 5, 2026
103b3df
Merge pull request #21093 from github/andersfugmann/deprecate_kotlin_1.7
andersfugmann Jan 6, 2026
2e20804
C#: Update test expected output.
michaelnebel Jan 6, 2026
ff1ec47
Merge pull request #21095 from michaelnebel/net10/generatedmodels
michaelnebel Jan 6, 2026
0a0cbdb
C#14: Test for nameof generic type.
michaelnebel Jan 6, 2026
3583394
Ruby: Fix bad join
hvitved Jan 6, 2026
102cfd0
Add integration test for paths and paths-ignore vs. Java buildless mode
smowton Dec 16, 2025
6fb6923
Change note
smowton Dec 16, 2025
f32860b
Merge pull request #21100 from michaelnebel/csharp14/nameofgenerictype
michaelnebel Jan 6, 2026
bfcd360
Merge pull request #21049 from smowton/smowton/admin/java-buildless-p…
smowton Jan 6, 2026
5359b3d
Merge pull request #21099 from hvitved/rust/fix-todo
hvitved Jan 6, 2026
eca451e
Merge pull request #21101 from hvitved/ruby/fix-bad-join
hvitved Jan 6, 2026
87a9065
C++: Update expected test results after frontend update
jketema Nov 27, 2025
2615dab
C++: Update supported compiler versions
jketema Nov 27, 2025
509cbf7
C++: Add `cpp/constant-comparison` FP test cases after frontend update
jketema Dec 11, 2025
90d6c9f
C++: Exclude more comparisons from `cpp/constant-comparison`
jketema Dec 4, 2025
1f10cdd
C++: Accept test changes after frontend update and uncomment test case
jketema Dec 11, 2025
112eaad
C++: Add another `cpp/constant-comparison` FP test case
jketema Dec 19, 2025
5117b59
C++: Exclude comparisons from enum constants in `cpp/constant-comparison
jketema Dec 19, 2025
17b22bc
C++: Update expected test results after frontend _Generic fix
jketema Dec 30, 2025
d02ef7c
C++: Add change notes
jketema Jan 2, 2026
4ede207
Merge pull request #20926 from jketema/jketema/frontend-update
jketema Jan 6, 2026
72f9e34
Merge pull request #20708 from github/tausbn/python-add-support-for-t…
tausbn Jan 6, 2026
da6d0ab
Address review comment
hvitved Jan 6, 2026
1a2f722
Merge pull request #21072 from hvitved/rust/mad-provenance-refactor
hvitved Jan 6, 2026
b686890
C#: Address review comments.
michaelnebel Jan 6, 2026
740518d
C++: Use the loaded `this` instead of the `this` initialization
jketema Jan 6, 2026
3cd9938
C++: Update expected test results after IR changes
jketema Jan 6, 2026
6e2702c
Rust: Add some taint tests involving tuples.
geoffw0 Nov 28, 2025
063e5d3
C++: Remove redundant SSA branch after IR fix
jketema Jan 6, 2026
13df236
Rust: Effect of lifting content reads as taint steps.
geoffw0 Nov 28, 2025
c567197
C++: Simplify expression
jketema Jan 6, 2026
53a0b8d
Add changed framework coverage reports
github-actions[bot] Jan 7, 2026
77b0c4b
Merge pull request #21111 from github/workflow/coverage/update
michaelnebel Jan 7, 2026
a991afd
C#: Use ref conversions (including variance conversions) for element …
michaelnebel Jan 7, 2026
8fe31a1
C#: Add some more testcases and update test expected output.
michaelnebel Jan 7, 2026
503a1b5
Merge pull request #21107 from geoffw0/rusttest
geoffw0 Jan 7, 2026
1e79213
Rust: Add `Result::Err` to `excludeFieldTaintStep`
hvitved Jan 7, 2026
6c291e1
Add model for `handlePongMessage` and update test
owen-mc Jan 7, 2026
7ed3d3f
Merge pull request #21065 from michaelnebel/csharp/implicitspanconver…
michaelnebel Jan 7, 2026
2d4da80
Merge pull request #21114 from hvitved/rust/exclude-result-err-taint-…
hvitved Jan 7, 2026
9db11f7
Revert "Add integration test for paths and paths-ignore vs. Java buil…
smowton Jan 7, 2026
688f10d
Revert "Change note"
smowton Jan 7, 2026
6a3c74c
Merge pull request #20999 from joefarebrother/java-spring-websocket
owen-mc Jan 7, 2026
a5f6806
Merge pull request #21105 from jketema/load-this
jketema Jan 7, 2026
d048d39
Merge pull request #21117 from smowton/smowton/admin/revert-java-path…
smowton Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions cpp/ql/lib/change-notes/2026-01-02-constant-folding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Some constants will now be represented by their unfolded expression trees. The `isConstant` predicate of `Expr` will no longer yield a result for those constants.
Original file line number Diff line number Diff line change
Expand Up @@ -688,15 +688,9 @@ private module Cached {
conversionFlow(mid, instr, false, _)
)
or
exists(int ind0 |
exists(Operand address |
isDereference(operand.getDef(), address, _) and
isUseImpl(address, base, ind0)
)
or
isUseImpl(operand.getDef().(InitializeParameterInstruction).getAnOperand(), base, ind0)
|
ind0 = ind - 1
exists(Operand address |
isDereference(operand.getDef(), address, _) and
isUseImpl(address, base, ind - 1)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,7 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St
final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
tag = OnlyInstructionTag() and
operandTag instanceof UnaryOperandTag and
result = getTranslatedFunction(getEnclosingFunction(expr)).getInitializeThisInstruction()
result = getTranslatedFunction(getEnclosingFunction(expr)).getLoadThisInstruction()
}

final override Field getInstructionField(InstructionTag tag) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ class TranslatedFunction extends TranslatedRootElement, TTranslatedFunction {
final predicate hasReturnValue() { hasReturnValue(func) }

/**
* Gets the single `InitializeThis` instruction for this function. Holds only
* if the function is an instance member function, constructor, or destructor.
* Gets the first load of `this` for this function. Holds only if the function
* is an instance member function, constructor, or destructor.
*/
final Instruction getInitializeThisInstruction() {
result = getTranslatedThisParameter(func).getInstruction(InitializerStoreTag())
final Instruction getLoadThisInstruction() {
result = getTranslatedThisParameter(func).getInstruction(InitializerIndirectAddressTag())
}

/**
Expand Down Expand Up @@ -639,7 +639,7 @@ class TranslatedConstructorInitList extends TranslatedElement, InitializationCon
}

override Instruction getTargetAddress() {
result = getTranslatedFunction(func).getInitializeThisInstruction()
result = getTranslatedFunction(func).getLoadThisInstruction()
}

override Type getTargetType() { result = getTranslatedFunction(func).getThisType() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ abstract class TranslatedBaseStructorCall extends TranslatedStructorCallFromStru
final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
tag = OnlyInstructionTag() and
operandTag instanceof UnaryOperandTag and
result = getTranslatedFunction(this.getFunction()).getInitializeThisInstruction()
result = getTranslatedFunction(this.getFunction()).getLoadThisInstruction()
}

final override predicate getInstructionInheritance(
Expand Down Expand Up @@ -1000,7 +1000,7 @@ class TranslatedConstructorDelegationInit extends TranslatedConstructorCallFromC
}

final override Instruction getReceiver() {
result = getTranslatedFunction(this.getFunction()).getInitializeThisInstruction()
result = getTranslatedFunction(this.getFunction()).getLoadThisInstruction()
}
}

Expand Down
7 changes: 6 additions & 1 deletion cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ import UnsignedGEZero
//
// So to reduce the number of false positives, we do not report a result if
// the comparison is in a macro expansion. Similarly for template
// instantiations.
// instantiations, static asserts, non-type template arguments, enum constants,
// and constexprs.
from ComparisonOperation cmp, SmallSide ss, float left, float right, boolean value, string reason
where
not cmp.isInMacroExpansion() and
not cmp.isFromTemplateInstantiation(_) and
not exists(StaticAssert s | s.getCondition() = cmp.getParent*()) and
not exists(Declaration d | d.getATemplateArgument() = cmp.getParent*()) and
not exists(Variable v | v.isConstexpr() | v.getInitializer().getExpr() = cmp.getParent*()) and
not exists(EnumConstant e | e.getInitializer().getExpr() = cmp.getParent*()) and
not functionContainsDisabledCode(cmp.getEnclosingFunction()) and
reachablePointlessComparison(cmp, left, right, value, ss) and
// a comparison between an enum and zero is always valid because whether
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/change-notes/2026-01-02-constant-comparison.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The `cpp/constant-comparison` query has been updated to not produce false positives for constants that are now represented by their unfolded expression trees.
4 changes: 1 addition & 3 deletions cpp/ql/test/library-tests/constants/addresses/addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ void constantAddresses(int param) {
constexpr int *array2d = &int_arr_arr[1][1] + 1;
constexpr int *const_ints = &int_arr_arr[int_const][extern_int_const];

// Commented out because clang and EDG disagree on whether this is
// constant.
//constexpr int *stmtexpr_int = &int_arr[ ({ 1; }) ];
constexpr int *stmtexpr_int = &int_arr[ ({ 1; }) ];

constexpr int *comma_int = &int_arr[ ((void)0, 1) ];
constexpr int *comma_addr = ((void)0, &int_var);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
| addresses.cpp:29:35:29:54 | & ... | stmtexpr_int | misclassified as NOT constant |
| addresses.cpp:31:32:31:55 | & ... | comma_int | misclassified as NOT constant |
| addresses.cpp:36:39:36:70 | ... ? ... : ... | ternary_ptr_cond | misclassified as NOT constant |
| addresses.cpp:37:35:37:69 | & ... | ptr_subtract | misclassified as NOT constant |
| addresses.cpp:39:35:39:50 | ... + ... | constexpr_va | misclassified as NOT constant |
18 changes: 9 additions & 9 deletions cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ edges
| C.cpp:18:12:18:18 | call to C [s3] | C.cpp:18:12:18:18 | *new [s3] | provenance | |
| C.cpp:19:5:19:5 | *c [s1] | C.cpp:27:8:27:11 | *this [s1] | provenance | |
| C.cpp:19:5:19:5 | *c [s3] | C.cpp:27:8:27:11 | *this [s3] | provenance | |
| C.cpp:22:3:22:3 | *C [post update] [s1] | C.cpp:22:3:22:3 | *this [Return] [s1] | provenance | |
| C.cpp:22:3:22:3 | *this [Return] [s1] | C.cpp:18:12:18:18 | call to C [s1] | provenance | |
| C.cpp:22:3:22:3 | *this [Return] [s3] | C.cpp:18:12:18:18 | call to C [s3] | provenance | |
| C.cpp:22:3:22:3 | *this [post update] [s1] | C.cpp:22:3:22:3 | *this [Return] [s1] | provenance | |
| C.cpp:22:12:22:21 | new | C.cpp:22:3:22:3 | *this [post update] [s1] | provenance | |
| C.cpp:22:12:22:21 | new | C.cpp:22:3:22:3 | *C [post update] [s1] | provenance | |
| C.cpp:22:12:22:21 | new | C.cpp:22:12:22:21 | new | provenance | |
| C.cpp:24:5:24:8 | *this [post update] [s3] | C.cpp:22:3:22:3 | *this [Return] [s3] | provenance | |
| C.cpp:24:5:24:25 | ... = ... | C.cpp:24:5:24:8 | *this [post update] [s3] | provenance | |
Expand Down Expand Up @@ -736,12 +736,12 @@ edges
| constructors.cpp:19:22:19:23 | *this [b_] | constructors.cpp:19:22:19:23 | b_ | provenance | |
| constructors.cpp:19:22:19:23 | b_ | constructors.cpp:19:9:19:9 | *b | provenance | |
| constructors.cpp:19:22:19:23 | b_ | constructors.cpp:19:22:19:23 | b_ | provenance | |
| constructors.cpp:23:5:23:7 | *this [post update] [a_] | constructors.cpp:23:5:23:7 | *this [Return] [a_] | provenance | |
| constructors.cpp:23:5:23:7 | *this [post update] [b_] | constructors.cpp:23:5:23:7 | *this [Return] [b_] | provenance | |
| constructors.cpp:23:5:23:7 | *Foo [post update] [a_] | constructors.cpp:23:5:23:7 | *this [Return] [a_] | provenance | |
| constructors.cpp:23:5:23:7 | *Foo [post update] [b_] | constructors.cpp:23:5:23:7 | *this [Return] [b_] | provenance | |
| constructors.cpp:23:13:23:13 | a | constructors.cpp:23:28:23:28 | a | provenance | |
| constructors.cpp:23:20:23:20 | b | constructors.cpp:23:35:23:35 | b | provenance | |
| constructors.cpp:23:28:23:28 | a | constructors.cpp:23:5:23:7 | *this [post update] [a_] | provenance | |
| constructors.cpp:23:35:23:35 | b | constructors.cpp:23:5:23:7 | *this [post update] [b_] | provenance | |
| constructors.cpp:23:28:23:28 | a | constructors.cpp:23:5:23:7 | *Foo [post update] [a_] | provenance | |
| constructors.cpp:23:35:23:35 | b | constructors.cpp:23:5:23:7 | *Foo [post update] [b_] | provenance | |
| constructors.cpp:26:15:26:15 | *f [a_] | constructors.cpp:28:10:28:10 | *f [a_] | provenance | |
| constructors.cpp:26:15:26:15 | *f [b_] | constructors.cpp:29:10:29:10 | *f [b_] | provenance | |
| constructors.cpp:28:10:28:10 | *f [a_] | constructors.cpp:18:9:18:9 | *this [a_] | provenance | |
Expand Down Expand Up @@ -1122,9 +1122,9 @@ nodes
| C.cpp:18:12:18:18 | call to C [s3] | semmle.label | call to C [s3] |
| C.cpp:19:5:19:5 | *c [s1] | semmle.label | *c [s1] |
| C.cpp:19:5:19:5 | *c [s3] | semmle.label | *c [s3] |
| C.cpp:22:3:22:3 | *C [post update] [s1] | semmle.label | *C [post update] [s1] |
| C.cpp:22:3:22:3 | *this [Return] [s1] | semmle.label | *this [Return] [s1] |
| C.cpp:22:3:22:3 | *this [Return] [s3] | semmle.label | *this [Return] [s3] |
| C.cpp:22:3:22:3 | *this [post update] [s1] | semmle.label | *this [post update] [s1] |
| C.cpp:22:12:22:21 | new | semmle.label | new |
| C.cpp:22:12:22:21 | new | semmle.label | new |
| C.cpp:24:5:24:8 | *this [post update] [s3] | semmle.label | *this [post update] [s3] |
Expand Down Expand Up @@ -1678,10 +1678,10 @@ nodes
| constructors.cpp:19:22:19:23 | *this [b_] | semmle.label | *this [b_] |
| constructors.cpp:19:22:19:23 | b_ | semmle.label | b_ |
| constructors.cpp:19:22:19:23 | b_ | semmle.label | b_ |
| constructors.cpp:23:5:23:7 | *Foo [post update] [a_] | semmle.label | *Foo [post update] [a_] |
| constructors.cpp:23:5:23:7 | *Foo [post update] [b_] | semmle.label | *Foo [post update] [b_] |
| constructors.cpp:23:5:23:7 | *this [Return] [a_] | semmle.label | *this [Return] [a_] |
| constructors.cpp:23:5:23:7 | *this [Return] [b_] | semmle.label | *this [Return] [b_] |
| constructors.cpp:23:5:23:7 | *this [post update] [a_] | semmle.label | *this [post update] [a_] |
| constructors.cpp:23:5:23:7 | *this [post update] [b_] | semmle.label | *this [post update] [b_] |
| constructors.cpp:23:13:23:13 | a | semmle.label | a |
| constructors.cpp:23:20:23:20 | b | semmle.label | b |
| constructors.cpp:23:28:23:28 | a | semmle.label | a |
Expand Down
10 changes: 9 additions & 1 deletion cpp/ql/test/library-tests/ir/ir/PrintAST.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
#-----| <params>:
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
#-----| Type = [RValueReferenceType] __va_list_tag &&
#-----| [CopyAssignmentOperator] std::__va_list& std::__va_list::operator=(std::__va_list const&)
#-----| <params>:
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
#-----| Type = [LValueReferenceType] const __va_list &
#-----| [MoveAssignmentOperator] std::__va_list& std::__va_list::operator=(std::__va_list&&)
#-----| <params>:
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
#-----| Type = [RValueReferenceType] __va_list &&
#-----| [Operator,TopLevelFunction] void operator delete(void*)
#-----| <params>:
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
Expand Down Expand Up @@ -4335,7 +4343,7 @@ generic.c:
# 3| ValueCategory = prvalue
# 3| getAssociationExpr(0): [ReuseExpr] reuse of x
# 3| Type = [IntType] unsigned int
# 3| ValueCategory = lvalue
# 3| ValueCategory = prvalue
# 3| getAssociationType(1): [TypeName] int
# 3| Type = [IntType] int
# 3| ValueCategory = prvalue
Expand Down
Loading