Merge branch next and update CodeQL to v2.23.3#1149
Open
mbaluda wants to merge 152 commits into
Open
Conversation
Update expected test results after frontend update
Update MISRA queries and tests after merging location tables
C++: accept new test results after QL changes
Observe that `sizeof(...)` might not occur as a dataflow node if it has a parent node with a concrete value. That value will be a dataflow node instead. Hence, the query has be changed to check for expressions where `sizeof(...)` is a child of an expression with a concrete value.
Note that we now properly report the offending cast instead of the expression that is being cast.
As it is the dataflow used by `asctime` that is relevant, and not the pointer, use the indirect expression.
Convert a number of queries to use the new dataflow library
Update expected test results for MSC33-C
These use the new dataflow library
Since the new dataflow library uses use-use dataflow and not def-use dataflow, we now need to check for definitions. Note that these queries can probably be improved by using a dataflow configuration - possibly limited to the local context of a function by including `DataFlow::FeatureEqualSourceSinkCallContext`
Add change note.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository to target CodeQL CLI v2.23.3 (including upgrading CodeQL packs such as codeql/cpp-all), migrates many queries to newer dataflow/concurrency modules, and refreshes test expectations accordingly.
Changes:
- Bump CodeQL CLI support and upgrade CodeQL pack dependencies/lockfiles (notably
codeql/cpp-all: 6.0.0). - Migrate multiple C/C++ queries to
semmle.code.cpp.dataflow.new.*andcodingstandards.cpp.ConcurrencyNew. - Update unit tests and
.expectedoutputs to reflect new library behavior and warning/output changes.
Checklist items not satisfied / uncertain:
- Change note exists but is incorrect (mentions
2.16.6instead of2.23.3). - Shared query output format validation in VS Code: not confirmed here.
- Performance/results validation (OpenPilot) is not evidenced here.
Show a summary per file
| File | Description |
|---|---|
| supported_codeql_configs.json | Bump supported CodeQL CLI to 2.23.3. |
| scripts/generate_modules/queries/qlpack.yml | Upgrade generator pack dependency versions. |
| scripts/generate_modules/queries/codeql-pack.lock.yml | Refresh generator pack lockfile deps. |
| cpp/report/src/qlpack.yml | Upgrade report pack dependency versions. |
| cpp/report/src/codeql-pack.lock.yml | Refresh report pack lockfile deps. |
| cpp/misra/test/rules/RULE-8-2-8/test.cpp | Adjust MISRA test annotations. |
| cpp/misra/test/rules/RULE-8-2-8/PointerToIntegralCast.expected | Update expected findings for RULE-8-2-8. |
| cpp/misra/test/rules/RULE-19-2-2/test.cpp | Update include-directive test annotation. |
| cpp/misra/test/rules/RULE-19-2-2/InvalidIncludeDirective.expected | Add expected finding for new test case. |
| cpp/misra/test/rules/RULE-15-1-3/NonExplicitConversionMember.expected | Update expected operator text. |
| cpp/misra/test/codeql-pack.lock.yml | Refresh MISRA test pack lockfile deps. |
| cpp/misra/src/rules/RULE-8-7-1/PointerArithmeticFormsAnInvalidPointer.ql | Update import to newer SSA internals module. |
| cpp/misra/src/rules/RULE-0-1-1/UnnecessaryWriteToLocalObject.ql | Migrate to dataflow.new import. |
| cpp/misra/src/qlpack.yml | Upgrade MISRA pack dependency versions. |
| cpp/misra/src/codeql-pack.lock.yml | Refresh MISRA pack lockfile deps. |
| cpp/common/test/rules/unusedtypedeclarations/UnusedTypeDeclarations.expected | Update expected locations/results. |
| cpp/common/test/rules/unusedtypedeclarations/test.cpp | Adjust unused-type test annotations. |
| cpp/common/test/rules/throwingoperatornewreturnsnull/ThrowingOperatorNewReturnsNull.expected | Update path-problem graph output. |
| cpp/common/test/rules/movedfromobjectsunspecifiedstate/MovedFromObjectsUnspecifiedState.expected | Update expected node selection. |
| cpp/common/test/rules/donotsubtractpointersaddressingdifferentarrays/DoNotSubtractPointersAddressingDifferentArrays.expected | Update path-problem graph output. |
| cpp/common/test/rules/danglingcapturewhenreturninglambdaobject/DanglingCaptureWhenReturningLambdaObject.expected | Update expected results (dedup). |
| cpp/common/test/rules/constlikereturnvalue/ConstLikeReturnValue.expected | Update path-problem graph output. |
| cpp/common/test/codeql-pack.lock.yml | Refresh common C++ test pack lockfile deps. |
| cpp/common/src/qlpack.yml | Upgrade common C++ pack dependency versions. |
| cpp/common/src/codingstandards/cpp/standardlibrary/STLContainers.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/standardlibrary/FileStreams.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/SmartPointers.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/wrapspuriousfunctioninloop/WrapSpuriousFunctionInLoop.qll | Switch to ConcurrencyNew. |
| cpp/common/src/codingstandards/cpp/rules/useonlyarrayindexingforpointerarithmetic/UseOnlyArrayIndexingForPointerArithmetic.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/unusedtypedeclarations/UnusedTypeDeclarations.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/rules/unsignedoperationwithconstantoperandswraps/UnsignedOperationWithConstantOperandsWraps.qll | Update guard-condition logic. |
| cpp/common/src/codingstandards/cpp/rules/unnecessaryexposedidentifierdeclarationshared/UnnecessaryExposedIdentifierDeclarationShared.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/rules/throwingoperatornewreturnsnull/ThrowingOperatorNewReturnsNull.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/stringnumberconversionmissingerrorcheck/StringNumberConversionMissingErrorCheck.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/rules/preventdeadlockbylockinginpredefinedorder/PreventDeadlockByLockingInPredefinedOrder.qll | Switch to ConcurrencyNew. |
| cpp/common/src/codingstandards/cpp/rules/preservesafetywhenusingconditionvariables/PreserveSafetyWhenUsingConditionVariables.qll | Switch to ConcurrencyNew. |
| cpp/common/src/codingstandards/cpp/rules/predicatefunctionobjectsshouldnotbemutable/PredicateFunctionObjectsShouldNotBeMutable.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/placementnewnotproperlyaligned/PlacementNewNotProperlyAligned.qll | Remove unused deprecated dataflow import. |
| cpp/common/src/codingstandards/cpp/rules/placementnewinsufficientstorage/PlacementNewInsufficientStorage.qll | Remove unused deprecated dataflow import. |
| cpp/common/src/codingstandards/cpp/rules/ownedpointervaluestoredinunrelatedsmartpointer/OwnedPointerValueStoredInUnrelatedSmartPointer.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/rules/onlyfreememoryallocateddynamicallyshared/OnlyFreeMemoryAllocatedDynamicallyShared.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/nonvoidfunctiondoesnotreturn/NonVoidFunctionDoesNotReturn.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/rules/nonconstantformat/NonConstantFormat.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/rules/multipleglobalormemberdeclarators/MultipleGlobalOrMemberDeclarators.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/rules/movedfromobjectsunspecifiedstate/MovedFromObjectsUnspecifiedState.qll | Update dataflow modeling to new API. |
| cpp/common/src/codingstandards/cpp/rules/joinordetachthreadonlyonce/JoinOrDetachThreadOnlyOnce.qll | Switch to ConcurrencyNew. |
| cpp/common/src/codingstandards/cpp/rules/iofstreammissingpositioning/IOFstreamMissingPositioning.qll | Switch to newer taint tracking module. |
| cpp/common/src/codingstandards/cpp/rules/invalidatedenvstringpointers/InvalidatedEnvStringPointers.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/guardaccesstobitfields/GuardAccessToBitFields.qll | Switch to ConcurrencyNew. |
| cpp/common/src/codingstandards/cpp/rules/functionerroneousreturnvaluenottested/FunctionErroneousReturnValueNotTested.qll | Update guard-condition logic + dataflow. |
| cpp/common/src/codingstandards/cpp/rules/donotuserelationaloperatorswithdifferingarrays/DoNotUseRelationalOperatorsWithDifferingArrays.qll | Switch to dataflow.new + add barrier. |
| cpp/common/src/codingstandards/cpp/rules/donotsubtractpointersaddressingdifferentarrays/DoNotSubtractPointersAddressingDifferentArrays.qll | Switch to dataflow.new + add barrier. |
| cpp/common/src/codingstandards/cpp/rules/donotpassaliasedpointertorestrictqualifiedparamshared/DoNotPassAliasedPointerToRestrictQualifiedParamShared.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/donotaccessaclosedfile/DoNotAccessAClosedFile.qll | Update dataflow modeling to new API. |
| cpp/common/src/codingstandards/cpp/rules/danglingcapturewhenreturninglambdaobject/DanglingCaptureWhenReturningLambdaObject.qll | Update dataflow modeling to new API. |
| cpp/common/src/codingstandards/cpp/rules/danglingcapturewhenmovinglambdaobject/DanglingCaptureWhenMovingLambdaObject.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/containeraccesswithoutrangecheck/ContainerAccessWithoutRangeCheck.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/constlikereturnvalue/ConstLikeReturnValue.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/rules/basicstringmaynotbenullterminated/BasicStringMayNotBeNullTerminated.qll | Switch to new taint/dataflow nodes. |
| cpp/common/src/codingstandards/cpp/ReadErrorsAndEOF.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/Overflow.qll | Adjust taint-tracking import visibility. |
| cpp/common/src/codingstandards/cpp/OutOfBounds.qll | Remove unused deprecated dataflow import. |
| cpp/common/src/codingstandards/cpp/Loops.qll | Update unknown-location handling logic. |
| cpp/common/src/codingstandards/cpp/Iterators.qll | Switch to new taint tracking + imports. |
| cpp/common/src/codingstandards/cpp/Identifiers.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/FgetsErrorManagement.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/Expr.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/deadcode/UnusedVariables.qll | Update template-parameter type usage. |
| cpp/common/src/codingstandards/cpp/ConstHelpers.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/ConcurrencyNew.qll | New module aggregating updated concurrency libs. |
| cpp/common/src/codingstandards/cpp/concurrency/ThreadSpecificStorageNew.qll | New TSS modeling using dataflow.new. |
| cpp/common/src/codingstandards/cpp/Allocations.qll | Switch to dataflow.new import. |
| cpp/common/src/codingstandards/cpp/AccessPath.qll | Switch to dataflow.new import. |
| cpp/common/src/codeql-pack.lock.yml | Refresh common C++ pack lockfile deps. |
| cpp/cert/test/rules/MSC51-CPP/BadlySeededRandomNumberGenerator.expected | Remove deprecation warnings from expected output. |
| cpp/cert/test/rules/MEM52-CPP/DetectAndHandleMemoryAllocationErrors.expected | Remove deprecation warnings from expected output. |
| cpp/cert/test/rules/CTR56-CPP/DoNotUsePointerArithmeticOnPolymorphicObjects.expected | Refresh path-problem graph output. |
| cpp/cert/test/rules/CTR53-CPP/UseValidIteratorRanges.expected | Remove deprecation warnings from expected output. |
| cpp/cert/test/rules/CTR52-CPP/GuaranteeGenericCppLibraryFunctionsDoNotOverflow.expected | Remove deprecation warnings from expected output. |
| cpp/cert/test/codeql-pack.lock.yml | Refresh CERT C++ test pack lockfile deps. |
| cpp/cert/src/rules/MSC51-CPP/BadlySeededRandomNumberGenerator.ql | Switch to newer taint tracking module. |
| cpp/cert/src/rules/MEM52-CPP/DetectAndHandleMemoryAllocationErrors.ql | Switch to dataflow.new + update guard checks. |
| cpp/cert/src/rules/EXP50-CPP/DoNotDependOnTheOrderOfEvaluationForSideEffectsInFunctionCallsAsFunctionArguments.ql | Remove unused deprecated dataflow import. |
| cpp/cert/src/rules/CTR56-CPP/DoNotUsePointerArithmeticOnPolymorphicObjects.ql | Switch to dataflow.new import. |
| cpp/cert/src/rules/CTR55-CPP/DoNotUseAnAdditiveOperatorOnAnIterator.ql | Update guard-node casting for new libs. |
| cpp/cert/src/rules/CTR53-CPP/UseValidIteratorRanges.ql | Switch to dataflow.new import. |
| cpp/cert/src/rules/CTR52-CPP/GuaranteeGenericCppLibraryFunctionsDoNotOverflow.ql | Switch to newer taint tracking module. |
| cpp/cert/src/rules/CON56-CPP/LockedALockedNonRecursiveMutexAudit.ql | Switch to ConcurrencyNew. |
| cpp/cert/src/rules/CON56-CPP/DoNotSpeculativelyLockALockedNonRecursiveMutex.ql | Switch to ConcurrencyNew. |
| cpp/cert/src/qlpack.yml | Upgrade CERT C++ pack dependency versions. |
| cpp/cert/src/codeql-pack.lock.yml | Refresh CERT C++ pack lockfile deps. |
| cpp/autosar/test/rules/M9-3-1/ConstMemberFunctionReturnsNonConstPointer.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/M3-9-3/UnderlyingBitRepresentationsOfFloatingPointValuesUsed.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A9-3-1/ReturnsNonConstRawPointersOrReferencesToPrivateOrProtectedData.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A8-4-9/InOutParametersDeclaredAsTNotModified.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A8-4-12/UniquePtrPassedToFunctionWithImproperSemantics.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A8-4-11/SmartPointerAsParameterWithoutLifetimeSemantics.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A7-5-1/InvalidFunctionReturnType.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A5-1-7/LambdaPassedToTypeid.expected | Refresh path-problem graph output. |
| cpp/autosar/test/rules/A5-1-7/LambdaPassedToDecltype.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A5-0-4/PointerArithmeticUsedWithPointersToNonFinalClasses.expected | Refresh path-problem graph output. |
| cpp/autosar/test/rules/A27-0-4/CStyleStringsUsed.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A20-8-4/SharedPointerUsedWithNoOwnershipSharing.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A18-9-4/ArgumentToForwardSubsequentlyUsed.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A15-2-2/ConstructorErrorLeavesObjectInInvalidState.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A15-1-3/ThrownExceptionsShouldBeUnique.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A13-5-3/UserDefinedConversionOperatorsShouldNotBeUsed.expected | Update expected operator text. |
| cpp/autosar/test/rules/A13-2-1/AssignmentOperatorReturnThis.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/rules/A13-1-3/UserDefinedLiteralsOperatorsShallOnlyPerformConversionOfPassedParameters.expected | Remove deprecation warnings from expected output. |
| cpp/autosar/test/codeql-pack.lock.yml | Refresh AUTOSAR test pack lockfile deps. |
| cpp/autosar/src/rules/M9-3-1/ConstMemberFunctionReturnsNonConstPointer.ql | Switch to dataflow.new + update node modeling. |
| cpp/autosar/src/rules/M5-0-17/PointerSubtractionOnDifferentArrays.ql | Switch to dataflow.new + add barrier. |
| cpp/autosar/src/rules/M3-9-3/UnderlyingBitRepresentationsOfFloatingPointValuesUsed.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A9-3-1/ReturnsNonConstRawPointersOrReferencesToPrivateOrProtectedData.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A8-4-9/InOutParametersDeclaredAsTNotModified.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A8-4-12/UniquePtrPassedToFunctionWithImproperSemantics.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A8-4-11/SmartPointerAsParameterWithoutLifetimeSemantics.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A7-5-1/InvalidFunctionReturnType.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A5-1-7/LambdaPassedToTypeid.ql | Switch to dataflow.new + sink modeling. |
| cpp/autosar/src/rules/A5-1-7/LambdaPassedToDecltype.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A5-0-4/PointerArithmeticUsedWithPointersToNonFinalClasses.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A4-7-1/IntegerExpressionLeadToDataLoss.ql | Update guard-condition logic. |
| cpp/autosar/src/rules/A27-0-4/CStyleStringsUsed.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A20-8-4/SharedPointerUsedWithNoOwnershipSharing.ql | Update dataflow modeling to new API. |
| cpp/autosar/src/rules/A18-9-4/ArgumentToForwardSubsequentlyUsed.ql | Switch to dataflow.new + def node modeling. |
| cpp/autosar/src/rules/A15-2-2/ConstructorErrorLeavesObjectInInvalidState.ql | Add global flow config for new/delete tracking. |
| cpp/autosar/src/rules/A15-1-3/ThrownExceptionsShouldBeUnique.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A13-2-1/AssignmentOperatorReturnThis.ql | Switch to dataflow.new import. |
| cpp/autosar/src/rules/A13-1-3/UserDefinedLiteralsOperatorsShallOnlyPerformConversionOfPassedParameters.ql | Switch to newer taint tracking module. |
| cpp/autosar/src/qlpack.yml | Upgrade AUTOSAR pack dependency versions. |
| cpp/autosar/src/codeql-pack.lock.yml | Refresh AUTOSAR pack lockfile deps. |
| change_notes/2026-06-25-upgrade-to-2.23.3.md | Add change note for CodeQL upgrade. |
| c/misra/test/rules/RULE-22-7/EofShallBeComparedWithUnmodifiedReturnValues.expected | Remove deprecation warnings from expected output. |
| c/misra/test/rules/RULE-22-4/AttemptToWriteToAReadOnlyStream.expected | Remove deprecation warnings from expected output. |
| c/misra/test/rules/RULE-22-3/FileOpenForReadAndWriteOnDifferentStreams.expected | Remove deprecation warnings from expected output. |
| c/misra/test/rules/RULE-2-4/UnusedTagDeclaration.expected | Update expected results after behavior change. |
| c/misra/test/rules/RULE-2-4/test.c | Reformat comments / adjust annotations. |
| c/misra/test/rules/RULE-17-5/ArrayFunctionArgumentNumberOfElements.expected | Remove deprecation warnings from expected output. |
| c/misra/test/rules/RULE-13-2/UnsequencedAtomicReads.expected | Remove deprecation warnings from expected output. |
| c/misra/test/codeql-pack.lock.yml | Refresh MISRA C test pack lockfile deps. |
| c/misra/src/rules/RULE-22-7/EofShallBeComparedWithUnmodifiedReturnValues.ql | Switch to dataflow.new import. |
| c/misra/src/rules/RULE-22-4/AttemptToWriteToAReadOnlyStream.ql | Switch to dataflow.new import. |
| c/misra/src/rules/RULE-22-3/FileOpenForReadAndWriteOnDifferentStreams.ql | Switch to dataflow.new import. |
| c/misra/src/rules/RULE-22-20/ThreadStoragePointerInitializedInsideThread.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-20/ThreadStorageNotInitializedBeforeUse.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-19/ConditionVariableUsedWithMultipleMutexes.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-18/NonRecursiveMutexRecursivelyLockedAudit.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-18/NonRecursiveMutexRecursivelyLocked.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-17/InvalidOperationOnUnlockedMutex.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-15/ThreadResourceDisposedBeforeThreadsJoined.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-14/MutexNotInitializedBeforeUse.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-14/MutexInitWithInvalidMutexType.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-14/MutexInitializedInsideThread.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-13/ThreadingObjectWithInvalidStorageDuration.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-22-12/NonstandardUseOfThreadingObject.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-21-14/MemcmpUsedToCompareNullTerminatedStrings.ql | Switch to new taint tracking + sinks. |
| c/misra/src/rules/RULE-18-6/ThreadLocalObjectAddressCopiedToGlobalObject.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/RULE-17-5/ArrayFunctionArgumentNumberOfElements.ql | Switch to dataflow.new + sink modeling. |
| c/misra/src/rules/RULE-13-2/UnsequencedAtomicReads.ql | Switch to newer taint tracking module. |
| c/misra/src/rules/DIR-5-3/ThreadCreatedByThread.ql | Switch to ConcurrencyNew. |
| c/misra/src/rules/DIR-5-3/BannedDynamicThreadCreation.ql | Switch to ConcurrencyNew. |
| c/misra/src/qlpack.yml | Upgrade MISRA C pack dependency versions. |
| c/misra/src/codeql-pack.lock.yml | Refresh MISRA C pack lockfile deps. |
| c/common/test/rules/onlyfreememoryallocateddynamicallyshared/OnlyFreeMemoryAllocatedDynamicallyShared.expected | Refresh path-problem graph output. |
| c/common/test/rules/donotuserelationaloperatorswithdifferingarrays/DoNotUseRelationalOperatorsWithDifferingArrays.expected | Refresh path-problem graph output. |
| c/common/test/rules/donotsubtractpointersaddressingdifferentarrays/DoNotSubtractPointersAddressingDifferentArrays.expected | Refresh path-problem graph output. |
| c/common/test/rules/constlikereturnvalue/ConstLikeReturnValue.expected | Refresh path-problem graph output. |
| c/common/test/codeql-pack.lock.yml | Refresh common C test pack lockfile deps. |
| c/common/src/qlpack.yml | Upgrade common C pack dependency versions. |
| c/common/src/codingstandards/c/Signal.qll | Switch to dataflow.new import. |
| c/common/src/codingstandards/c/OutOfBounds.qll | Remove unused deprecated dataflow import. |
| c/common/src/codingstandards/c/initialization/GlobalInitializationAnalysis.qll | Switch to ConcurrencyNew. |
| c/common/src/codingstandards/c/Extensions.qll | Narrow/adjust extension detection logic. |
| c/common/src/codeql-pack.lock.yml | Refresh common C pack lockfile deps. |
| c/cert/test/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/SIG35-C/DoNotReturnFromAComputationalExceptionHandler.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/SIG30-C/CallOnlyAsyncSafeFunctionsWithinSignalHandlers.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/MSC33-C/DoNotPassInvalidDataToTheAsctimeFunction.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/MEM36-C/DoNotModifyAlignmentOfMemoryWithRealloc.expected | Refresh path-problem graph output. |
| c/cert/test/rules/MEM35-C/InsufficientMemoryAllocatedForObject.expected | Update warning line locations/expected output. |
| c/cert/test/rules/INT31-C/test.c | Update test annotations for conversions. |
| c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected | Add expected results for new cases. |
| c/cert/test/rules/FIO45-C/ToctouRaceConditionsWhileAccessingFiles.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/FIO44-C/OnlyUseValuesForFsetposThatAreReturnedFromFgetpos.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/FIO40-C/ResetStringsOnFgetsOrFgetwsFailure.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/ERR32-C/DoNotRelyOnIndeterminateValuesOfErrno.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/ERR30-C/SetlocaleMightSetErrno.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/ERR30-C/ErrnoReadBeforeReturn.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/DCL30-C/AppropriateStorageDurationsFunctionReturn.expected | Refresh expected sink selection. |
| c/cert/test/rules/CON34-C/ThreadObjectStorageDurationsNotInitialized.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/CON34-C/AppropriateThreadObjectStorageDurations.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/CON30-C/CleanUpThreadSpecificStorage.expected | Remove deprecation warnings from expected output. |
| c/cert/test/rules/ARR39-C/DoNotAddOrSubtractAScaledIntegerToAPointer.expected | Refresh path-problem graph output. |
| c/cert/test/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.expected | Refresh path-problem graph output. |
| c/cert/test/codeql-pack.lock.yml | Refresh CERT C test pack lockfile deps. |
| c/cert/src/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.ql | Switch to newer taint tracking module. |
| c/cert/src/rules/SIG35-C/DoNotReturnFromAComputationalExceptionHandler.ql | Switch to dataflow.new import. |
| c/cert/src/rules/SIG30-C/CallOnlyAsyncSafeFunctionsWithinSignalHandlers.ql | Switch to dataflow.new import. |
| c/cert/src/rules/MSC33-C/DoNotPassInvalidDataToTheAsctimeFunction.ql | Switch to dataflow.new + add sink helper. |
| c/cert/src/rules/MEM36-C/DoNotModifyAlignmentOfMemoryWithRealloc.ql | Switch to dataflow.new import. |
| c/cert/src/rules/MEM35-C/InsufficientMemoryAllocatedForObject.ql | Remove direct deprecated taint import. |
| c/cert/src/rules/FIO45-C/ToctouRaceConditionsWhileAccessingFiles.ql | Switch to dataflow.new import. |
| c/cert/src/rules/FIO44-C/OnlyUseValuesForFsetposThatAreReturnedFromFgetpos.ql | Switch to dataflow.new + new node modeling. |
| c/cert/src/rules/FIO40-C/ResetStringsOnFgetsOrFgetwsFailure.ql | Switch to dataflow.new import. |
| c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.ql | Switch to dataflow.new import. |
| c/cert/src/rules/EXP40-C/DoNotModifyConstantObjects.ql | Switch to dataflow.new import. |
| c/cert/src/rules/EXP37-C/DoNotCallFunctionPointerWithIncompatibleType.ql | Switch to dataflow.new + add type guard. |
| c/cert/src/rules/EXP36-C/DoNotCastPointerToMoreStrictlyAlignedPointerType.ql | Switch to dataflow.new import. |
| c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.ql | Switch to newer taint tracking module. |
| c/cert/src/rules/EXP16-C/DoNotCompareFunctionPointersToConstantValues.ql | Update implicit comparison modeling. |
| c/cert/src/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.ql | Switch to dataflow.new import. |
| c/cert/src/rules/ERR32-C/DoNotRelyOnIndeterminateValuesOfErrno.ql | Switch to dataflow.new import. |
| c/cert/src/rules/ERR30-C/SetlocaleMightSetErrno.ql | Switch to dataflow.new import. |
| c/cert/src/rules/ERR30-C/ErrnoReadBeforeReturn.ql | Switch to dataflow.new import. |
| c/cert/src/rules/DCL30-C/AppropriateStorageDurationsFunctionReturn.ql | Switch to dataflow.new + new sink modeling. |
| c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.ql | Switch to ConcurrencyNew. |
| c/cert/src/rules/CON40-C/AtomicVariableTwiceInExpression.ql | Switch to ConcurrencyNew. |
| c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.ql | Switch to ConcurrencyNew. |
| c/cert/src/rules/CON34-C/ThreadObjectStorageDurationsNotInitialized.ql | Switch to ConcurrencyNew + dataflow.new. |
| c/cert/src/rules/CON34-C/AppropriateThreadObjectStorageDurations.ql | Switch to ConcurrencyNew + dataflow.new. |
| c/cert/src/rules/CON33-C/RaceConditionsWhenUsingLibraryFunctions.ql | Switch to ConcurrencyNew. |
| c/cert/src/rules/CON30-C/CleanUpThreadSpecificStorage.ql | Switch to ConcurrencyNew + dataflow.new and refactor flow config. |
| c/cert/src/rules/ARR39-C/DoNotAddOrSubtractAScaledIntegerToAPointer.ql | Switch to newer taint tracking + refine scaled expr. |
| c/cert/src/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql | Switch to dataflow.new import. |
| c/cert/src/qlpack.yml | Upgrade CERT C pack dependency versions. |
| c/cert/src/codeql-pack.lock.yml | Refresh CERT C pack lockfile deps. |
| .gitignore | Ignore *.qlx artifacts. |
Copilot's findings
- Files reviewed: 239/240 changed files
- Comments generated: 7
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request upgrades CodeQL dependencies, updates dataflow and concurrency imports to use newer modules, and refines several rule implementations for improved accuracy and maintainability. The changes ensure compatibility with the latest CodeQL libraries and enhance the precision of certain queries.
Dependency and Import Upgrades:
codeql/cpp-allto version 6.0.0 and updated several other CodeQL dependencies to their latest versions in bothqlpack.ymlandcodeql-pack.lock.yml. Also addedcodeql/controlflowas a new dependency. [1] [2]semmle.code.cpp.dataflow.DataFlowandsemmle.code.cpp.dataflow.TaintTrackingwithsemmle.code.cpp.dataflow.new.DataFlowandsemmle.code.cpp.dataflow.new.TaintTrackingacross all rule files, ensuring use of the latest dataflow libraries. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]codingstandards.cpp.Concurrencytocodingstandards.cpp.ConcurrencyNewthroughout the codebase. [1] [2] [3] [4] [5] [6] [7]These changes collectively modernize the codebase, improve compatibility with the latest CodeQL features, and enhance the precision and maintainability of CERT C rules.
Change request type
.ql,.qll,.qlsor unit tests)Rules with added or modified queries
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
Query development review checklist
For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:
Author
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
Reviewer
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.